Beispiel #1
0
        public ActionResult MainFunctionAddPage(MainFunctionViewModel model)
        {
            string message = String.Empty;

            message = model.addMainFunction(model.MainFunctionName);
            return(RedirectToAction("MainFunctionPage"));
        }
Beispiel #2
0
        public ActionResult MainFunctionPage(MainFunctionViewModel model)
        {
            string message = String.Empty;

            if (model.Active == "Add")
            {
                message = model.addMainFunction(model.MainFunctionName);
            }
            if (model.Active != null && model.Active.IndexOf("Edit") >= 0)
            {
                message = model.editMainFunction(model.Active.Split(',')[1]);
            }
            if (model.Active == "Delete")
            {
                message = model.deleteMainFunction();
            }
            //return View(model);
            return(RedirectToAction("MainFunctionPage"));
        }