public ActionResult MapRole(string menuId, string parentId, string roleId) { string userkey = ConfigurationManager.AppSettings["userkey"]; string uid = ConfigurationManager.AppSettings["uid"]; string LoginUser = (string)Session["LoginSAPID"]; try { Employer.Employer employer = new Employer.Employer(); var mapResult = employer.MapRoleView(menuId, parentId, roleId, "INP211", userkey, uid); var mapDetails = mapResult.Split('~'); if (mapDetails[0] != "01") { TempData["msg"] = mapDetails[1]; return(RedirectToAction("EditRole")); } else { TempData["error"] = mapDetails[1]; return(RedirectToAction("EditRole")); } } catch (Exception ex) { LogError logerror = new LogError(); logerror.ErrorLog("", LoginUser, "", "AdminViews/UnMapView", "AdminViews", "UnMapView", "UnMapRoleView Error", ex.Message.ToString(), 0); TempData["error"] = ex.Message.ToString(); ViewBag.Error = TempData["error"]; return(RedirectToAction("EditRole")); } }