Пример #1
0
        public ActionResult Edit(int id)
        {
            var model        = new CreateEditViewModel();
            var deliveryTime = deliveryTimeProvider.GetDeliveryTime(id);

            Mapper.DynamicMap(deliveryTime, model);
            return(View(model));
        }
Пример #2
0
        public void DoCheckOut(DateTime deliveryDate, byte deliveryTime, string voucherCode)
        {
            var delivTime = deliveryTimeProvider.GetDeliveryTime(Convert.ToInt32(deliveryTime));

            MyCart.DeliveryDate     = deliveryDate;
            MyCart.DeliveryTime     = deliveryTime;
            MyCart.DeliveryTimeName = delivTime.Name;
            MyCart.VoucherCode      = voucherCode;
        }
Пример #3
0
        public ActionResult OrderHistoryDetail(int orderId)
        {
            var viewModel = new OrderHistoryDetailViewModel();
            var order     = orderProvider.GetOrder(orderId);

            viewModel.SelectedOrder        = order;
            viewModel.SelectedOrderDetails = orderProvider.GetOrderDetails(orderId);
            viewModel.DeliveryTimeName     = deliveryTimeProvider.GetDeliveryTime(order.DeliveryTime).Name;
            //viewModel.StatusHistories = orderProvider.GetOrderStatusHistories(orderId);
            viewModel.PaymentConfirmation = orderProvider.GetPaymentConfirmation(orderId);
            if (!orderProvider.ValidateOrderOwner(orderId, CurrentUserName))
            {
                return(RedirectToAction("OrderHistory"));
            }

            return(PartialView(viewModel));
        }