From f92d97e131d61020ca5c9bf34860b47e43d554be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=BA=20=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Mon, 12 Jun 2023 16:49:47 +0400 Subject: [PATCH] =?UTF-8?q?=D1=83=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=84=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BlacksmithWorkshop/FormMain.Designer.cs | 8 +++++++- .../BlacksmithWorkshopDatabase.cs | 2 ++ .../BlacksmithWorkshopFileImplement/DataFileSingleton.cs | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs index 1dd1bc7..0e316e2 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs @@ -245,12 +245,18 @@ private Button buttonCreateOrder; private Button buttonIssuedOrder; private Button buttonRef; - private ToolStripMenuItem reportsToolStripMenuItem; + private Button buttonSellManufacture; + private Button buttonFillStore; + private ToolStripMenuItem reportsToolStripMenuItem; private ToolStripMenuItem reportComponentsToolStripMenuItem; private ToolStripMenuItem reportManufactureComponentsToolStripMenuItem; private ToolStripMenuItem reportOrdersToolStripMenuItem; private ToolStripMenuItem clientsToolStripMenuItem; private ToolStripMenuItem implementersToolStripMenuItem; private ToolStripMenuItem doWorkToolStripMenuItem; + private ToolStripMenuItem reportToolStripMenuItem; + private ToolStripMenuItem reportStoresToolStripMenuItem; + private ToolStripMenuItem reportManufacturesInStoreToolStripMenuItem; + private ToolStripMenuItem reportGroupOrdersToolStripMenuItem; } } \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshopDatebaseImplement/BlacksmithWorkshopDatabase.cs b/BlacksmithWorkshop/BlacksmithWorkshopDatebaseImplement/BlacksmithWorkshopDatabase.cs index c02cc93..7f9815a 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopDatebaseImplement/BlacksmithWorkshopDatabase.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopDatebaseImplement/BlacksmithWorkshopDatabase.cs @@ -26,5 +26,7 @@ namespace BlacksmithWorkshopDatabaseImplement public virtual DbSet Orders { set; get; } public virtual DbSet Clients { set; get; } public virtual DbSet Implementers { set; get; } + public virtual DbSet ManufacturesInStore { set; get; } + public virtual DbSet Stores { set; get; } } } \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshopFileImplement/DataFileSingleton.cs b/BlacksmithWorkshop/BlacksmithWorkshopFileImplement/DataFileSingleton.cs index 1b10e20..7fb30d2 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopFileImplement/DataFileSingleton.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopFileImplement/DataFileSingleton.cs @@ -10,6 +10,7 @@ namespace BlacksmithWorkshopFileImplement private readonly string ManufactureFileName = "Manufacture.xml"; private readonly string ClientFileName = "Client.xml"; private readonly string ImplementerFileName = "Implementer.xml"; + private readonly string StoreFileName = "Store.xml"; public List Components { get; private set; } public List Orders { get; private set; } public List Manufactures { get; private set; } @@ -29,6 +30,7 @@ namespace BlacksmithWorkshopFileImplement public void SaveOrders() => SaveData(Orders, OrderFileName, "Orders", x => x.GetXElement); public void SaveClients() => SaveData(Clients, ClientFileName, "Clients", x => x.GetXElement); public void SaveImplementers() => SaveData(Implementers, ImplementerFileName, "Implementer", x => x.GetXElement); + public void SaveStores() => SaveData(Stores, StoreFileName, "Stores", x => x.GetXElement); private DataFileSingleton() { Components = LoadData(ComponentFileName, "Component", x => Component.Create(x)!)!; @@ -36,6 +38,7 @@ namespace BlacksmithWorkshopFileImplement Orders = LoadData(OrderFileName, "Order", x => Order.Create(x)!)!; Clients = LoadData(ClientFileName, "Client", x => Client.Create(x)!)!; Implementers = LoadData(ImplementerFileName, "Implementer", x => Implementer.Create(x)!)!; + Stores = LoadData(StoreFileName, "Store", x => Store.Create(x)!)!; } private static List? LoadData(string filename, string xmlNodeName, Func selectFunction) {