void AddRangeEmployee(Task task) { selectedEmployees.ForEach(employee => { _taskService.AddEmployee(task, employee); }); }
public void AddEmployee() { var result = _taskService.AddEmployee(new Task() { Id = 4 }, new Employee() { Id = 1 }); Assert.AreEqual(true, result.IsSuccessful); }
private void btnAddMember_Click(object sender, System.EventArgs e) { var selected = (Employee)CmbEmployeeList.SelectedItem; if (selected == null) { MessageBox.Show("Choose an employee."); } else { _task.Data.Employees.Add(selected); _taskService.AddEmployee(_task.Data, selected); LoadData(); } }