public ActionResult Create(int?projectid) { var projectMember = new ProjectMember(); if (projectid.HasValue) { projectMember.ProjectID = projectid.Value; } ViewBag.ProjectID = new SelectList(_projectService.Get(x => x.ToList().OrderBy(p => p.ShortName).ToList()), "ID", "ShortName"); ViewBag.EmployeeID = new SelectList(_employeeService.Get(x => x.Where(e => e.DismissalDate == null || e.DismissalDate > DateTime.Today).ToList().OrderBy(e => e.FullName).ToList()), "ID", "FullName"); ViewBag.ProjectRoleID = new SelectList(_projectRoleService.Get(x => x.ToList().OrderBy(pr => (pr.ShortName + pr.Title)).ToList()), "ID", "FullName"); return(View(projectMember)); }
public ActionResult Index() { return(View(_projectRoleService.Get(x => x.ToList()))); }