Exemplo n.º 1
0
 /// <summary>
 /// delete one test
 /// </summary>
 /// <param name="test"></param>
 public void DeleteTest(Test test)
 {
     foreach (Test item in DataSource.tests)
     {
         if (item.Id == test.Id)
         {
             DataSource.tests.Remove(item);
             Dal_XML_imp.DeleteTest(item);
             testEvent(this, null);
             return;
         }
     }
     throw new Exception("failed to remove, test with the same ID not found");
 }