Пример #1
0
 public void updateDataBase(System.Windows.Forms.NumericUpDown numericUpDownInstitutionID, institution_class_data institutionDataSelected)
 {
     try
     {
         if (institutionsList != null && institutionsList.Count > 0)
         {
             if (numericUpDownInstitutionID.Value > Convert.ToDecimal(institutionsList.Last().institution_id))
             {
                 DataBaseWorker.AddInstitution(institutionDataSelected);
             }
         }
         else
         {
             institutionsList = new List <institution_class_data>();
             institutionsList.Add(institutionDataSelected);
             DataBaseWorker.AddInstitution(institutionDataSelected);
         }
     }
     catch (Exception ex)
     {
         ErrorLog.ErrorLog.toErrorFile(ex.GetBaseException().ToString());
     }
 }