public async Task <ActionResult> OrderDetails(string orderCode)
        {
            var output    = _sellAppService.GetOrderDetails(orderCode);
            var viewModel = new OrderDetailListViewModel(output);

            return(View(viewModel));
        }
Esempio n. 2
0
        public IActionResult Viewss(int ID, string customer, decimal total)
        {
            var model = new OrderDetailListViewModel();

            model.customer     = customer;
            model.total        = total;
            model.OrderDetails = _orderDetailRepository.GetAllOrderDetailsByOrderId(ID);
            return(PartialView("_View", model));
        }
Esempio n. 3
0
        public async Task <IActionResult> OrderHistoryDetail(int id)
        {
            var orderDetails = await _orderService.GetOrderDetailsForOrder(id);

            var viewMod = new OrderDetailListViewModel
            {
                OrderDetails = orderDetails
            };

            return(PartialView(viewMod));
        }
Esempio n. 4
0
        // get content of current cart/order
        public OrderDetailListViewModel GetCartDetailList(int orderId)
        {
            OrderDetailListViewModel cartDetails = new OrderDetailListViewModel();

            cartDetails.OrderDetailList = _myContex.OrderDetails
                                          .Where(c => c.OrderId == orderId)
                                          .Select(x => new OrderDetailViewModel
            {
                OrderDetailId           = x.OrderDetailId,
                OrderId                 = x.OrderId,
                ProductName             = x.ProductName,
                ProductSymbol           = x.ProductSymbol,
                Price                   = x.Price,
                Quantity                = x.Quantity,
                CurrentStockInWholesale = x.CurrentStockInWholesale,
            }).ToList();

            return(cartDetails);
        }
Esempio n. 5
0
        // get content of one order
        public OrderDetailListViewModel GetOrderDetails(int orderId)
        {
            OrderDetailListViewModel orderDetails = new OrderDetailListViewModel();

            orderDetails.OrderDetailList = _myContex.OrderDetails
                                           .Where(c => c.OrderId == orderId)
                                           .Select(x => new OrderDetailViewModel
            {
                OrderDetailId = x.OrderDetailId,
                OrderId       = x.OrderId,
                ProductId     = x.ProductId,
                ProductName   = x.ProductName,
                ProductSymbol = x.ProductSymbol,
                Price         = x.Price,
                Quantity      = x.Quantity,
                Value         = x.Value
            }).ToList();

            return(orderDetails);
        }