Ejemplo n.º 1
0
 /// <summary>
 /// Get data from a BIN file.
 /// </summary>
 private static List <Hospital> GetDataFromBIN()
 {
     try
     {
         return(HospitalUtilBIN.ReadFromBIN());
     }
     catch (DataInconsistencyException e)
     {
         Console.WriteLine(e.Message);
     }
     return(null);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Save hospitals to a BIN file.
 /// </summary>
 private static bool SaveToBIN(List <Hospital> hospitals)
 {
     try
     {
         return(HospitalUtilBIN.WriteToBIN(hospitals));
     }
     catch (DataInconsistencyException e)
     {
         Console.WriteLine(e.ToString() + ": " + e.Message);
     }
     return(false);
 }