Esempio n. 1
0
        //-----------------------------------ORDERS----------------------------------


        //Main Page
        public IActionResult Orders(string OrderNumber, string SortBy)
        {
            //Regular View
            if (OrderNumber == null && SortBy == null)
            {
                Security.AmberlyMarketDatabase  amberlyMarketDatabase = new Security.AmberlyMarketDatabase();
                List <Models.Admin.OrdersModel> ordersModel           = new List <Models.Admin.OrdersModel>();
                ordersModel = amberlyMarketDatabase.GetOrderDetails("Most Recent");
                return(View(ordersModel));
            }
            //Sorted Regular View
            else if (OrderNumber == null && SortBy != null)
            {
                Security.AmberlyMarketDatabase  amberlyMarketDatabase = new Security.AmberlyMarketDatabase();
                List <Models.Admin.OrdersModel> ordersModel           = new List <Models.Admin.OrdersModel>();
                ordersModel = amberlyMarketDatabase.GetOrderDetails(SortBy);
                return(View(ordersModel));
            }
            //Advanced Orders View
            else
            {
                Security.AmberlyMarketDatabase amberlyMarketDatabase = new Security.AmberlyMarketDatabase();
                return(View(amberlyMarketDatabase.GetAdvancedOrderDetails(OrderNumber)));
            }
        }
Esempio n. 2
0
 //Switch Order Status To Complete
 public bool changeOrderStatusToComplete(string OrderNumber)
 {
     Security.AmberlyMarketDatabase amberlyMarketDatabase = new Security.AmberlyMarketDatabase();
     return(amberlyMarketDatabase.UpdateOrderStatusToComplete(OrderNumber));
 }