public void InitViewBag() { ViewBag.categories = _ticketCategoryDao.GetAll().ToList(); ViewBag.statuses = _ticketStatusDao.GetAll().ToList(); ViewBag.environments = _environmentDao.GetAll().ToList(); ViewBag.maintainers = _userDao.GetMaintainers(); ViewBag.equipments = _equipmentDao.GetAll().ToList(); }
public ActionResult Index() { if (User.IsInRole("maintainer")) { User user = _userDao.GetByEmail(User.Identity.Name); ViewBag.myTickets = _ticketDao.GetUndoneForUser(user.Id); ViewBag.myControls = _controlDao.GetUndoneForUser(user.Id); return(View("Maintainer")); } if (User.IsInRole("employee")) { ViewBag.categories = _ticketCategoryDao.GetAll().ToList(); ViewBag.environments = _environmentDao.GetAll().ToList(); return(View("Employee")); } ViewBag.openTickets = _ticketDao.GetNotAssignedTickets(); ViewBag.solvingTickets = _ticketDao.GetSolvingTickets(); ViewBag.plannedControls = _controlDao.GetPlannedControls(); ViewBag.statuses = _ticketStatusDao.GetAll(); ViewBag.maintainers = _userDao.GetMaintainers(); return(View("Index")); }
public ActionResult Index() { ViewBag.statuses = _ticketStatusDao.GetAll().ToList(); return(View()); }
public TicketStatusController() { _ticketStatusDao = new TicketStatusDao(); _statuses = _ticketStatusDao.GetAll().ToList(); }