public ActionResult ViewUser(string UserId) { UserAdminData dataService = new UserAdminData(); ViewUser UserData = dataService.GetSpecificUser(UserId); return(View(UserData)); }
public ActionResult UserAdmin() { UserAdminData dataService = new UserAdminData(); List <UserAdminModel> users = dataService.GetAllUsers(); return(View("UserAdmin", users)); }
public ActionResult DeleteSpecificUser(string UserID) { UserAdminData dataService = new UserAdminData(); dataService.DeleteSpecificUser(UserID); return(RedirectToAction("UserAdmin", "Home")); }
public ActionResult ViewBug(int BugId) { BugData dataService = new BugData(); Bug bug = dataService.GetSpecificBug(BugId); UserAdminData userDataService = new UserAdminData(); List <UserAdminModel> Agents = userDataService.GetAllUsers(); List <BugComments> comments = dataService.GetSpecificBugComments(BugId); bug.Comments = comments; ViewBag.Data = dataService.GetAllBugStatus(); ViewBag.Agents = Agents; ViewBag.Priority = dataService.GetAllBugPriority(); return(View("ViewBug", bug)); }
public ActionResult UserForm(Models.ViewUser vu) { ViewBag.ID = Request.Form["ID"]; ViewBag.Email = Request.Form["InputEmail"]; ViewBag.AdditionalInfo = Request.Form["AdditionalInfo"]; ViewBag.Role = Request.Form["Role"]; ViewBag.CrudPermission = (Request.Form["CrudPermission"] == "on") ? 1 : 0; int?Role = (ViewBag.Role == "" ? 0 : Int32.Parse(ViewBag.Role)); UserAdminData dataService = new UserAdminData(); dataService.SaveSpecificUser(vu.ID, ViewBag.Email, ViewBag.AdditionalInfo, Role, ViewBag.CrudPermission); return(RedirectToAction("Index", "Home")); }