//
        // GET: /Picking/
        public ActionResult Index()
        {
            List<Entities.PickingOrder> pickingOrder=new List<Entities.PickingOrder>();
            OrderController ord = new OrderController();

            var orders = ord.Get().ToList();
            orders.ForEach(order=>
                {
                    pickingOrder.Add(new Entities.PickingOrder() { OrderId = order.Id, BarcodeUrl = "/Images/barcode/2.jpg", CustomerAddress = order.DeliveryAddress, DeliveryTime = order.DeliveryStartDate.ToString(), Postcode = order.DeliveryLocationCode });

                });
            //List<Entities.PickingOrder> order = FAAS.App_Start.Helper.GetPickingOrders().ToList();
            return View(pickingOrder);
        }
Exemple #2
0
        public ActionResult Payment(FAAS.Models.CheckoutModel model)
        {
            int ItemsCount = 0;
            double TotalBill = 0;

            Entities.Checkout chekout = new Entities.Checkout();

            chekout.CustmorID = 1;
            try
            {

                //Make Confirm Call

                OrderController placeOrder = new OrderController();
                TescoFAAS.Entities.Order order = new TescoFAAS.Entities.Order();

                order.CustomerId = model.CustmorID;
                order.CustomerName = model.CustomerName;
                order.DeliveryAddress = model.DeliveryAddress;
                order.DeliveryCharge = model.DeliveryCharge;
                order.DeliveryLocationCode = model.DeliveryLocationCode;
                order.DeliveryStartDate = model.DeliveryStartDate;
                order.DeliveryEndDate = model.DeliveryEndDate;
                //order.Id = RandomNumber(50000,60000);
                order.Items = model.ProdcutItems;
                order.MobileNo = model.MobileNo;
                order.TotalItemCount = model.TotalItemQty;
                order.TotalPrice = model.TotalPrice;
                order.Status = TescoFAAS.Entities.OrderStatus.Confirm;
                order.WebcutoffDateTime = DateTime.Today.AddHours(8);

                int orderID = placeOrder.Post(order);
                model.OrderId = orderID;
                chekout.OrderId = orderID;
                //foreach (var prodct in model.productItems)
                //{
                //    if (prodct.IsSelected)
                //    {
                //        ItemsCount++;
                //        TotalBill += prodct.Price * prodct.Qty;
                //    }
                //}
            }
            catch (Exception ex)
            {

            }

            chekout.ItemQty = ItemsCount;
            chekout.TotalPrice = TotalBill;

            return View("ConfirmOrder", model);
        }