устранение конфликтов 1

This commit is contained in:
Мк Игорь 2023-06-12 16:49:47 +04:00
parent fced63adb3
commit f92d97e131
3 changed files with 12 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -26,5 +26,7 @@ namespace BlacksmithWorkshopDatabaseImplement
public virtual DbSet<Order> Orders { set; get; }
public virtual DbSet<Client> Clients { set; get; }
public virtual DbSet<Implementer> Implementers { set; get; }
public virtual DbSet<ManufactureInStore> ManufacturesInStore { set; get; }
public virtual DbSet<Store> Stores { set; get; }
}
}

View File

@ -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<Component> Components { get; private set; }
public List<Order> Orders { get; private set; }
public List<Manufacture> 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<T>? LoadData<T>(string filename, string xmlNodeName, Func<XElement, T> selectFunction)
{