예제 #1
0
 private void buttonSave_Click(object sender, EventArgs e)
 {
     if (textBoxInfo.Text != "")
     {
         Record newRecord = ControlFunctions.CreateRecord(DateTime.Now, doctor, textBoxInfo.Text, patient.MedCard);
         string result    = ControlFunctions.AddRecord(newRecord);
         if (result == null)
         {
             this.Close();
         }
         else
         {
             MessageBox.Show(result);
         }
     }
     else
     {
         MessageBox.Show("Заполните поля");
     }
 }