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)); }