public List <Task> SearchByResponsiblePeople(string employeeName) { if (DeptManageConsts.AssertNullOrEmpty(employeeName)) { var query = GetAll(); query = query.Where( task => task.Responsible.Name == employeeName ); return(query .OrderBy(task => task.ScheduleFinish) .ToList()); } else { return(new List <Task>()); } }
public List <Task> SearchByName(string taskName) { if (DeptManageConsts.AssertNullOrEmpty(taskName)) { var query = GetAll(); query = query.Where( task => task.TaskName.Contains(taskName) ); return(query .OrderBy(task => task.ScheduleFinish) .ToList()); } else { return(new List <Task>()); } }