Esempio n. 1
0
        public ActionResult Index(ValueMealViewModel VMViewModel, string value)
        {
            ValueMealManager VMManager = new ValueMealManager();

            VMViewModel = VMManager.SearchSingleValueMeal(value);
            VMViewModel.ValueMealList = VMManager.SearchValueMeals("ALL");
            return(View(VMViewModel));
        }
Esempio n. 2
0
        // GET: ValueMeal
        public ActionResult Index(string id)
        {
            UserAccessSession UASession = (UserAccessSession)Session["UserAccess"];

            if (UASession == null || !UASession.VAM)
            {
                return(RedirectToAction("Login", "Account"));
            }
            // Set NavBar Links accordingly
            Session["CurrentPage"] = new CurrentPageSession("VAM", "HOME", "LOG");

            ValueMealManager   VMManager   = new ValueMealManager();
            ValueMealViewModel VMViewModel = new ValueMealViewModel();

            if (id != null)
            {
                VMViewModel = VMManager.SearchSingleValueMeal(id);
                VMViewModel.ValueMealList = new List <ValueMeal>();
            }
            VMViewModel.ValueMealList = VMManager.SearchValueMeals("ALL");
            return(View(VMViewModel));
        }