Exemplo n.º 1
0
        public bool Delete(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.DeleteBatch(batch));
        }
Exemplo n.º 2
0
        public bool Delete(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.DeleteBatch(batch));
        }