public async Task <ActionResult> OrderDetails(string orderCode) { var output = _sellAppService.GetOrderDetails(orderCode); var viewModel = new OrderDetailListViewModel(output); return(View(viewModel)); }
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)); }
public async Task <IActionResult> OrderHistoryDetail(int id) { var orderDetails = await _orderService.GetOrderDetailsForOrder(id); var viewMod = new OrderDetailListViewModel { OrderDetails = orderDetails }; return(PartialView(viewMod)); }
// 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); }
// 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); }