public ActionResult Create(User_Role_Delegation roleDelegation) { if (ModelState.IsValid) { var roleDelegationModel = new RoleDelegationModel(); var createRoleDelegation = roleDelegationModel.CreateRoleDelegation(roleDelegation.From_User_Id, roleDelegation.To_User_Id, roleDelegation.Date_From, roleDelegation.Date_To); if (createRoleDelegation == null) { ViewBag.Message = "An Error Occured, Please contact Support"; return(View(roleDelegation)); } return(RedirectToAction("Index", "RoleDelegation")); } return(View(roleDelegation)); }
public ActionResult Create() { var roleDelegation = new User_Role_Delegation(); return(View(roleDelegation)); }