Beispiel #1
0
 private void date_of_birth_text_TextChanged(object sender, TextChangedEventArgs e)
 {
     age_text.Text = "";
     if (date_of_birth_text.Text == "")
     {
         return;
     }
     if (!Regex.Match(date_of_birth_text.Text, @"\d{2}/\d{2}/\d{4}").Success)
     {
         return;
     }
     if (!_dateOfBirth.testDate(date_of_birth_text.Text))
     {
         MessageBox.Show(Helper_Classes_namespace.ErrorMessages.getErrorMessage());
         return;
     }
     if (!selectedFromDatgaSet)
     {
         dataSet = _dateOfBirth.getDateOfBirth(new List <Amazing_charts_sample_program_Patient_Format>(), getTextBoxData(new Patient()));
         if (dataSet.Count == 0)
         {
             MessageBox.Show(Helper_Classes_namespace.ErrorMessages.getErrorMessage());
             return;
         }
         createDataSet1(dataSet);
     }
     age_text.Text = _dateOfBirth.getAgeByBirthDate(date_of_birth_text.Text);
 }