Ejemplo n.º 1
0
        public ActionResult NewRequest()
        {
            MainFactory.getLogSvc().logAction("Console - New Request");
            ViewBag.Message = "New Request";

            EmployeeMgr employeeMgr = new EmployeeMgr(ConsoleFactory.getEmployeeSvc());
            Employee thisUser = (Employee)employeeMgr.getUser((IUser)Session["User"]);

            ViewData["user"] = Session["User"];
            ViewData["isAdmin"] = employeeMgr.isAdmin(thisUser);
            ViewData["groupManager"] = new NewRequestController().employeeManager(thisUser.ID);
            ViewData["groupName"] = new NewRequestController().employeeGroupName(thisUser.ID);

            return View("NewRequest");
        }
Ejemplo n.º 2
0
        public ActionResult NewRequest(NewRequestModel request, bool? success, string message)
        {
            if (request == null)
                return RedirectToAction("NewRequest");
            ViewBag.Message = "New Request";

            EmployeeMgr employeeMgr = new EmployeeMgr(ConsoleFactory.getEmployeeSvc());
            Employee thisUser = (Employee)employeeMgr.getUser((IUser)Session["User"]);

            ViewData["user"] = Session["User"];
            ViewData["isAdmin"] = employeeMgr.isAdmin(thisUser);
            ViewData["groupName"] = new NewRequestController().employeeGroupName(thisUser.ID);
            ViewData["groupManager"] = new NewRequestController().employeeManager(thisUser.ID);
            ViewData["displayMessage"] = message;
            ViewData["success"] = success;

            return View("NewRequest", request);
        }