示例#1
0
 private void AddStudent()
 {
     try
     {
         string CNP, nume, prenume;
         double mediaAnuala;
         IOStudent(out CNP, out nume, out prenume, out mediaAnuala);
         appManager.AddStudent(CNP, nume, prenume, mediaAnuala);
     }
     catch (FormatException)
     {
         Trace.WriteLine("Va rog introduceti un numar real!");
         AddStudent();
     }
     catch (OverflowException)
     {
         Trace.WriteLine("Va rog introduceti un numar mai mic!");
         AddStudent();
     }
     catch (ValidationException e)
     {
         Trace.WriteLine(e.Message);
         Console.WriteLine("Va rog introduceti date valide!");
         AddStudent();
     }
     catch (RepositoryException e)
     {
         Trace.WriteLine(e.Message);
         Console.WriteLine("Va rog introduceti date valide!");
         AddStudent();
     }
 }