Пример #1
0
        public async Task <ActionResult> CreateExternalOrderMessage(CreateExternalOrderRequest MyRequest)
        {
            string[] ProductEanList       = Request.Form["ProductEan[]"].ToArray();
            string[] ProductReferenceList = Request.Form["ProductReference[]"].ToArray();
            string[] Quantity             = Request.Form["Quantity[]"].ToArray();

            MyRequest._MyOrderIntegrationRequest.Order.OrderLineList = new ExternalOrderLine[ProductEanList.Length];
            for (int i = 0; i < ProductEanList.Length; i++)
            {
                if (ProductEanList[i] != "ProductEan")
                {
                    MyRequest._MyOrderIntegrationRequest.Order.OrderLineList[i] = new ExternalOrderLine()
                    {
                        ProductEan       = ProductEanList[i],
                        ProductReference = ProductReferenceList[i],
                        Quantity         = Convert.ToInt32(Quantity[i])
                    }
                }
                ;
            }

            MyRequest.GetHeaderMessage();
            SetSessionData(MyRequest);
            CreateExternalOrderMessage MyCreateExternalOrderMessage = new CreateExternalOrderMessage();

            return(View(await MyCreateExternalOrderMessage.GetMessage(MyRequest)));
        }
Пример #2
0
        public ActionResult CreateExternalOrderRequest()
        {
            Request MyRequest = new CreateExternalOrderRequest();

            GetSessionData(ref MyRequest);
            return(View(MyRequest));
        }