private void TestingSpecialistForm1_Load(object sender, EventArgs e) { var source = (from t in _tasksBusiness.GetAll() join et in _employeeTaskBusiness.GetAll() on t.TaskId equals et.TaskId into tet from te in tet.DefaultIfEmpty() join p in _projectBusiness.GetAll() on t.ProjetId equals p.ProjectId where t.StateId == 4 select new { p.ProjectName, t.TaskName, t.StartingDate, t.FinishDate, p.ProjectId, DeveloperID = te == null ? 0 : te.EmployeeId, }).ToList(); dgwTest.DataSource = source; }
public void FillDgw() { dgwList.DataSource = null; var source = (from t in _tasksBusiness.GetAll() join et in _employeeTasksBusiness.GetAll() on t.TaskId equals et.TaskId into tet from te in tet.DefaultIfEmpty() join p in _projectBusiness.GetAll() on t.ProjetId equals p.ProjectId where t.StateId == 3 select new { p.ProjectName, t.TaskId, t.TaskName, t.StartingDate, t.FinishDate, p.ProjectId, DeveloperID = te == null ? 0 : te.EmployeeId }).ToList(); dgwList.DataSource = source; }