Esempio n. 1
0
 /// <summary>
 /// מחיקת נבחן מרשימת הנבחנים
 /// </summary>
 /// <param name="mytrainee">נבחן למחיקה</param>
 public void DeleteTrainee(Trainee mytrainee)
 {
     try
     {
         dal.DeleteTrainee(mytrainee);
         DateTime           today      = DateTime.Now;
         IEnumerable <Test> deleteTest = GetAllTest(t => (t.TraineeId == mytrainee.TraineeId) && (t.DateTimeOfTest > DateTime.Now));
         if (deleteTest.Count() != 0)
         {
             foreach (Test item in deleteTest)
             {
                 try
                 {
                     dal.DeletTest(item);
                 }
                 catch (Exception e)
                 {
                     throw e;
                 }
             }
         }
     }
     catch (Exception e) { throw e; }
 }