Esempio n. 1
0
        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));
        }
Esempio n. 4
0
 public IEnumerable <Order> GetIncompleteOrders()
 {
     return(_orderContext.GetOrders().Where(x => x.Status != OrderStatus.Complete));
 }
Esempio n. 5
0
 public IActionResult Index()
 {
     return(Ok(_context.GetOrders()));
 }