public WareHouse(WareHouseEntity WareHouseEntity) : base(WareHouseEntity) { if (WareHouseEntity.InventoryEntities != null) { this.Inventories = new HashSet <Inventory>(); foreach (InventoryEntity InventoryEntity in WareHouseEntity.InventoryEntities) { InventoryEntity.WareHouseId = WareHouseEntity.Id; this.Inventories.Add(new Inventory(InventoryEntity)); } } if (WareHouseEntity.IssueNoteEntities != null) { this.IssueNotes = new HashSet <IssueNote>(); foreach (IssueNoteEntity IssueNoteEntity in WareHouseEntity.IssueNoteEntities) { IssueNoteEntity.WareHouseId = WareHouseEntity.Id; this.IssueNotes.Add(new IssueNote(IssueNoteEntity)); } } if (WareHouseEntity.ReceiptNoteEntities != null) { this.ReceiptNotes = new HashSet <ReceiptNote>(); foreach (ReceiptNoteEntity ReceiptNoteEntity in WareHouseEntity.ReceiptNoteEntities) { ReceiptNoteEntity.WareHouseId = WareHouseEntity.Id; this.ReceiptNotes.Add(new ReceiptNote(ReceiptNoteEntity)); } } }
public static void UpdateWareHouse(WareHouseEntity oWareHouse) { using (var db = new InventaryContext()) { db.WareHouses.Update(oWareHouse); db.SaveChanges(); } }
public WareHouseEntity Create(EmployeeEntity EmployeeEntity, WareHouseEntity WareHouseEntity) { WareHouse WareHouse = new WareHouse(WareHouseEntity); UnitOfWork.WareHouseRepository.AddOrUpdate(WareHouse); UnitOfWork.Complete(); return(Get(EmployeeEntity, WareHouse.Id)); }
public static void DeleteWareHouse(WareHouseEntity oWareHouse) { using (var db = new InventoryContext()) { db.WareHouses.Remove(oWareHouse); db.SaveChanges(); } }
public void CreateWareHouse(WareHouseEntity objWareHouse) { using (var db = new InventoryContext()) { db.WareHouses.Add(objWareHouse); db.SaveChanges(); } }
public static void CreateWareHouse(WareHouseEntity oWareHouse) { using (var db = new InventoryContext()) { oWareHouse.WarehouseId = Guid.NewGuid().ToString(); db.WareHouses.Add(oWareHouse); db.SaveChanges(); } }
public void SubmitForm(WareHouseEntity wareHouseEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { wareHouseEntity.Modify(keyValue); service.Update(wareHouseEntity); new LogApp().WriteDbLog("修改仓库:" + wareHouseEntity.WareName, DbLogType.Update); } else { wareHouseEntity.Create(); service.Insert(wareHouseEntity); new LogApp().WriteDbLog("新增仓库:" + wareHouseEntity.WareName, DbLogType.Create); } }
public ActionResult SubmitForm(WareHouseEntity wareHouseEntity, string keyValue) { wareHouseApp.SubmitForm(wareHouseEntity, keyValue); return(Success("操作成功。")); }
public WareHouseEntity Update(Guid WareHouseId, [FromBody] WareHouseEntity WareHouseEntity) { return(WareHouseService.Update(EmployeeEntity, WareHouseId, WareHouseEntity)); }
public WareHouseEntity Create([FromBody] WareHouseEntity WareHouseEntity) { return(WareHouseService.Create(EmployeeEntity, WareHouseEntity)); }