public ActionResult ViewOrder() { OrdersModel ordersModel = new OrdersModel(); OrdersDTO ordersDTO = new OrdersDTO(); Guid userId = new Guid(Session["UserID"].ToString()); ordersDTO = oc.GetOrders(userId); ordersModel = orderMapper.Map <OrdersDTO, OrdersModel>(ordersDTO); return(View(ordersModel)); }
public ActionResult Index(bool IsOrderedChecked, bool IsAcceptedChecked) { OrderContext orderContext = new OrderContext(); OrdersViewModel ordersVM = new OrdersViewModel { CompanyName = orderContext.GetCompanyName(), CustomerOrders = orderContext.GetOrders(IsOrderedChecked, IsAcceptedChecked) }; return(View(nameof(Index), ordersVM)); }
// GET: Order public ActionResult Index(OrdersViewModel ordersViewModel) { OrderContext orderContext = new OrderContext(); OrdersViewModel ordersVM = new OrdersViewModel { CompanyName = orderContext.GetCompanyName(), CustomerOrders = orderContext.GetOrders(true, true), }; return(View(nameof(Index), ordersVM)); }
public IEnumerable <Order> GetIncompleteOrders() { return(_orderContext.GetOrders().Where(x => x.Status != OrderStatus.Complete)); }
public IActionResult Index() { return(Ok(_context.GetOrders())); }