コード例 #1
0
 private static void Delete(Project toDelete)
 {
     ProjectRepo.Remove(toDelete);
     foreach (var employee in RelationProjectEmployeeRepo.GetEmployeesOnProject(toDelete.Name))
     {
         RelationProjectEmployeeRepo.Remove(RelationProjectEmployeeRepo.GetRelation(employee.Oib, toDelete.Name));
     }
 }
コード例 #2
0
 private void RemoveUncheckedEmployees()
 {
     foreach (var employeeItem in EmployeeListBox.Items)
     {
         if (EmployeeListBox.CheckedItems.Contains(employeeItem))
         {
             continue;
         }
         if (RelationProjectEmployeeRepo.IsEmployeeOnProject(employeeItem.ToString().GetOib(),
                                                             OldName))
         {
             RelationProjectEmployeeRepo.Remove(
                 RelationProjectEmployeeRepo.GetRelation(employeeItem.ToString().GetOib(),
                                                         OldName));
         }
     }
 }