public ActionResult CurrentBugs() { BugData dataService = new BugData(); List <Bug> bugs = dataService.GetAllBugs(); ViewBag.Data = dataService.GetAllAgentUsernames(); ViewBag.Status = dataService.GetAllBugStatus(); ViewBag.Priority = dataService.GetAllBugPriority(); return(View("CurrentBugs", bugs)); }
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)); }