public ActionResult Edit(string id) { var roleDelegationModel = new RoleDelegationModel(); var roleDelegationToEdit = roleDelegationModel.GetSpecificRoleDeletagion(int.Parse(id)); return(View(roleDelegationToEdit)); }
public ActionResult Index(string SearchDelegatedFrom, string SearchDelegatedTo, string SearchDateFrom, string SearchDateTo) { var roleDelegationModel = new RoleDelegationModel(); var roleDelegationList = roleDelegationModel.GetListOfRoleDelegations(SearchDelegatedFrom, SearchDelegatedTo, SearchDateFrom, SearchDateTo); return(View(roleDelegationList)); }
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)); }