コード例 #1
0
        public ActionResult GetNotActive(int projectId, int firmId)
        {
            List <Employee> allFirmIdEmployees = (List <Employee>)employeeRepo.GetByFirmId(firmId);
            List <Employee> notActive          = new List <Employee>();

            Project project = projectRepo.GetById(projectId);

            ViewBag.ProjectId = projectId;
            ViewBag.FirmId    = firmId;

            foreach (Employee emp in allFirmIdEmployees)
            {
                emp.Projects = (List <Project>)projectRepo.GetByEmployeeId(emp.Id);
                if (!emp.Projects.Contains(project))
                {
                    notActive.Add(emp);
                }
            }

            return(View(notActive));
        }
コード例 #2
0
        public ActionResult EmployeeProjects(int employeeId)
        {
            var projects = projectRepo.GetByEmployeeId(employeeId);

            return(View(projects));
        }