Example #1
0
        public ViewOrdersWindow()
        {
            InitializeComponent();
            _openOrderWindows = new Dictionary <int, ViewOrderWindow>();

            _orderRepo = ServiceResolver.Get().Resolve <IOrderRepository>();

            _viewModel  = new ViewOrdersViewModel();
            DataContext = _viewModel;
        }
        public ActionResult ViewOrder(string StartDate, string EndDate)
        {
            ViewOrdersViewModel model = new ViewOrdersViewModel();

            if (!string.IsNullOrEmpty(StartDate) && !string.IsNullOrEmpty(EndDate))
            {
                model.OrderList = ViewOrdersModel.GetOrdersView(StartDate, EndDate);
            }
            if (model.OrderList != null && model.OrderList.Any())
            {
                return(View(model));
            }
            return(View(model));
        }
        //
        // GET: /Account/ViewOrders
        public async Task <ActionResult> ViewOrders()
        {
            var user = await GetCurrentUserAsync();

            if (user == null)
            {
                return(View("Error"));
            }
            var orderHistory = OrderHistory.GetOrderHistory(DbContext, user);

            var viewModel = new ViewOrdersViewModel
            {
                Orders     = await orderHistory.GetOrders(),
                OrderTotal = await orderHistory.GetOrdersTotal(),
            };

            return(View(viewModel));
        }
        public ActionResult ViewOrders()
        {


            var ViewModel = new ViewOrdersViewModel 
            {
                lViewOrders = new List<ViewOrders >
                {

                    new ViewOrders { OrderNumber="00001",OrderDate ="14/05/2017",Customer="Saleem",SalesMan="Andrew",Status="Open"},
                    new ViewOrders { OrderNumber="00002",OrderDate ="14/05/2017",Customer="Micheal",SalesMan="Andrew",Status="Open"},
                    new ViewOrders { OrderNumber="00003",OrderDate ="15/05/2017",Customer="Imran",SalesMan="Andrew",Status="Open"},
                    new ViewOrders { OrderNumber="00004",OrderDate ="16/05/2017",Customer="Tariq",SalesMan="Andrew",Status="Open"},
                    new ViewOrders { OrderNumber="00005",OrderDate ="17/05/2017",Customer="Sohail",SalesMan="Andrew",Status="Open"},
                    new ViewOrders { OrderNumber="00006",OrderDate ="17/05/2017",Customer="George Ahmed",SalesMan="Andrew",Status="Open"},
                    new ViewOrders { OrderNumber="00007",OrderDate ="17/05/2017",Customer="Kaleem Al Samee",SalesMan="Andrew",Status="Open"},
                    new ViewOrders { OrderNumber="00008",OrderDate ="20/05/2017",Customer="Mohammed Al Samee",SalesMan="Andrew",Status="Open"},


                }
            };
            return View(ViewModel);
           
        }
 public ActionResult ViewOrder(ViewOrdersViewModel view)
 {
     view.OrderList = ViewOrdersModel.GetOrdersView(view.StartDate, view.EndDate);
     return(View(view));
 }