From d33c7f536883493a6f679f778a80409eed0470fb Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Fri, 12 Apr 2024 19:24:26 +0400 Subject: [PATCH 1/7] =?UTF-8?q?1=20=D1=83=D1=81=D0=BB=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogic/ShopLogic.cs | 157 ++++++++++++++++++ .../BindingModels/ShopBindingModel.cs | 18 ++ .../BindingModels/SupplyBindingModel.cs | 15 ++ .../BusinessLogicsContracts/IShopLogic.cs | 19 +++ .../SearchModels/ShopSearchModel.cs | 14 ++ .../StoragesContracts/IShopStorage.cs | 21 +++ .../ViewModels/ShopViewModel.cs | 22 +++ .../Models/IShopModel.cs | 16 ++ .../Models/ISupplyModel.cs | 15 ++ .../DataListSingleton.cs | 5 +- 10 files changed, 300 insertions(+), 2 deletions(-) create mode 100644 ComputersShop/ComputersShopBusinessLogic/BusinessLogic/ShopLogic.cs create mode 100644 ComputersShop/ComputersShopContracts/BindingModels/ShopBindingModel.cs create mode 100644 ComputersShop/ComputersShopContracts/BindingModels/SupplyBindingModel.cs create mode 100644 ComputersShop/ComputersShopContracts/BusinessLogicsContracts/IShopLogic.cs create mode 100644 ComputersShop/ComputersShopContracts/SearchModels/ShopSearchModel.cs create mode 100644 ComputersShop/ComputersShopContracts/StoragesContracts/IShopStorage.cs create mode 100644 ComputersShop/ComputersShopContracts/ViewModels/ShopViewModel.cs create mode 100644 ComputersShop/ComputersShopDataModels/Models/IShopModel.cs create mode 100644 ComputersShop/ComputersShopDataModels/Models/ISupplyModel.cs diff --git a/ComputersShop/ComputersShopBusinessLogic/BusinessLogic/ShopLogic.cs b/ComputersShop/ComputersShopBusinessLogic/BusinessLogic/ShopLogic.cs new file mode 100644 index 0000000..3b0a79b --- /dev/null +++ b/ComputersShop/ComputersShopBusinessLogic/BusinessLogic/ShopLogic.cs @@ -0,0 +1,157 @@ +using ComputersShopContracts.SearchModels; +using ComputersShopContracts.StoragesContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopBusinessLogic.BusinessLogic +{ + public class ShopLogic : IShopLogic + { + private readonly ILogger _logger; + private readonly IShopStorage _shopStorage; + private readonly IComputerStorage _computerStorage; + + public ShopLogic(ILogger logger, IShopStorage shopStorage, IComputerStorage computerStorage) + { + _logger = logger; + _shopStorage = shopStorage; + _computerStorage = computerStorage; + } + + public List? ReadList(ShopSearchModel? model) + { + _logger.LogInformation("ReadList. ShopName:{ShopName}.Id:{ Id}", model?.ShopName, model?.Id); + var list = model == null ? _shopStorage.GetFullList() : _shopStorage.GetFilteredList(model); + if (list == null) + { + _logger.LogWarning("ReadList return null list"); + return null; + } + _logger.LogInformation("ReadList. Count:{Count}", list.Count); + return list; + } + + public ShopViewModel? ReadElement(ShopSearchModel model) + { + if (model == null) + { + throw new ArgumentNullException(nameof(model)); + } + _logger.LogInformation("ReadElement. ShopName:{ShopName}.Id:{ Id}", model.ShopName, model.Id); + var element = _shopStorage.GetElement(model); + if (element == null) + { + _logger.LogWarning("ReadElement element not found"); + return null; + } + _logger.LogInformation("ReadElement find. Id:{Id}", element.Id); + return element; + } + + public bool Create(ShopBindingModel model) + { + CheckModel(model); + if (_shopStorage.Insert(model) == null) + { + _logger.LogWarning("Insert operation failed"); + return false; + } + return true; + } + + public bool Update(ShopBindingModel model) + { + CheckModel(model); + if (_shopStorage.Update(model) == null) + { + _logger.LogWarning("Update operation failed"); + return false; + } + return true; + } + + public bool Delete(ShopBindingModel model) + { + CheckModel(model, false); + _logger.LogInformation("Delete. Id:{Id}", model.Id); + if (_shopStorage.Delete(model) == null) + { + _logger.LogWarning("Delete operation failed"); + return false; + } + return true; + } + + public bool MakeSupply(SupplyBindingModel model) + { + if (model == null) + { + throw new ArgumentNullException(nameof(model)); + } + if (model.Count <= 0) + { + throw new ArgumentException("Количество изделий должно быть больше 0"); + } + var shop = _shopStorage.GetElement(new ShopSearchModel + { + Id = model.ShopId + }); + if (shop == null) + { + throw new ArgumentException("Магазина не существует"); + } + if (shop.ShopComputers.ContainsKey(model.ComputerId)) + { + var oldValue = shop.ShopComputers[model.ComputerId]; + oldValue.Item2 += model.Count; + shop.ShopComputers[model.ComputerId] = oldValue; + } + else + { + var computer = _computerStorage.GetElement(new ComputerSearchModel + { + Id = model.ComputerId + }); + if (computer == null) + { + throw new ArgumentException($"Поставка: Товар с id:{model.ComputerId} не найденн"); + } + shop.ShopComputers.Add(model.ComputerId, (computer, model.Count)); + } + return true; + } + + private void CheckModel(ShopBindingModel model, bool withParams = true) + { + if (model == null) + { + throw new ArgumentNullException(nameof(model)); + } + if (!withParams) + { + return; + } + if (string.IsNullOrEmpty(model.Adress)) + { + throw new ArgumentException("Адрес магазина длжен быть заполнен", nameof(model.Adress)); + } + if (string.IsNullOrEmpty(model.ShopName)) + { + throw new ArgumentException("Название магазина должно быть заполнено", nameof(model.ShopName)); + } + _logger.LogInformation("Shop. ShopName:{ShopName}.Adres:{Adres}.OpeningDate:{OpeningDate}.Id:{ Id}", model.ShopName, model.Adress, model.OpeningDate, model.Id); + var element = _shopStorage.GetElement(new ShopSearchModel + { + ShopName = model.ShopName + }); + if (element != null && element.Id != model.Id) + { + throw new InvalidOperationException("Магазин с таким названием уже есть"); + } + } + } +} diff --git a/ComputersShop/ComputersShopContracts/BindingModels/ShopBindingModel.cs b/ComputersShop/ComputersShopContracts/BindingModels/ShopBindingModel.cs new file mode 100644 index 0000000..3ae22f2 --- /dev/null +++ b/ComputersShop/ComputersShopContracts/BindingModels/ShopBindingModel.cs @@ -0,0 +1,18 @@ +using ComputersShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopContracts.BindingModels +{ + public class ShopBindingModel : IShopModel + { + public int Id { get; set; } + public string ShopName { get; set; } = string.Empty; + public string Adress { get; set; } = string.Empty; + public DateTime OpeningDate { get; set; } = DateTime.Now; + public Dictionary ShopComputers { get; set; } = new(); + } +} diff --git a/ComputersShop/ComputersShopContracts/BindingModels/SupplyBindingModel.cs b/ComputersShop/ComputersShopContracts/BindingModels/SupplyBindingModel.cs new file mode 100644 index 0000000..4636ddb --- /dev/null +++ b/ComputersShop/ComputersShopContracts/BindingModels/SupplyBindingModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopContracts.BindingModels +{ + public class SupplyBindingModel : ISupplyModel + { + public int ShopId { get; set; } + public int ComputerId { get; set; } + public int Count { get; set; } + } +} diff --git a/ComputersShop/ComputersShopContracts/BusinessLogicsContracts/IShopLogic.cs b/ComputersShop/ComputersShopContracts/BusinessLogicsContracts/IShopLogic.cs new file mode 100644 index 0000000..2ca7114 --- /dev/null +++ b/ComputersShop/ComputersShopContracts/BusinessLogicsContracts/IShopLogic.cs @@ -0,0 +1,19 @@ +using ComputersShopContracts.BindingModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopContracts.BusinessLogicsContracts +{ + public interface IShopLogic + { + List? ReadList(ShopSearchModel? model); + ShopViewModel? ReadElement(ShopSearchModel model); + bool Create(ShopBindingModel model); + bool Update(ShopBindingModel model); + bool Delete(ShopBindingModel model); + bool MakeSupply(SupplyBindingModel model); + } +} diff --git a/ComputersShop/ComputersShopContracts/SearchModels/ShopSearchModel.cs b/ComputersShop/ComputersShopContracts/SearchModels/ShopSearchModel.cs new file mode 100644 index 0000000..1c39237 --- /dev/null +++ b/ComputersShop/ComputersShopContracts/SearchModels/ShopSearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopContracts.SearchModels +{ + public class ShopSearchModel + { + public int? Id { get; set; } + public string? ShopName { get; set; } + } +} diff --git a/ComputersShop/ComputersShopContracts/StoragesContracts/IShopStorage.cs b/ComputersShop/ComputersShopContracts/StoragesContracts/IShopStorage.cs new file mode 100644 index 0000000..5de8177 --- /dev/null +++ b/ComputersShop/ComputersShopContracts/StoragesContracts/IShopStorage.cs @@ -0,0 +1,21 @@ +using ComputersShopContracts.BindingModels; +using ComputersShopContracts.SearchModels; +using ComputersShopContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopContracts.StoragesContracts +{ + public interface IShopStorage + { + List GetFullList(); + List GetFilteredList(ShopSearchModel model); + ShopViewModel? GetElement(ShopSearchModel model); + ShopViewModel? Insert(ShopBindingModel model); + ShopViewModel? Update(ShopBindingModel model); + ShopViewModel? Delete(ShopBindingModel model); + } +} diff --git a/ComputersShop/ComputersShopContracts/ViewModels/ShopViewModel.cs b/ComputersShop/ComputersShopContracts/ViewModels/ShopViewModel.cs new file mode 100644 index 0000000..c5544d9 --- /dev/null +++ b/ComputersShop/ComputersShopContracts/ViewModels/ShopViewModel.cs @@ -0,0 +1,22 @@ +using ComputersShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopContracts.ViewModels +{ + public class ShopViewModel : IShopModel + { + public int Id { get; set; } + [DisplayName("Название")] + public string ShopName { get; set; } = string.Empty; + [DisplayName("Адрес")] + public string Adress { get; set; } = string.Empty; + [DisplayName("Дата открытия")] + public DateTime OpeningDate { get; set; } + public Dictionary ShopComputers { get; set; } = new(); + } +} diff --git a/ComputersShop/ComputersShopDataModels/Models/IShopModel.cs b/ComputersShop/ComputersShopDataModels/Models/IShopModel.cs new file mode 100644 index 0000000..389a4c4 --- /dev/null +++ b/ComputersShop/ComputersShopDataModels/Models/IShopModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopDataModels.Models +{ + public interface IShopModel : IId + { + string ShopName { get; } + string Adress { get; } + DateTime OpeningDate { get; } + Dictionary ShopComputers { get; } + } +} diff --git a/ComputersShop/ComputersShopDataModels/Models/ISupplyModel.cs b/ComputersShop/ComputersShopDataModels/Models/ISupplyModel.cs new file mode 100644 index 0000000..4694dcb --- /dev/null +++ b/ComputersShop/ComputersShopDataModels/Models/ISupplyModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopDataModels.Models +{ + public interface ISupplyModel + { + int ShopId { get; } + int ComputerId { get; } + int Count { get; } + } +} diff --git a/ComputersShop/ComputersShopListImplement/DataListSingleton.cs b/ComputersShop/ComputersShopListImplement/DataListSingleton.cs index 2877738..67ff5d1 100644 --- a/ComputersShop/ComputersShopListImplement/DataListSingleton.cs +++ b/ComputersShop/ComputersShopListImplement/DataListSingleton.cs @@ -1,6 +1,5 @@ -using System.ComponentModel; -using System.Windows.Controls; +using ComputersShopListImplement.Models; namespace ComputersShopListImplement { @@ -10,11 +9,13 @@ namespace ComputersShopListImplement public List Components { get; set; } public List Orders { get; set; } public List Computers { get; set; } + public List Shops { get; set; } private DataListSingleton() { Components = new List(); Orders = new List(); Computers = new List(); + Shops = new List(); } public static DataListSingleton GetInstance() { -- 2.25.1 From dd60c2bef225ec153d0b1b67a1f8309eed74e796 Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Fri, 12 Apr 2024 19:35:46 +0400 Subject: [PATCH 2/7] =?UTF-8?q?1=20=D1=83=D1=81=D0=BB=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implements/ComponentStorage.cs | 1 - .../Implements/ShopStorage.cs | 112 ++++++++++++++ .../ComputersShopListImplement/Models/Shop.cs | 55 +++++++ .../FormCreateSupply.Designer.cs | 142 ++++++++++++++++++ .../ComputersShopView/FormCreateSupply.cs | 95 ++++++++++++ .../ComputersShopView/FormCreateSupply.resx | 120 +++++++++++++++ 6 files changed, 524 insertions(+), 1 deletion(-) create mode 100644 ComputersShop/ComputersShopListImplement/Implements/ShopStorage.cs create mode 100644 ComputersShop/ComputersShopListImplement/Models/Shop.cs create mode 100644 ComputersShop/ComputersShopView/FormCreateSupply.Designer.cs create mode 100644 ComputersShop/ComputersShopView/FormCreateSupply.cs create mode 100644 ComputersShop/ComputersShopView/FormCreateSupply.resx diff --git a/ComputersShop/ComputersShopListImplement/Implements/ComponentStorage.cs b/ComputersShop/ComputersShopListImplement/Implements/ComponentStorage.cs index d928f31..0c6f419 100644 --- a/ComputersShop/ComputersShopListImplement/Implements/ComponentStorage.cs +++ b/ComputersShop/ComputersShopListImplement/Implements/ComponentStorage.cs @@ -5,7 +5,6 @@ using ComputersShopContracts.ViewModels; using ComputersShopListImplement.Models; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; diff --git a/ComputersShop/ComputersShopListImplement/Implements/ShopStorage.cs b/ComputersShop/ComputersShopListImplement/Implements/ShopStorage.cs new file mode 100644 index 0000000..4dfacf6 --- /dev/null +++ b/ComputersShop/ComputersShopListImplement/Implements/ShopStorage.cs @@ -0,0 +1,112 @@ +using ComputersShopContracts.BindingModels; +using ComputersShopContracts.SearchModels; +using ComputersShopContracts.StoragesContracts; +using ComputersShopContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopListImplement.Implements +{ + public class ShopStorage : IShopStorage + { + private readonly DataListSingleton _source; + + public ShopStorage() + { + _source = DataListSingleton.GetInstance(); + } + + public List GetFullList() + { + var result = new List(); + foreach (var shop in _source.Shops) + { + result.Add(shop.GetViewModel); + } + return result; + } + + public List GetFilteredList(ShopSearchModel model) + { + var result = new List(); + if (string.IsNullOrEmpty(model.ShopName)) + { + return result; + } + foreach (var shop in _source.Shops) + { + if (shop.ShopName.Contains(model.ShopName)) + { + result.Add(shop.GetViewModel); + } + } + return result; + } + + public ShopViewModel? GetElement(ShopSearchModel model) + { + if (string.IsNullOrEmpty(model.ShopName) && !model.Id.HasValue) + { + return null; + } + foreach (var shop in _source.Shops) + { + if ((!string.IsNullOrEmpty(model.ShopName) && shop.ShopName == model.ShopName) || + (model.Id.HasValue && shop.Id == model.Id)) + { + return shop.GetViewModel; + } + } + return null; + } + + public ShopViewModel? Insert(ShopBindingModel model) + { + model.Id = 1; + foreach (var shop in _source.Shops) + { + if (model.Id <= shop.Id) + { + model.Id = shop.Id + 1; + } + } + var newShop = Shop.Create(model); + if (newShop == null) + { + return null; + } + _source.Shops.Add(newShop); + return newShop.GetViewModel; + } + + public ShopViewModel? Update(ShopBindingModel model) + { + foreach (var shop in _source.Shops) + { + if (shop.Id == model.Id) + { + shop.Update(model); + return shop.GetViewModel; + } + } + return null; + } + + public ShopViewModel? Delete(ShopBindingModel model) + { + for (int i = 0; i < _source.Shops.Count; ++i) + { + if (_source.Shops[i].Id == model.Id) + { + var element = _source.Shops[i]; + _source.Shops.RemoveAt(i); + return element.GetViewModel; + } + } + return null; + } + } +} diff --git a/ComputersShop/ComputersShopListImplement/Models/Shop.cs b/ComputersShop/ComputersShopListImplement/Models/Shop.cs new file mode 100644 index 0000000..e366d7e --- /dev/null +++ b/ComputersShop/ComputersShopListImplement/Models/Shop.cs @@ -0,0 +1,55 @@ +using ComputersShopContracts.BindingModels; +using ComputersShopContracts.ViewModels; +using ComputersShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputersShopListImplement.Models +{ + public class Shop : IShopModel + { + public int Id { get; private set; } + public string ShopName { get; private set; } = string.Empty; + public string Adress { get; private set; } = string.Empty; + public DateTime OpeningDate { get; private set; } + public Dictionary ShopComputers { get; private set; } = new(); + + public static Shop? Create(ShopBindingModel? model) + { + if (model == null) + { + return null; + } + return new Shop() + { + Id = model.Id, + ShopName = model.ShopName, + Adress = model.Adress, + OpeningDate = model.OpeningDate + }; + } + + public void Update(ShopBindingModel? model) + { + if (model == null) + { + return; + } + ShopName = model.ShopName; + Adress = model.Adress; + OpeningDate = model.OpeningDate; + } + + public ShopViewModel GetViewModel => new() + { + Id = Id, + ShopName = ShopName, + Adress = Adress, + OpeningDate = OpeningDate, + ShopComputers = ShopComputers + }; + } +} diff --git a/ComputersShop/ComputersShopView/FormCreateSupply.Designer.cs b/ComputersShop/ComputersShopView/FormCreateSupply.Designer.cs new file mode 100644 index 0000000..3e16764 --- /dev/null +++ b/ComputersShop/ComputersShopView/FormCreateSupply.Designer.cs @@ -0,0 +1,142 @@ +namespace ComputersShopView +{ + partial class FormCreateSupply + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + label1 = new Label(); + label2 = new Label(); + comboBoxShop = new ComboBox(); + comboBoxComputer = new ComboBox(); + buttonSave = new Button(); + buttonCancel = new Button(); + label3 = new Label(); + textBoxCount = new TextBox(); + SuspendLayout(); + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(37, 67); + label1.Name = "label1"; + label1.Size = new Size(58, 15); + label1.TabIndex = 0; + label1.Text = "Поставка"; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new Point(37, 25); + label2.Name = "label2"; + label2.Size = new Size(54, 15); + label2.TabIndex = 1; + label2.Text = "Магазин"; + // + // comboBoxShop + // + comboBoxShop.FormattingEnabled = true; + comboBoxShop.Location = new Point(131, 22); + comboBoxShop.Name = "comboBoxShop"; + comboBoxShop.Size = new Size(174, 23); + comboBoxShop.TabIndex = 2; + // + // comboBoxComputer + // + comboBoxComputer.FormattingEnabled = true; + comboBoxComputer.Location = new Point(131, 64); + comboBoxComputer.Name = "comboBoxComputer"; + comboBoxComputer.Size = new Size(174, 23); + comboBoxComputer.TabIndex = 3; + // + // buttonSave + // + buttonSave.Location = new Point(88, 144); + buttonSave.Name = "buttonSave"; + buttonSave.Size = new Size(89, 23); + buttonSave.TabIndex = 4; + buttonSave.Text = "Сохранить"; + buttonSave.UseVisualStyleBackColor = true; + buttonSave.Click += ButtonSave_Click; + // + // buttonCancel + // + buttonCancel.Location = new Point(201, 144); + buttonCancel.Name = "buttonCancel"; + buttonCancel.Size = new Size(89, 23); + buttonCancel.TabIndex = 5; + buttonCancel.Text = "Отмена"; + buttonCancel.UseVisualStyleBackColor = true; + buttonCancel.Click += ButtonCancel_Click; + // + // label3 + // + label3.AutoSize = true; + label3.Location = new Point(37, 107); + label3.Name = "label3"; + label3.Size = new Size(72, 15); + label3.TabIndex = 6; + label3.Text = "Количество"; + // + // textBoxCount + // + textBoxCount.Location = new Point(131, 104); + textBoxCount.Name = "textBoxCount"; + textBoxCount.Size = new Size(174, 23); + textBoxCount.TabIndex = 7; + // + // FormCreateSupply + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(317, 174); + Controls.Add(textBoxCount); + Controls.Add(label3); + Controls.Add(buttonCancel); + Controls.Add(buttonSave); + Controls.Add(comboBoxComputer); + Controls.Add(comboBoxShop); + Controls.Add(label2); + Controls.Add(label1); + Name = "FormCreateSupply"; + Text = "FormCreateSupply"; + Load += FormCreateSupply_Load; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private Label label1; + private Label label2; + private ComboBox comboBoxShop; + private ComboBox comboBoxComputer; + private Button buttonSave; + private Button buttonCancel; + private Label label3; + private TextBox textBoxCount; + } +} \ No newline at end of file diff --git a/ComputersShop/ComputersShopView/FormCreateSupply.cs b/ComputersShop/ComputersShopView/FormCreateSupply.cs new file mode 100644 index 0000000..6e88ab2 --- /dev/null +++ b/ComputersShop/ComputersShopView/FormCreateSupply.cs @@ -0,0 +1,95 @@ +using ComputersShopContracts.BindingModels; +using ComputersShopContracts.BusinessLogicsContracts; +using ComputersShopContracts.ViewModels; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ComputersShopView +{ + public partial class FormCreateSupply : Form + { + private readonly ILogger _logger; + private readonly IComputerLogic _logicP; + private readonly IShopLogic _logicS; + private List _shopList = new List(); + private List _computerList = new List(); + public FormCreateSupply(ILogger logger, IComputerLogic logicP, IShopLogic logicS) + { + InitializeComponent(); + _logger = logger; + _logicP = logicP; + _logicS = logicS; + } + private void FormCreateSupply_Load(object sender, EventArgs e) + { + _shopList = _logicS.ReadList(null); + _computerList = _logicP.ReadList(null); + if (_shopList != null) + { + comboBoxShop.DisplayMember = "ShopName"; + comboBoxShop.ValueMember = "Id"; + comboBoxShop.DataSource = _shopList; + comboBoxShop.SelectedItem = null; + _logger.LogInformation("Загрузка магазинов для поставок"); + } + if (_computerList != null) + { + comboBoxComputer.DisplayMember = "ComputerName"; + comboBoxComputer.ValueMember = "Id"; + comboBoxComputer.DataSource = _computerList; + comboBoxComputer.SelectedItem = null; + _logger.LogInformation("Загрузка компьютеров для поставок"); + } + } + + private void ButtonSave_Click(object sender, EventArgs e) + { + if (comboBoxShop.SelectedValue == null) + { + MessageBox.Show("Выберите магазин", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + if (comboBoxComputer.SelectedValue == null) + { + MessageBox.Show("Выберите изделие", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + _logger.LogInformation("Создание поставки"); + try + { + var operationResult = _logicS.MakeSupply(new SupplyBindingModel + { + ShopId = Convert.ToInt32(comboBoxShop.SelectedValue), + ComputerId = Convert.ToInt32(comboBoxComputer.SelectedValue), + Count = Convert.ToInt32(textBoxCount.Text) + }); + if (!operationResult) + { + throw new Exception("Ошибка при создании поставки. Дополнительная информация в логах."); + } + MessageBox.Show("Сохранение прошло успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); + DialogResult = DialogResult.OK; + Close(); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка создания поставки"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void ButtonCancel_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + Close(); + } + } +} diff --git a/ComputersShop/ComputersShopView/FormCreateSupply.resx b/ComputersShop/ComputersShopView/FormCreateSupply.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ComputersShop/ComputersShopView/FormCreateSupply.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file -- 2.25.1 From 80db0d4bb74d8e1d91eb98dd293af927a2ff302c Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Fri, 12 Apr 2024 19:44:54 +0400 Subject: [PATCH 3/7] =?UTF-8?q?1=20=D1=83=D1=81=D0=BB=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ComputersShopView/FormMain.Designer.cs | 44 +++++++++---------- ComputersShop/ComputersShopView/FormMain.cs | 21 ++++++++- 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/ComputersShop/ComputersShopView/FormMain.Designer.cs b/ComputersShop/ComputersShopView/FormMain.Designer.cs index acf67e3..4e4e11b 100644 --- a/ComputersShop/ComputersShopView/FormMain.Designer.cs +++ b/ComputersShop/ComputersShopView/FormMain.Designer.cs @@ -35,9 +35,9 @@ buttonRef = new Button(); dataGridView = new DataGridView(); menuStrip = new MenuStrip(); - компонентыToolStripMenuItem = new ToolStripMenuItem(); - компонентыToolStripMenuItem1 = new ToolStripMenuItem(); - изделияToolStripMenuItem = new ToolStripMenuItem(); + ListToolStripMenuItem = new ToolStripMenuItem(); + ComponentsToolStripMenuItem = new ToolStripMenuItem(); + ComputersToolStripMenuItem = new ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); menuStrip.SuspendLayout(); SuspendLayout(); @@ -104,33 +104,33 @@ // // menuStrip // - menuStrip.Items.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem }); + menuStrip.Items.AddRange(new ToolStripItem[] { ListToolStripMenuItem }); menuStrip.Location = new Point(0, 0); menuStrip.Name = "menuStrip"; menuStrip.Size = new Size(921, 24); menuStrip.TabIndex = 7; menuStrip.Text = "menuStrip"; // - // компонентыToolStripMenuItem + // ListToolStripMenuItem // - компонентыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem1, изделияToolStripMenuItem }); - компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem"; - компонентыToolStripMenuItem.Size = new Size(94, 20); - компонентыToolStripMenuItem.Text = "Справочники"; + ListToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ComponentsToolStripMenuItem, ComputersToolStripMenuItem }); + ListToolStripMenuItem.Name = "ListToolStripMenuItem"; + ListToolStripMenuItem.Size = new Size(94, 20); + ListToolStripMenuItem.Text = "Справочники"; // - // компонентыToolStripMenuItem1 + // ComponentsToolStripMenuItem // - компонентыToolStripMenuItem1.Name = "компонентыToolStripMenuItem1"; - компонентыToolStripMenuItem1.Size = new Size(145, 22); - компонентыToolStripMenuItem1.Text = "Компоненты"; - компонентыToolStripMenuItem1.Click += КомпонентыToolStripMenuItem_Click; + ComponentsToolStripMenuItem.Name = "ComponentsToolStripMenuItem1"; + ComponentsToolStripMenuItem.Size = new Size(180, 22); + ComponentsToolStripMenuItem.Text = "Компоненты"; + ComponentsToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click; // - // изделияToolStripMenuItem + // ComputersToolStripMenuItem // - изделияToolStripMenuItem.Name = "изделияToolStripMenuItem"; - изделияToolStripMenuItem.Size = new Size(145, 22); - изделияToolStripMenuItem.Text = "Изделия"; - изделияToolStripMenuItem.Click += ИзделияToolStripMenuItem_Click; + ComputersToolStripMenuItem.Name = "ComputersToolStripMenuItem"; + ComputersToolStripMenuItem.Size = new Size(180, 22); + ComputersToolStripMenuItem.Text = "Изделия"; + ComputersToolStripMenuItem.Click += ComputersToolStripMenuItem_Click; // // FormMain // @@ -163,8 +163,8 @@ private Button buttonRef; private DataGridView dataGridView; private MenuStrip menuStrip; - private ToolStripMenuItem компонентыToolStripMenuItem; - private ToolStripMenuItem компонентыToolStripMenuItem1; - private ToolStripMenuItem изделияToolStripMenuItem; + private ToolStripMenuItem ListToolStripMenuItem; + private ToolStripMenuItem ComponentsToolStripMenuItem; + private ToolStripMenuItem ComputersToolStripMenuItem; } } \ No newline at end of file diff --git a/ComputersShop/ComputersShopView/FormMain.cs b/ComputersShop/ComputersShopView/FormMain.cs index e320b79..ed71f42 100644 --- a/ComputersShop/ComputersShopView/FormMain.cs +++ b/ComputersShop/ComputersShopView/FormMain.cs @@ -49,7 +49,7 @@ namespace ComputersShopView MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } } - private void КомпонентыToolStripMenuItem_Click(object sender, EventArgs + private void ComponentsToolStripMenuItem_Click(object sender, EventArgs e) { var service = @@ -59,7 +59,7 @@ namespace ComputersShopView form.ShowDialog(); } } - private void ИзделияToolStripMenuItem_Click(object sender, EventArgs e) + private void ComputersToolStripMenuItem_Click(object sender, EventArgs e) { var service = Program.ServiceProvider?.GetService(typeof(FormComputers)); if (service is FormComputers form) @@ -170,5 +170,22 @@ namespace ComputersShopView { LoadData(); } + private void shopsToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormShops)); + if (service is FormShops form) + { + form.ShowDialog(); + } + } + + private void transactionToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormCreateSupply)); + if (service is FormCreateSupply form) + { + form.ShowDialog(); + } + } } } -- 2.25.1 From b151d0a3142e8a8a788bfba7c838ae136d47fc08 Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Fri, 12 Apr 2024 20:02:49 +0400 Subject: [PATCH 4/7] =?UTF-8?q?1=20=D1=83=D1=81=D0=BB=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogic/ShopLogic.cs | 5 +- .../Implements/ComputerStorage.cs | 7 +- .../Implements/OrderStorage.cs | 8 +- .../ComputersShopView/FormMain.Designer.cs | 21 +- .../ComputersShopView/FormShop.Designer.cs | 196 ++++++++++++++++++ ComputersShop/ComputersShopView/FormShop.cs | 127 ++++++++++++ ComputersShop/ComputersShopView/FormShop.resx | 120 +++++++++++ .../ComputersShopView/FormShops.Designer.cs | 113 ++++++++++ ComputersShop/ComputersShopView/FormShops.cs | 115 ++++++++++ .../ComputersShopView/FormShops.resx | 120 +++++++++++ ComputersShop/ComputersShopView/Program.cs | 5 + 11 files changed, 832 insertions(+), 5 deletions(-) create mode 100644 ComputersShop/ComputersShopView/FormShop.Designer.cs create mode 100644 ComputersShop/ComputersShopView/FormShop.cs create mode 100644 ComputersShop/ComputersShopView/FormShop.resx create mode 100644 ComputersShop/ComputersShopView/FormShops.Designer.cs create mode 100644 ComputersShop/ComputersShopView/FormShops.cs create mode 100644 ComputersShop/ComputersShopView/FormShops.resx diff --git a/ComputersShop/ComputersShopBusinessLogic/BusinessLogic/ShopLogic.cs b/ComputersShop/ComputersShopBusinessLogic/BusinessLogic/ShopLogic.cs index 3b0a79b..ec562f2 100644 --- a/ComputersShop/ComputersShopBusinessLogic/BusinessLogic/ShopLogic.cs +++ b/ComputersShop/ComputersShopBusinessLogic/BusinessLogic/ShopLogic.cs @@ -1,5 +1,8 @@ -using ComputersShopContracts.SearchModels; +using ComputersShopContracts.BindingModels; +using ComputersShopContracts.BusinessLogicsContracts; +using ComputersShopContracts.SearchModels; using ComputersShopContracts.StoragesContracts; +using ComputersShopContracts.ViewModels; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; diff --git a/ComputersShop/ComputersShopListImplement/Implements/ComputerStorage.cs b/ComputersShop/ComputersShopListImplement/Implements/ComputerStorage.cs index 06ec22d..fa6fc24 100644 --- a/ComputersShop/ComputersShopListImplement/Implements/ComputerStorage.cs +++ b/ComputersShop/ComputersShopListImplement/Implements/ComputerStorage.cs @@ -1,4 +1,9 @@ -using System; +using ComputersShopContracts.BindingModels; +using ComputersShopContracts.SearchModels; +using ComputersShopContracts.StoragesContracts; +using ComputersShopContracts.ViewModels; +using ComputersShopListImplement.Models; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; diff --git a/ComputersShop/ComputersShopListImplement/Implements/OrderStorage.cs b/ComputersShop/ComputersShopListImplement/Implements/OrderStorage.cs index 9cbe65d..869030e 100644 --- a/ComputersShop/ComputersShopListImplement/Implements/OrderStorage.cs +++ b/ComputersShop/ComputersShopListImplement/Implements/OrderStorage.cs @@ -1,9 +1,13 @@ -using System; +using ComputersShopContracts.BindingModels; +using ComputersShopContracts.SearchModels; +using ComputersShopContracts.StoragesContracts; +using ComputersShopContracts.ViewModels; +using ComputersShopListImplement.Models; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows.Controls; namespace ComputersShopListImplement.Implements { diff --git a/ComputersShop/ComputersShopView/FormMain.Designer.cs b/ComputersShop/ComputersShopView/FormMain.Designer.cs index 4e4e11b..558ceba 100644 --- a/ComputersShop/ComputersShopView/FormMain.Designer.cs +++ b/ComputersShop/ComputersShopView/FormMain.Designer.cs @@ -38,6 +38,8 @@ ListToolStripMenuItem = new ToolStripMenuItem(); ComponentsToolStripMenuItem = new ToolStripMenuItem(); ComputersToolStripMenuItem = new ToolStripMenuItem(); + ShopsToolStripMenuItem = new ToolStripMenuItem(); + SupplyShopToolStripMenuItem = new ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); menuStrip.SuspendLayout(); SuspendLayout(); @@ -113,7 +115,7 @@ // // ListToolStripMenuItem // - ListToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ComponentsToolStripMenuItem, ComputersToolStripMenuItem }); + ListToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ComponentsToolStripMenuItem, ComputersToolStripMenuItem, ShopsToolStripMenuItem , SupplyShopToolStripMenuItem }); ListToolStripMenuItem.Name = "ListToolStripMenuItem"; ListToolStripMenuItem.Size = new Size(94, 20); ListToolStripMenuItem.Text = "Справочники"; @@ -132,6 +134,21 @@ ComputersToolStripMenuItem.Text = "Изделия"; ComputersToolStripMenuItem.Click += ComputersToolStripMenuItem_Click; // + // + // ShopsToolStripMenuItem + // + ShopsToolStripMenuItem.Name = "ShopsToolStripMenuItem"; + ShopsToolStripMenuItem.Size = new Size(198, 22); + ShopsToolStripMenuItem.Text = "Магазины"; + ShopsToolStripMenuItem.Click += shopsToolStripMenuItem_Click; + // + // SupplyShopToolStripMenuItem + // + SupplyShopToolStripMenuItem.Name = "SupplyShopToolStripMenuItem"; + SupplyShopToolStripMenuItem.Size = new Size(198, 22); + SupplyShopToolStripMenuItem.Text = "Пополнение магазина"; + SupplyShopToolStripMenuItem.Click += transactionToolStripMenuItem_Click; + // // FormMain // AutoScaleDimensions = new SizeF(7F, 15F); @@ -166,5 +183,7 @@ private ToolStripMenuItem ListToolStripMenuItem; private ToolStripMenuItem ComponentsToolStripMenuItem; private ToolStripMenuItem ComputersToolStripMenuItem; + private ToolStripMenuItem ShopsToolStripMenuItem; + private ToolStripMenuItem SupplyShopToolStripMenuItem; } } \ No newline at end of file diff --git a/ComputersShop/ComputersShopView/FormShop.Designer.cs b/ComputersShop/ComputersShopView/FormShop.Designer.cs new file mode 100644 index 0000000..76527df --- /dev/null +++ b/ComputersShop/ComputersShopView/FormShop.Designer.cs @@ -0,0 +1,196 @@ +namespace ComputersShopView +{ + partial class FormShop + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + labelName = new Label(); + textBoxName = new TextBox(); + textBoxAdress = new TextBox(); + labelAdress = new Label(); + buttonCancel = new Button(); + buttonSave = new Button(); + dataGridView = new DataGridView(); + id = new DataGridViewTextBoxColumn(); + ComputerName = new DataGridViewTextBoxColumn(); + Count = new DataGridViewTextBoxColumn(); + label1 = new Label(); + dateTimeOpen = new DateTimePicker(); + ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); + SuspendLayout(); + // + // labelName + // + labelName.AutoSize = true; + labelName.Location = new Point(10, 11); + labelName.Name = "labelName"; + labelName.Size = new Size(65, 15); + labelName.TabIndex = 0; + labelName.Text = "Название: "; + // + // textBoxName + // + textBoxName.Location = new Point(112, 8); + textBoxName.Margin = new Padding(3, 2, 3, 2); + textBoxName.Name = "textBoxName"; + textBoxName.Size = new Size(225, 23); + textBoxName.TabIndex = 1; + // + // textBoxAdress + // + textBoxAdress.Location = new Point(112, 43); + textBoxAdress.Margin = new Padding(3, 2, 3, 2); + textBoxAdress.Name = "textBoxAdress"; + textBoxAdress.Size = new Size(225, 23); + textBoxAdress.TabIndex = 3; + // + // labelAdress + // + labelAdress.AutoSize = true; + labelAdress.Location = new Point(10, 46); + labelAdress.Name = "labelAdress"; + labelAdress.Size = new Size(46, 15); + labelAdress.TabIndex = 2; + labelAdress.Text = "Адрес: "; + // + // buttonCancel + // + buttonCancel.Location = new Point(259, 343); + buttonCancel.Margin = new Padding(3, 2, 3, 2); + buttonCancel.Name = "buttonCancel"; + buttonCancel.Size = new Size(114, 31); + buttonCancel.TabIndex = 5; + buttonCancel.Text = "Отмена"; + buttonCancel.UseVisualStyleBackColor = true; + buttonCancel.Click += buttonCancel_Click; + // + // buttonSave + // + buttonSave.Location = new Point(139, 343); + buttonSave.Margin = new Padding(3, 2, 3, 2); + buttonSave.Name = "buttonSave"; + buttonSave.Size = new Size(114, 31); + buttonSave.TabIndex = 6; + buttonSave.Text = "Сохранить"; + buttonSave.UseVisualStyleBackColor = true; + buttonSave.Click += buttonSave_Click; + // + // dataGridView + // + dataGridView.AllowUserToAddRows = false; + dataGridView.AllowUserToDeleteRows = false; + dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView.Columns.AddRange(new DataGridViewColumn[] { id, ComputerName, Count }); + dataGridView.Location = new Point(9, 109); + dataGridView.Margin = new Padding(3, 2, 3, 2); + dataGridView.Name = "dataGridView"; + dataGridView.ReadOnly = true; + dataGridView.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.None; + dataGridView.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders; + dataGridView.RowTemplate.Height = 29; + dataGridView.Size = new Size(395, 230); + dataGridView.TabIndex = 7; + // + // id + // + id.HeaderText = "id"; + id.MinimumWidth = 6; + id.Name = "id"; + id.ReadOnly = true; + id.Visible = false; + // + // ComputerName + // + ComputerName.HeaderText = "Компьютер"; + ComputerName.MinimumWidth = 6; + ComputerName.Name = "ComputerName"; + ComputerName.ReadOnly = true; + // + // Count + // + Count.HeaderText = "Количество"; + Count.MinimumWidth = 6; + Count.Name = "Count"; + Count.ReadOnly = true; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(10, 77); + label1.Name = "label1"; + label1.Size = new Size(87, 15); + label1.TabIndex = 8; + label1.Text = "Дата открытия"; + // + // dateTimeOpen + // + dateTimeOpen.Location = new Point(112, 77); + dateTimeOpen.Margin = new Padding(3, 2, 3, 2); + dateTimeOpen.Name = "dateTimeOpen"; + dateTimeOpen.Size = new Size(225, 23); + dateTimeOpen.TabIndex = 9; + // + // FormShop + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(419, 385); + Controls.Add(dateTimeOpen); + Controls.Add(label1); + Controls.Add(dataGridView); + Controls.Add(buttonSave); + Controls.Add(buttonCancel); + Controls.Add(textBoxAdress); + Controls.Add(labelAdress); + Controls.Add(textBoxName); + Controls.Add(labelName); + Margin = new Padding(3, 2, 3, 2); + Name = "FormShop"; + Text = "Магазин"; + Load += FormShop_Load; + ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private Label labelName; + private TextBox textBoxName; + private TextBox textBoxAdress; + private Label labelAdress; + private Button buttonCancel; + private Button buttonSave; + private DataGridView dataGridView; + private DataGridViewTextBoxColumn id; + private DataGridViewTextBoxColumn ComputerName; + private DataGridViewTextBoxColumn Count; + private Label label1; + private DateTimePicker dateTimeOpen; + } +} \ No newline at end of file diff --git a/ComputersShop/ComputersShopView/FormShop.cs b/ComputersShop/ComputersShopView/FormShop.cs new file mode 100644 index 0000000..c430b6c --- /dev/null +++ b/ComputersShop/ComputersShopView/FormShop.cs @@ -0,0 +1,127 @@ +using ComputersShopContracts.BindingModels; +using ComputersShopContracts.BusinessLogicsContracts; +using ComputersShopContracts.SearchModels; +using ComputersShopDataModels.Models; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ComputersShopView +{ + public partial class FormShop : Form + { + private readonly ILogger _logger; + private readonly IShopLogic _logic; + private int? _id; + public int Id { set { _id = value; } } + private Dictionary _ShopComputers; + private DateTime? _openingDate = null; + public FormShop(ILogger logger, IShopLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + _ShopComputers = new Dictionary(); + } + + private void FormShop_Load(object sender, EventArgs e) + { + if (_id.HasValue) + { + _logger.LogInformation("Загрузка магазина"); + try + { + var view = _logic.ReadElement(new ShopSearchModel + { + Id = _id.Value + }); + if (view != null) + { + textBoxName.Text = view.ShopName; + textBoxAdress.Text = view.Adress; + dateTimeOpen.Value = view.OpeningDate; + _ShopComputers = view.ShopComputers ?? new Dictionary(); + LoadData(); + } + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка загрузки магазина"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + private void LoadData() + { + _logger.LogInformation("Загрузка изделий в магазине"); + try + { + if (_ShopComputers != null) + { + dataGridView.Rows.Clear(); + foreach (var sr in _ShopComputers) + { + dataGridView.Rows.Add(new object[] { sr.Key, sr.Value.Item1.ComputerName, sr.Value.Item2 }); + } + } + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка загрузки изделий магазина"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(textBoxName.Text)) + { + MessageBox.Show("Заполните название", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + if (string.IsNullOrEmpty(textBoxAdress.Text)) + { + MessageBox.Show("Заполните адрес", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + _logger.LogInformation("Сохранение магазина"); + try + { + var model = new ShopBindingModel + { + Id = _id ?? 0, + ShopName = textBoxName.Text, + Adress = textBoxAdress.Text, + OpeningDate = dateTimeOpen.Value + }; + var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model); + if (!operationResult) + { + throw new Exception("Ошибка при сохранении. Дополнительная информация в логах."); + } + MessageBox.Show("Сохранение прошло успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); + DialogResult = DialogResult.OK; + Close(); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка сохранения магазина"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + Close(); + } + } +} diff --git a/ComputersShop/ComputersShopView/FormShop.resx b/ComputersShop/ComputersShopView/FormShop.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ComputersShop/ComputersShopView/FormShop.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ComputersShop/ComputersShopView/FormShops.Designer.cs b/ComputersShop/ComputersShopView/FormShops.Designer.cs new file mode 100644 index 0000000..9fc85ce --- /dev/null +++ b/ComputersShop/ComputersShopView/FormShops.Designer.cs @@ -0,0 +1,113 @@ +namespace ComputersShopView +{ + partial class FormShops + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + dataGridView = new DataGridView(); + buttonAdd = new Button(); + buttonUpd = new Button(); + buttonDel = new Button(); + buttonRef = new Button(); + ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); + SuspendLayout(); + // + // dataGridView + // + dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView.Location = new Point(12, 12); + dataGridView.Name = "dataGridView"; + dataGridView.RowTemplate.Height = 25; + dataGridView.Size = new Size(534, 163); + dataGridView.TabIndex = 0; + // + // buttonAdd + // + buttonAdd.Location = new Point(46, 181); + buttonAdd.Name = "buttonAdd"; + buttonAdd.Size = new Size(109, 33); + buttonAdd.TabIndex = 1; + buttonAdd.Text = "Добавить"; + buttonAdd.UseVisualStyleBackColor = true; + buttonAdd.Click += ButtonAdd_Click; + // + // buttonUpd + // + buttonUpd.Location = new Point(161, 181); + buttonUpd.Name = "buttonUpd"; + buttonUpd.Size = new Size(110, 33); + buttonUpd.TabIndex = 2; + buttonUpd.Text = "Изменить"; + buttonUpd.UseVisualStyleBackColor = true; + buttonUpd.Click += ButtonUpd_Click; + // + // buttonDel + // + buttonDel.Location = new Point(277, 181); + buttonDel.Name = "buttonDel"; + buttonDel.Size = new Size(109, 33); + buttonDel.TabIndex = 3; + buttonDel.Text = "Удалить"; + buttonDel.UseVisualStyleBackColor = true; + buttonDel.Click += ButtonDel_Click; + // + // buttonRef + // + buttonRef.Location = new Point(392, 181); + buttonRef.Name = "buttonRef"; + buttonRef.Size = new Size(109, 33); + buttonRef.TabIndex = 4; + buttonRef.Text = "Обновить"; + buttonRef.UseVisualStyleBackColor = true; + buttonRef.Click += ButtonRef_Click; + // + // FormShops + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(558, 230); + Controls.Add(buttonRef); + Controls.Add(buttonDel); + Controls.Add(buttonUpd); + Controls.Add(buttonAdd); + Controls.Add(dataGridView); + Name = "FormShops"; + Text = "FormShops"; + Load += FormShops_Load; + ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DataGridView dataGridView; + private Button buttonAdd; + private Button buttonUpd; + private Button buttonDel; + private Button buttonRef; + } +} \ No newline at end of file diff --git a/ComputersShop/ComputersShopView/FormShops.cs b/ComputersShop/ComputersShopView/FormShops.cs new file mode 100644 index 0000000..faf18a8 --- /dev/null +++ b/ComputersShop/ComputersShopView/FormShops.cs @@ -0,0 +1,115 @@ +using ComputersShop; +using ComputersShopContracts.BindingModels; +using ComputersShopContracts.BusinessLogicsContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ComputersShopView +{ + public partial class FormShops : Form + { + private readonly ILogger _logger; + private readonly IShopLogic _logic; + public FormShops(ILogger logger, IShopLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + } + private void FormShops_Load(object sender, EventArgs e) + { + LoadData(); + } + + private void LoadData() + { + try + { + var list = _logic.ReadList(null); + if (list != null) + { + dataGridView.DataSource = list; + dataGridView.Columns["Id"].Visible = false; + dataGridView.Columns["ShopComputers"].Visible = false; + dataGridView.Columns["ShopName"].AutoSizeMode = + DataGridViewAutoSizeColumnMode.Fill; + } + _logger.LogInformation("Загрузка магазинов"); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка загрузки магазинов"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void ButtonAdd_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormShop)); + if (service is FormShop form) + { + if (form.ShowDialog() == DialogResult.OK) + { + LoadData(); + } + } + } + + private void ButtonUpd_Click(object sender, EventArgs e) + { + if (dataGridView.SelectedRows.Count == 1) + { + var service = Program.ServiceProvider?.GetService(typeof(FormShop)); + if (service is FormShop form) + { + form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + if (form.ShowDialog() == DialogResult.OK) + { + LoadData(); + } + } + } + } + + private void ButtonDel_Click(object sender, EventArgs e) + { + if (dataGridView.SelectedRows.Count == 1) + { + if (MessageBox.Show("Удалить запись?", "Вопрос", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + _logger.LogInformation("Удаление магазина"); + try + { + if (!_logic.Delete(new ShopBindingModel + { + Id = id + })) + { + throw new Exception("Ошибка при удалении. Дополнительная информация в логах."); + } + LoadData(); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка удаления магазина"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + } + + private void ButtonRef_Click(object sender, EventArgs e) + { + LoadData(); + } + } +} diff --git a/ComputersShop/ComputersShopView/FormShops.resx b/ComputersShop/ComputersShopView/FormShops.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ComputersShop/ComputersShopView/FormShops.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ComputersShop/ComputersShopView/Program.cs b/ComputersShop/ComputersShopView/Program.cs index 483fa37..20d8e6c 100644 --- a/ComputersShop/ComputersShopView/Program.cs +++ b/ComputersShop/ComputersShopView/Program.cs @@ -52,6 +52,11 @@ namespace ComputersShop services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); } } } \ No newline at end of file -- 2.25.1 From 83cbe72539c1e08c731d8174cc91ccd161539065 Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Fri, 12 Apr 2024 20:11:17 +0400 Subject: [PATCH 5/7] =?UTF-8?q?1=20=D1=83=D1=81=D0=BB=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ComputersShop/ComputersShopView/FormMain.Designer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ComputersShop/ComputersShopView/FormMain.Designer.cs b/ComputersShop/ComputersShopView/FormMain.Designer.cs index 558ceba..553c019 100644 --- a/ComputersShop/ComputersShopView/FormMain.Designer.cs +++ b/ComputersShop/ComputersShopView/FormMain.Designer.cs @@ -170,6 +170,7 @@ menuStrip.PerformLayout(); ResumeLayout(false); PerformLayout(); + } #endregion -- 2.25.1 From 571bb58fdd2414056c45760b8bf00fdc8698b7b0 Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Fri, 12 Apr 2024 20:14:44 +0400 Subject: [PATCH 6/7] =?UTF-8?q?1=20=D1=83=D1=81=D0=BB=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ComputersShopListImplement/DataListSingleton.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ComputersShop/ComputersShopListImplement/DataListSingleton.cs b/ComputersShop/ComputersShopListImplement/DataListSingleton.cs index 67ff5d1..1a533b6 100644 --- a/ComputersShop/ComputersShopListImplement/DataListSingleton.cs +++ b/ComputersShop/ComputersShopListImplement/DataListSingleton.cs @@ -1,5 +1,9 @@ - -using ComputersShopListImplement.Models; +using ComputersShopListImplement.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; namespace ComputersShopListImplement { @@ -26,5 +30,4 @@ namespace ComputersShopListImplement return _instance; } } - } -- 2.25.1 From 85cb0676a3f6db477fa071fcc44923d2e89139b7 Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Fri, 12 Apr 2024 20:37:49 +0400 Subject: [PATCH 7/7] Revert "Initial commit" This reverts commit 213052e78bc53288bccd5883bf82e0bc501c042e. --- .gitignore | 400 ----------------------------------------------------- README.md | 2 - 2 files changed, 402 deletions(-) delete mode 100644 .gitignore delete mode 100644 README.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ca1c7a3..0000000 --- a/.gitignore +++ /dev/null @@ -1,400 +0,0 @@ -# ---> VisualStudio -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml - diff --git a/README.md b/README.md deleted file mode 100644 index 7fc36ad..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# ISEbd-21_Gruzdev_A.P._ComputersShop - -- 2.25.1