Пример #1
0
        // GET: ReceiptPlanLines/Create
        public async System.Threading.Tasks.Task <ActionResult> Create(int receiptPlanId, int supplierId)
        {
            ReceiptPlanLinesEdit receiptPlanLinesEdit = new ReceiptPlanLinesEdit()
            {
                ReceiptPlanId = receiptPlanId
            };
            Dictionary <string, string> paramList = new Dictionary <string, string>();

            paramList.Add("supplierId", supplierId.ToString());
            receiptPlanLinesEdit.VPurchaseOrderLines = await new HttpClientLib().GetByAsync <IEnumerable <VPurchaseOrderLines> >("API", "/api/PurchaseOrderLines/GetPurchaseOrderLinesBySupplier/", paramList);
            return(View(receiptPlanLinesEdit));
        }
Пример #2
0
        public async System.Threading.Tasks.Task <ActionResult> Create2(int purchaseOrderId, int purchaseOrderLineNo, int receiptPlanId)
        {
            ReceiptPlanLinesEdit receiptPlanLinesEdit = new ReceiptPlanLinesEdit()
            {
                PurchaseOrderId     = purchaseOrderId,
                PurchaseOrderLineNo = purchaseOrderLineNo,
                ReceiptPlanId       = receiptPlanId
            };
            Dictionary <string, string> paramList = new Dictionary <string, string>();

            paramList.Add("purchaseOrderId", purchaseOrderId.ToString());
            IEnumerable <VPurchaseOrderLines> purchaseOrderLines = await new HttpClientLib().GetByAsync <IEnumerable <VPurchaseOrderLines> >("API", "/api/PurchaseOrderLines/", paramList);

            receiptPlanLinesEdit.VPurchaseOrderLine = purchaseOrderLines.FirstOrDefault(x => x.PurchaseOrderId == purchaseOrderId && x.PurchaseOrderLineNo == purchaseOrderLineNo);
            return(View(receiptPlanLinesEdit));
        }