예제 #1
0
        public ActionResult DelegateAuthority(int delegateAuthority, int employeeId)
        {
            //1 means assign
            int departmentId = Convert.ToInt32(RouteData.Values["departmentId"]);

            if (delegateAuthority == 1)
            {
                DepartmentDao.AssignTemporaryHead(departmentId, employeeId);
            }
            //2 means cancel
            else if (delegateAuthority == 2)
            {
                DepartmentDao.CancelTemporaryHead(departmentId, employeeId);
            }

            return(RedirectToAction("Delegate"));
        }