예제 #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);
 }