Пример #1
0
 private void buttonOk_Click(object sender, EventArgs e)
 {
     if (comboBoxPatients.SelectedItem != null)
     {
         patientDataSelected                  = new patient_class_datav3();
         patientDataSelected.user_id          = (comboBoxPatients.Items.IndexOf(comboBoxPatients.SelectedItem.ToString()) + 1).ToString();
         patientDataSelected.user_name        = comboBoxPatients.SelectedItem.ToString();
         patientDataSelected.user_institution = Program.datosCompartidos.institutionName;
         closeApp = false;
     }
     else
     {
         MessageBox.Show("To continue, select a registered patient or register a new patient with the New patient button.", "Patient not found.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         this.DialogResult = System.Windows.Forms.DialogResult.None;
     }
 }
Пример #2
0
 private void buttonOk_Click(object sender, EventArgs e)
 {
     if (camposCorrectamenteCompletados())
     {
         patientDataSelected                          = new patient_class_datav3();
         patientDataSelected.user_id                  = patientID.ToString();
         patientDataSelected.user_name                = textBoxUserName.Text;
         patientDataSelected.user_institution         = Program.datosCompartidos.institutionName;
         patientDataSelected.user_age                 = textBoxAge.Text;
         patientDataSelected.user_country             = comboBoxCountry.Text;
         patientDataSelected.user_email               = textBoxEmail.Text;
         patientDataSelected.user_gender              = getGenderFromControl();
         patientDataSelected.user_diagnosedConditions = getDiagnosedConditionFromControl();
         newUser = true;
     }
     else
     {
         this.DialogResult = DialogResult.None;
     }
 }
Пример #3
0
        private void AddPatient(patient_class_datav3 patient)
        {
            DataBaseWorker.AddUser(patient);

            updatePatientFile();
        }