Exemple #1
0
        public ActionResult updateFoodOrder(FoodModel mdl, string Save, string Cancel, string Completed, string Reject)
        {
            if (!string.IsNullOrEmpty(Save))
            {
                FoodHelper.updateFoodOrder(mdl);
                mdl.foodOrder.Status = (int)Common.Enums.FoodOrderStatus.Open;
            }
            if (!string.IsNullOrEmpty(Cancel))
            {
                FoodHelper.deleteFoodOrder(mdl.foodOrder.OrderID);
            }
            if (!string.IsNullOrEmpty(Completed))
            {
                mdl.foodOrder.Status = (int)Common.Enums.FoodOrderStatus.Completed;


                FoodHelper.updateFoodOrder(mdl);
            }
            if (!string.IsNullOrEmpty(Reject))
            {
                mdl.foodOrder.Status = (int)Common.Enums.FoodOrderStatus.Rejected;


                FoodHelper.updateFoodOrder(mdl);
            }


            return(RedirectToAction("viewFoodOrder", new { locationID = mdl.locationID, profileID = mdl.profileID }));
        }
Exemple #2
0
        public ActionResult addFoodOrder(int locationID, int profileID)
        {
            FoodModel mdl = new FoodModel();

            mdl = FoodHelper.addFoodOrder(locationID, profileID);
            return(View("addFoodOrder", mdl));
        }
Exemple #3
0
        // GET: Food
        public ActionResult FoodMenuAdmin(int locationID, int profileID)
        {
            FoodModel mdl = new FoodModel();

            mdl = FoodHelper.FoodMenuAdmin(locationID, profileID);
            return(View("FoodMenuAdmin", mdl));
        }
Exemple #4
0
        public ActionResult processFoodOrder(int locationID, int profileID)
        {
            FoodModel mdl = new FoodModel();

            mdl           = FoodHelper.GetPendingFoodOrderList(locationID);
            mdl.profileID = profileID;
            return(View("processFoodOrder", mdl));
        }
Exemple #5
0
        public ActionResult editFoodOrder(int OrderID, int profileID, bool isAdmin)
        {
            FoodModel mdl = new FoodModel();

            mdl           = FoodHelper.editFoodOrder(OrderID);
            mdl.profileID = profileID;
            mdl.isAdmin   = isAdmin;
            return(View("editFoodOrder", mdl));
        }
Exemple #6
0
 public ActionResult saveFoodOrder(FoodModel mdl)
 {
     FoodHelper.saveFoodOrder(mdl);
     return(RedirectToAction("viewFoodOrder", new { locationID = mdl.locationID, profileID = mdl.profileID }));
 }
 public FoodController(ILogger <DataController> logger, IFoodRepository <Food> repo) : base(logger, repo)
 {
     helper = new FoodHelper <Food>(repo);
 }