public bool Update(ApiBatch apiBatch) { IBatchManager batchManager = UnityResolver.Resolve <IBatchManager>(); Batch batch = new Batch { ID = apiBatch.ID, Date = apiBatch.Date, Qty = apiBatch.Qty, UnitPrice = apiBatch.UnitPrice, ItemID = apiBatch.ItemID, SupplierID = apiBatch.SupplierID, CustomerID = apiBatch.CustomerID }; return(batchManager.UpdateBatch(batch)); }
public bool Update(ApiBatch apiBatch) { //string id = User.Identity.Name; IBatchManager batchManager = UnityResolver.Resolve <IBatchManager>(); Batch batch = new Batch { ID = apiBatch.ID, Date = apiBatch.Date, Qty = apiBatch.Qty, UnitPrice = apiBatch.UnitPrice, ItemID = apiBatch.ItemID, SupplierID = apiBatch.SupplierID, CustomerID = Helper.getCustID() }; return(batchManager.UpdateBatch(batch)); }