Пример #1
0
 private void AddPatient(object sender, SavePatientEventArgs args)
 {
     /* Update Database */
     backend.SavePatient(args.patient);
     patients.Add(args.patient);
     lstPatients.Items.Refresh();
 }
Пример #2
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            //if (!Validation.GetHasError(txtName))
            //{
            //    System.Windows.MessageBox.Show("Patient name(" + txtName.Text + ") cannot be empty");
            //    txtName.Focus();
            //    return;
            //}
            _patient.Name    = txtName.Text;
            _patient.Address = txtAddress.Text;
            _patient.DoB     = dpDoB.SelectedDate.Value;

            SavePatientEventArgs args = new SavePatientEventArgs();

            args.patient = _patient;
            SavePatient(this, args);
            this.Close();
        }
Пример #3
0
 private void SavePatient(object sender, SavePatientEventArgs args)
 {
     /* Update DataBase */
     backend.SavePatient(args.patient);
 }