示例#1
0
        public string SaveDeliveredOrder(List <ScannedProduct> scannedProducts, Delivery aDelivery, int invoiceStatus, int orderStatus)
        {
            string refCode = _iCommonGateway.GetAllSubReferenceAccounts().ToList().Find(n => n.Id == Convert.ToInt32(ReferenceType.Distribution)).Code;

            aDelivery.VoucherNo = GetMaxVoucherNoByTransactionInfix(refCode);
            int maxRefNo    = _iInventoryGateway.GetMaxDeliveryRefNoOfCurrentYear();
            var deliveryRef = GenerateDeliveryReference(maxRefNo);

            aDelivery.DeliveryRef = deliveryRef;
            aDelivery.MessageModel.TransactionRef = deliveryRef;
            int rowAffected = _iInventoryGateway.SaveDeliveredOrder(scannedProducts, aDelivery, invoiceStatus, orderStatus);

            return(rowAffected > 0 ? "Saved Successfully!" : "Failed to Save");
        }
        public string SaveDeliveredOrder(List <ScannedProduct> scannedProducts, Delivery aDelivery, int invoiceStatus, int orderStatus)
        {
            int maxRefNo = _iInventoryGateway.GetMaxDeliveryRefNoOfCurrentYear();

            aDelivery.DeliveryRef = GenerateDeliveryReference(maxRefNo);
            int rowAffected = _iInventoryGateway.SaveDeliveredOrder(scannedProducts, aDelivery, invoiceStatus, orderStatus);

            return(rowAffected > 0 ? "Saved Successfully!" : "Failed to Save");
        }