Esempio n. 1
0
        public bool Create(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.RecoredBatch(batch));
        }
Esempio n. 2
0
        public bool Create(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.RecoredBatch(batch));
        }