static public void ResetOrder() { LocalOrder = new client_order_sets() { status = (short)WarehouseOrderStatus.ReadyToOrder }; }
static public void DeleteById(int id) { using (var db = new StudiaProjektBazyDanychEntities()) { client_order_sets client_order_set = db.client_order_sets.SingleOrDefault(x => x.id == id); var entry = db.Entry(client_order_set); if (entry.State == System.Data.Entity.EntityState.Detached) { db.client_order_sets.Attach(client_order_set); } db.client_order_sets.Remove(client_order_set); db.SaveChanges(); } }
static public void AddWholeOrderToReclamation(client_order_sets tempOrder) { if (tempOrder.cases != null) { AddCasesToReclamation(tempOrder.cases, (int)tempOrder.case_amount); } if (tempOrder.graphics_cards != null) { AddGraphicCardsToReclamation(tempOrder.graphics_cards, (int)tempOrder.graphics_card_amount); } if (tempOrder.motherboards != null) { AddMotherboardToReclamation(tempOrder.motherboards, (int)tempOrder.motherboard_amount); } if (tempOrder.processors != null) { AddProcessorToReclamation(tempOrder.processors, (int)tempOrder.processor_amount); } if (tempOrder.ram_memories != null) { AddRamMemoriesToReclamation(tempOrder.ram_memories, (int)tempOrder.ram_memory_amount); } }