public ActionResult Create(AdminViews views) { string userkey = ConfigurationManager.AppSettings["userkey"]; string uid = ConfigurationManager.AppSettings["uid"]; string LoginUser = (string)Session["LoginSAPID"]; try { Employer.Employer employer = new Employer.Employer(); var defineRole = employer.DefineView(views.MenuName, views.ControllerName, views.ActionName, "INP211", userkey, uid); var roleDetails = defineRole.Split('~'); if (roleDetails[0] != "01") { TempData["msg"] = roleDetails[1]; return(RedirectToAction("Index")); } else { TempData["error"] = roleDetails[1]; return(RedirectToAction("Index")); } } catch (Exception ex) { LogError logerror = new LogError(); logerror.ErrorLog("", LoginUser, "", "AdminViews/Create", "AdminViews", "Create", "DefineView Error", ex.Message.ToString(), 0); TempData["error"] = ex.Message.ToString(); ViewBag.Error = TempData["error"]; return(View()); } }