private void AddPatient(object sender, SavePatientEventArgs args) { /* Update Database */ backend.SavePatient(args.patient); patients.Add(args.patient); lstPatients.Items.Refresh(); }
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(); }
private void SavePatient(object sender, SavePatientEventArgs args) { /* Update DataBase */ backend.SavePatient(args.patient); }