public List <TaskModel> GetAll() { taskBusiness = new TaskBusiness(); var result = taskBusiness.GetAll(); return(result); }
private void DeveloperForm_Load(object sender, EventArgs e) { TaskBusiness _taskBusiness; _taskBusiness = new TaskBusiness(); List <Entities.Task> taskList = _taskBusiness.GetAll(); dgvTaskList.DataSource = taskList; }
private void TaskListForm_Load(object sender, EventArgs e) { dgvTask.DataSource = null; _businessTask = new TaskBusiness(); List <Entities.Task> taskList = _businessTask.GetAll(); var list = (from s in taskList select new { ID = s.ID, StartDate = s.BeginDate, EndDate = s.FinalDate, Employee = s.Employee.FirstName, Project = s.Project.Name, Status = s.Status, Description = s.Description }).ToList(); dgvTask.DataSource = list; }