Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 95330c1223 | |||
| c85e181a6b | |||
| 5ee873551a | |||
| 367db4bdda | |||
| 0fcb443bef | |||
| 0b4e42e39d | |||
| 4a6ed362e7 |
@@ -13,6 +13,5 @@ namespace AbstractSoftwareInstallationContracts.BindingModels
|
||||
public string PackageName { get; set; } = string.Empty;
|
||||
public double Price { get; set; }
|
||||
public Dictionary<int, (ISoftwareModel, int)> PackageSoftware{get;set;} = new();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AbstractSoftwareInstallationContracts\AbstractSoftwareInstallationContracts.csproj" />
|
||||
<ProjectReference Include="..\AbstractSoftwareInstallationDataModels\AbstractSoftwareInstallationDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,50 @@
|
||||
using AbstractSoftwareInstallationFileImplement.Models;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace AbstractSoftwareInstallationFileImplement
|
||||
{
|
||||
internal class DataFileSingleton
|
||||
{
|
||||
|
||||
private static DataFileSingleton? instance;
|
||||
private readonly string SoftwareFileName = "Software.xml";
|
||||
private readonly string OrderFileName = "Order.xml";
|
||||
private readonly string PackageFileName = "Package.xml";
|
||||
public List<Software> Softwares { get; private set; }
|
||||
public List<Order> Orders { get; private set; }
|
||||
public List<Package> Packages { get; private set; }
|
||||
public static DataFileSingleton GetInstance()
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new DataFileSingleton();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
public void SaveSoftwares() => SaveData(Softwares, SoftwareFileName, "Softwares", x => x.GetXElement);
|
||||
public void SavePackages() => SaveData(Packages, PackageFileName, "Packages", x => x.GetXElement);
|
||||
public void SaveOrders() => SaveData(Orders, OrderFileName, "Orders", x => x.GetXElement);
|
||||
private DataFileSingleton()
|
||||
{
|
||||
Softwares = LoadData(SoftwareFileName, "Software", x => Software.Create(x)!)!;
|
||||
Packages = LoadData(PackageFileName, "Package", x => Package.Create(x)!)!;
|
||||
Orders = LoadData(OrderFileName, "Order", x => Order.Create(x)!)!;
|
||||
}
|
||||
private static List<T>? LoadData<T>(string filename, string xmlNodeName, Func<XElement, T> selectFunction)
|
||||
{
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
return XDocument.Load(filename)?.Root?.Elements(xmlNodeName)?.Select(selectFunction)?.ToList();
|
||||
}
|
||||
return new List<T>();
|
||||
}
|
||||
|
||||
private static void SaveData<T>(List<T> data, string filename, string xmlNodeName, Func<T, XElement> selectFunction)
|
||||
{
|
||||
if (data != null)
|
||||
{
|
||||
new XDocument(new XElement(xmlNodeName, data.Select(selectFunction).ToArray())).Save(filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using AbstractSoftwareInstallationContracts.BindingModels;
|
||||
using AbstractSoftwareInstallationContracts.SearchModels;
|
||||
using AbstractSoftwareInstallationContracts.StoragesContracts;
|
||||
using AbstractSoftwareInstallationContracts.ViewModels;
|
||||
using AbstractSoftwareInstallationFileImplement.Models;
|
||||
|
||||
namespace AbstractSoftwareInstallationFileImplement.Implements
|
||||
{
|
||||
public class OrderStorage : IOrderStorage
|
||||
{
|
||||
private readonly DataFileSingleton source;
|
||||
|
||||
public OrderStorage()
|
||||
{
|
||||
source = DataFileSingleton.GetInstance();
|
||||
}
|
||||
|
||||
public OrderViewModel? GetElement(OrderSearchModel model)
|
||||
{
|
||||
if (!model.Id.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return GetViewModel(source.Orders.FirstOrDefault(x => (model.Id.HasValue && x.Id == model.Id)));
|
||||
}
|
||||
|
||||
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
||||
{
|
||||
if (!model.Id.HasValue)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
return source.Orders
|
||||
.Where(x => x.Id == model.Id)
|
||||
.Select(x => GetViewModel(x))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public List<OrderViewModel> GetFullList()
|
||||
{
|
||||
return source.Orders.Select(x => GetViewModel(x)).ToList();
|
||||
}
|
||||
|
||||
public OrderViewModel? Insert(OrderBindingModel model)
|
||||
{
|
||||
model.Id = source.Orders.Count > 0 ? source.Orders.Max(x => x.Id) + 1 : 1;
|
||||
var newOrder = Order.Create(model);
|
||||
if (newOrder == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
source.Orders.Add(newOrder);
|
||||
source.SaveOrders();
|
||||
return GetViewModel(newOrder);
|
||||
}
|
||||
|
||||
public OrderViewModel? Update(OrderBindingModel model)
|
||||
{
|
||||
var order = source.Orders.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (order == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
order.Update(model);
|
||||
source.SaveOrders();
|
||||
return GetViewModel(order);
|
||||
}
|
||||
public OrderViewModel? Delete(OrderBindingModel model)
|
||||
{
|
||||
var order = source.Orders.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (order == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
source.Orders.Remove(order);
|
||||
source.SaveOrders();
|
||||
return GetViewModel(order);
|
||||
}
|
||||
|
||||
private OrderViewModel GetViewModel(Order order)
|
||||
{
|
||||
var viewModel = order.GetViewModel;
|
||||
var package = source.Packages.FirstOrDefault(x => x.Id == order.PackageId);
|
||||
if (package != null)
|
||||
{
|
||||
viewModel.PackageName = package.PackageName;
|
||||
}
|
||||
return viewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using AbstractSoftwareInstallationContracts.BindingModels;
|
||||
using AbstractSoftwareInstallationContracts.SearchModels;
|
||||
using AbstractSoftwareInstallationContracts.StoragesContracts;
|
||||
using AbstractSoftwareInstallationContracts.ViewModels;
|
||||
using AbstractSoftwareInstallationFileImplement.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AbstractSoftwareInstallationFileImplement.Implements
|
||||
{
|
||||
public class PackageStorage : IPackageStorage
|
||||
{
|
||||
private readonly DataFileSingleton source;
|
||||
|
||||
public PackageStorage()
|
||||
{
|
||||
source = DataFileSingleton.GetInstance();
|
||||
}
|
||||
|
||||
public PackageViewModel? GetElement(PackageSearchModel model)
|
||||
{
|
||||
if (string.IsNullOrEmpty(model.PackageName) && !model.Id.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return source.Packages
|
||||
.FirstOrDefault(x =>
|
||||
(!string.IsNullOrEmpty(model.PackageName)
|
||||
&& x.PackageName == model.PackageName)
|
||||
|| (model.Id.HasValue && x.Id == model.Id))?.GetViewModel;
|
||||
}
|
||||
|
||||
public List<PackageViewModel> GetFilteredList(PackageSearchModel model)
|
||||
{
|
||||
if (string.IsNullOrEmpty(model.PackageName))
|
||||
{
|
||||
return new();
|
||||
}
|
||||
return source.Packages
|
||||
.Where(x => x.PackageName.Contains(model.PackageName))
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public List<PackageViewModel> GetFullList()
|
||||
{
|
||||
return source.Packages.Select(x => x.GetViewModel).ToList();
|
||||
}
|
||||
|
||||
public PackageViewModel? Insert(PackageBindingModel model)
|
||||
{
|
||||
model.Id = source.Packages.Count > 0 ? source.Packages.Max(x => x.Id) + 1 : 1;
|
||||
var newPackage = Package.Create(model);
|
||||
if (newPackage == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
source.Packages.Add(newPackage);
|
||||
source.SavePackages();
|
||||
return newPackage.GetViewModel;
|
||||
}
|
||||
|
||||
public PackageViewModel? Update(PackageBindingModel model)
|
||||
{
|
||||
var Package = source.Packages.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (Package == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Package.Update(model);
|
||||
source.SavePackages();
|
||||
return Package.GetViewModel;
|
||||
}
|
||||
public PackageViewModel? Delete(PackageBindingModel model)
|
||||
{
|
||||
var Package = source.Packages.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (Package == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
source.Packages.Remove(Package);
|
||||
source.SavePackages();
|
||||
return Package.GetViewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using AbstractSoftwareInstallationContracts.BindingModels;
|
||||
using AbstractSoftwareInstallationContracts.SearchModels;
|
||||
using AbstractSoftwareInstallationContracts.StoragesContracts;
|
||||
using AbstractSoftwareInstallationContracts.ViewModels;
|
||||
using AbstractSoftwareInstallationFileImplement.Models;
|
||||
|
||||
namespace AbstractSoftwareInstallationFileImplement.Implements
|
||||
{
|
||||
public class SoftwareStorage : ISoftwareStorage
|
||||
{
|
||||
private readonly DataFileSingleton _source;
|
||||
public SoftwareStorage()
|
||||
{
|
||||
_source = DataFileSingleton.GetInstance();
|
||||
}
|
||||
public List<SoftwareViewModel> GetFullList()
|
||||
{
|
||||
return _source.Softwares.Select(x => x.GetViewModel).ToList();
|
||||
}
|
||||
public List<SoftwareViewModel> GetFilteredList(SoftwareSearchModel
|
||||
model)
|
||||
{
|
||||
if (string.IsNullOrEmpty(model.SoftwareName))
|
||||
{
|
||||
return new();
|
||||
}
|
||||
return _source.Softwares.Where(x => x.SoftwareName.Contains(model.SoftwareName))
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
public SoftwareViewModel? GetElement(SoftwareSearchModel model)
|
||||
{
|
||||
if (string.IsNullOrEmpty(model.SoftwareName) && !model.Id.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return _source.Softwares.FirstOrDefault(x =>
|
||||
(!string.IsNullOrEmpty(model.SoftwareName)
|
||||
&& x.SoftwareName == model.SoftwareName)
|
||||
|| (model.Id.HasValue && x.Id == model.Id))?.GetViewModel;
|
||||
}
|
||||
public SoftwareViewModel? Insert(SoftwareBindingModel model)
|
||||
{
|
||||
model.Id = _source.Softwares.Count > 0 ? _source.Softwares.Max(x => x.Id) + 1 : 1;
|
||||
var newSoftware = Software.Create(model);
|
||||
if (newSoftware == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
_source.Softwares.Add(newSoftware);
|
||||
_source.SaveSoftwares();
|
||||
return newSoftware.GetViewModel;
|
||||
}
|
||||
public SoftwareViewModel? Update(SoftwareBindingModel model)
|
||||
{
|
||||
var software = _source.Softwares.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (software == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
software.Update(model);
|
||||
_source.SaveSoftwares();
|
||||
return software.GetViewModel;
|
||||
}
|
||||
public SoftwareViewModel? Delete(SoftwareBindingModel model)
|
||||
{
|
||||
var software = _source.Softwares.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (software == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
_source.Softwares.Remove(software);
|
||||
_source.SaveSoftwares();
|
||||
return software.GetViewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
using AbstractSoftwareInstallationContracts.BindingModels;
|
||||
using AbstractSoftwareInstallationContracts.ViewModels;
|
||||
using AbstractSoftwareInstallationDataModels;
|
||||
using AbstractSoftwareInstallationDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace AbstractSoftwareInstallationFileImplement.Models
|
||||
{
|
||||
internal class Order : IOrderModel
|
||||
{
|
||||
public int PackageId { get; private set; }
|
||||
|
||||
public int Count { get; private set; }
|
||||
|
||||
public double Sum { get; private set; }
|
||||
|
||||
public OrderStatus Status { get; private set; } = OrderStatus.Неизвестен;
|
||||
|
||||
public DateTime DateCreate { get; private set; } = DateTime.Now;
|
||||
|
||||
public DateTime? DateImplement { get; private set; }
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public static Order? Create(OrderBindingModel? model)
|
||||
{
|
||||
if (model == null) return null;
|
||||
return new Order
|
||||
{
|
||||
PackageId = model.PackageId,
|
||||
Count = model.Count,
|
||||
Sum = model.Sum,
|
||||
Status = model.Status,
|
||||
DateCreate = model.DateCreate,
|
||||
DateImplement = model.DateImplement,
|
||||
Id = model.Id,
|
||||
};
|
||||
}
|
||||
|
||||
public static Order? Create(XElement element)
|
||||
{
|
||||
if (element == null) return null;
|
||||
return new Order()
|
||||
{
|
||||
Id = Convert.ToInt32(element.Attribute("Id")!.Value),
|
||||
PackageId = Convert.ToInt32(element.Element("PackageId")!.Value),
|
||||
Sum = Convert.ToDouble(element.Element("Sum")!.Value),
|
||||
Count = Convert.ToInt32(element.Element("Count")!.Value),
|
||||
Status = (OrderStatus)Enum.Parse(typeof(OrderStatus), element.Element("Status")!.Value),
|
||||
DateCreate = Convert.ToDateTime(element.Element("DateCreate")!.Value),
|
||||
DateImplement = string.IsNullOrEmpty(element.Element("DateImplement")!.Value) ? null : Convert.ToDateTime(element.Element("DateImplement")!.Value)
|
||||
};
|
||||
}
|
||||
|
||||
public void Update(OrderBindingModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Status = model.Status;
|
||||
DateImplement = model.DateImplement;
|
||||
}
|
||||
public OrderViewModel GetViewModel => new()
|
||||
{
|
||||
Id = Id,
|
||||
PackageId = PackageId,
|
||||
Count = Count,
|
||||
Sum = Sum,
|
||||
Status = Status,
|
||||
DateCreate = DateCreate,
|
||||
DateImplement = DateImplement
|
||||
};
|
||||
public XElement GetXElement => new(
|
||||
"Order",
|
||||
new XAttribute("Id", Id),
|
||||
new XElement("PackageId", PackageId.ToString()),
|
||||
new XElement("Count", Count.ToString()),
|
||||
new XElement("Sum", Sum.ToString()),
|
||||
new XElement("Status", Status.ToString()),
|
||||
new XElement("DateCreate", DateCreate.ToString()),
|
||||
new XElement("DateImplement", DateImplement.ToString())
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using AbstractSoftwareInstallationContracts.BindingModels;
|
||||
using AbstractSoftwareInstallationContracts.ViewModels;
|
||||
using AbstractSoftwareInstallationDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace AbstractSoftwareInstallationFileImplement.Models
|
||||
{
|
||||
internal class Package : IPackageModel
|
||||
{
|
||||
public string PackageName { get; private set; } = string.Empty;
|
||||
|
||||
public double Price { get; private set; }
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public Dictionary<int, int> Softwares { get; private set; } = new();
|
||||
|
||||
private Dictionary<int, (ISoftwareModel, int)>? _PackageSoftware = null;
|
||||
public Dictionary<int, (ISoftwareModel, int)> PackageSoftware
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_PackageSoftware == null)
|
||||
{
|
||||
var source = DataFileSingleton.GetInstance();
|
||||
_PackageSoftware = Softwares.ToDictionary(
|
||||
x => x.Key,
|
||||
y => ((source.Softwares.FirstOrDefault(z => z.Id == y.Key) as ISoftwareModel)!, y.Value)
|
||||
);
|
||||
}
|
||||
return _PackageSoftware;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static Package? Create(PackageBindingModel? model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new Package()
|
||||
{
|
||||
Id = model.Id,
|
||||
PackageName = model.PackageName,
|
||||
Price = model.Price,
|
||||
Softwares = model.PackageSoftware.ToDictionary(x => x.Key, x => x.Value.Item2)
|
||||
};
|
||||
}
|
||||
|
||||
public static Package? Create(XElement element)
|
||||
{
|
||||
if (element == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new Package()
|
||||
{
|
||||
Id = Convert.ToInt32(element.Attribute("Id")!.Value),
|
||||
PackageName = element.Element("PackageName")!.Value,
|
||||
Price = Convert.ToDouble(element.Element("Price")!.Value),
|
||||
Softwares = element.Element("PackageSoftware")!.Elements("PackageSoftware").ToDictionary(
|
||||
x => Convert.ToInt32(x.Element("Key")?.Value),
|
||||
x => Convert.ToInt32(x.Element("Value")?.Value)
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public void Update(PackageBindingModel? model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
PackageName = model.PackageName;
|
||||
Price = model.Price;
|
||||
Softwares = model.PackageSoftware.ToDictionary(x => x.Key, x => x.Value.Item2);
|
||||
_PackageSoftware = null;
|
||||
}
|
||||
public PackageViewModel GetViewModel => new()
|
||||
{
|
||||
Id = Id,
|
||||
PackageName = PackageName,
|
||||
Price = Price,
|
||||
PackageSoftware = PackageSoftware
|
||||
};
|
||||
|
||||
public XElement GetXElement => new(
|
||||
"Package",
|
||||
new XAttribute("Id", Id),
|
||||
new XElement("PackageName", PackageName),
|
||||
new XElement("Price", Price.ToString()),
|
||||
new XElement("PackageSoftware", Softwares.Select(x =>
|
||||
new XElement("PackageSoftware",
|
||||
new XElement("Key", x.Key),
|
||||
new XElement("Value", x.Value)))
|
||||
.ToArray()));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using AbstractSoftwareInstallationContracts.BindingModels;
|
||||
using AbstractSoftwareInstallationContracts.ViewModels;
|
||||
using AbstractSoftwareInstallationDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace AbstractSoftwareInstallationFileImplement.Models
|
||||
{
|
||||
internal class Software : ISoftwareModel
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string SoftwareName { get; private set; } = string.Empty;
|
||||
public double Cost { get; set; }
|
||||
public static Software? Create(SoftwareBindingModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new Software()
|
||||
{
|
||||
Id = model.Id,
|
||||
SoftwareName = model.SoftwareName,
|
||||
Cost = model.Cost
|
||||
};
|
||||
}
|
||||
public static Software? Create(XElement element)
|
||||
{
|
||||
if (element == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new Software()
|
||||
{
|
||||
Id = Convert.ToInt32(element.Attribute("Id")!.Value),
|
||||
SoftwareName = element.Element("SoftwareName")!.Value,
|
||||
Cost = Convert.ToDouble(element.Element("Cost")!.Value)
|
||||
};
|
||||
}
|
||||
public void Update(SoftwareBindingModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SoftwareName = model.SoftwareName;
|
||||
Cost = model.Cost;
|
||||
}
|
||||
public SoftwareViewModel GetViewModel => new()
|
||||
{
|
||||
Id = Id,
|
||||
SoftwareName = SoftwareName,
|
||||
Cost = Cost
|
||||
};
|
||||
public XElement GetXElement => new("Software",
|
||||
new XAttribute("Id", Id),
|
||||
new XElement("SoftwareName", SoftwareName),
|
||||
new XElement("Cost", Cost.ToString()));
|
||||
}
|
||||
}
|
||||
@@ -201,7 +201,7 @@
|
||||
this.groupBoxSoftware.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.Load += new System.EventHandler(this.FormPackage_Load);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -189,6 +189,7 @@ namespace SoftwareInstallationView
|
||||
Id = _id ?? 0,
|
||||
PackageName = textBoxName.Text,
|
||||
Price = Convert.ToDouble(textBoxPrice.Text),
|
||||
PackageSoftware = _packageSoftwares
|
||||
};
|
||||
var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model);
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
this.Controls.Add(this.buttonEdit);
|
||||
this.Controls.Add(this.buttonAdd);
|
||||
this.Name = "FormPackages";
|
||||
this.Text = "FormPackages";
|
||||
this.Text = "Пакеты";
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using AbstractSoftwareInstallationDatabaseImplement.Implements;
|
||||
using AbstractSoftwareInstallationFileImplement.Implements;
|
||||
using AbstractSoftwareInstallationBusinessLogic;
|
||||
using AbstractSoftwareInstallationBusinessLogic.BusinessLogic;
|
||||
using AbstractSoftwareInstallationContracts.BusinessLogicsContracts;
|
||||
|
||||
Reference in New Issue
Block a user