private void registrarSelectPatientButton_Click(object sender, EventArgs e) { SelectPersonForm registrarSelectPatient = new SelectPersonForm(); registrarSelectPatient.setRegistrarAddButtonEnableDisable(false); registrarSelectPatient.ShowDialog(this); }
private void doctorFindPatientButton_Click(object sender, EventArgs e) { SelectPersonForm doctorSelectPatient = new SelectPersonForm(); doctorSelectPatient.setRegistrarAddButtonEnableDisable(false); doctorSelectPatient.ShowDialog(this); idPatient = 0; try { idPatient = doctorSelectPatient.getID(); if (idPatient < 0) { throw new System.ArgumentException("Invalid index", "original"); } Patient patientSearchCriteria; patientSearchCriteria = new Patient(); patientSearchCriteria.id_patient = idPatient; this.doctorPatientNameTextBox.Text = doctorSelectPatient.getLname(); } catch (Exception ex) { // NIE RUSZAć !! //MessageBox.Show("Person not selected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); idPatient = -1; this.doctorPatientNameTextBox.Text = "All patients"; } }
private void registrarSelectDoctorButton_Click(object sender, EventArgs e) { DataLayer.Doctor d = new DataLayer.Doctor(); SelectPersonForm registrarSelectDoctor = new SelectPersonForm(d); registrarSelectDoctor.setRegistrarAddButtonEnableDisable(false); registrarSelectDoctor.ShowDialog(this); this.idDoctor = -1; this.idDoctor = registrarSelectDoctor.getID(); registrarTextBoxDoctor.Text = registrarSelectDoctor.getLname(); }
private void registrarSelectPatientButton_Click(object sender, EventArgs e) { if (modifyTrueAddFalse == true) { return; // modify form active! } SelectPersonForm registrarSelectPatient = new SelectPersonForm(); registrarSelectPatient.setRegistrarAddButtonEnableDisable(true); registrarSelectPatient.ShowDialog(this); }