Пример #1
0
 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);
        }
Пример #3
0
        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();
            }
        }