private void btnYes_Click(object sender, EventArgs e) { if (txtPateintID.Text != null && txtPateintID.Text.Count() >= 1 && txtPatientName.Text != null) { try { int PateintID = Convert.ToInt16(txtPateintID.Text); var patientData = processPatient.getPateintByID(PateintID); DialogResult dResult = MessageBox.Show("Do you want to Edit details for the this report, for better look?", "Please Wait >>>>", MessageBoxButtons.YesNo, MessageBoxIcon.Stop); if (dResult.ToString() == "No") { btnYes.Text = "Wait..."; RptPateintInit rptPateintInit = new RptPateintInit(PateintID); rptPateintInit.InitialiazeReport(); } else { PatientEditForm.Instance(patientData).Show(); } } catch (Exception ex) { return; } } else { } }
public static PatientEditForm Instance(Patient patient) { if (_Instance == null || _Instance.IsDisposed) { _Instance = new PatientEditForm(patient); } return(_Instance); }