public ActionResult EditRole(int roleId, string roleName) { logics = new GeneralLogics(); if (logics.ContainsOnlyAlphabets(roleName)) { businessLogics = new BusinessLogics(); var result = businessLogics.EditRole(roleId, roleName); if (result == 1) { return(RedirectToAction("Index", "SiteRoleManagement")); } else if (result == 0) { ViewBag.ErrorMsg = "No role found with the associated Id."; } else if (result == 3) { ViewBag.ErrorMsg = "Role already exists"; } else { ViewBag.ErrorMsg = "Internal Error occured while modifying role."; } } else { ViewBag.ErrorMsg = "Invalid Role name entered"; } return(RedirectToAction("Index", "SiteRoleManagement")); }