private void button5_Click(object sender, EventArgs e) { CreateDemForm create = new CreateDemForm(); create.MdiParent = this.MdiParent; create.Show(); }
private void btnSelect_Click(object sender, EventArgs e) { _mySearchId = patientSearch.Text; dictionary = createCheckPatientExistsDictionary(_mySearchId); dc = new DatabaseConnector(); dtPatient = checkPatientExists(dictionary); if (int.Parse(dtPatient.Rows[0][0].ToString()) > 0) { ViewDemography cd = new ViewDemography(); cd.patientId = int.Parse(patientSearch.Text); patientSearch.Clear(); cd.MdiParent = this.MdiParent; cd.Show(); } else { MessageBox.Show("Patient does not exist."); DialogResult result = MessageBox.Show("Create New Patient Demography?", "New Demography", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == DialogResult.OK) { CreateDemForm create = new CreateDemForm(); create.MdiParent = this.MdiParent; create.Show(); } } }
private void btn_SearchPatient_Click(object sender, EventArgs e) { dictionary = new Dictionary <string, string>(); dc = new DatabaseConnector(); if (txt_Output.Text != "") { bool temp = false; int temp1; try { temp1 = Convert.ToInt32(txt_Output.Text); temp = true; } catch (Exception ex) { temp = false; } if (cm_Options.SelectedIndex == 1 && temp == true) { dictionary.Add("@patientId", txt_Output.Text); dtPatient = dc.getData("CheckPatientExists", dictionary); if (int.Parse(dtPatient.Rows[0][0].ToString()) != 0) { dataGridView2.Hide(); dataGridView1.Show(); this.getPatientByIdTableAdapter.Fill(getPatientByIdDataSet.GetPatientById, txt_Output.Text); } else { MessageBox.Show("Patient does not exist."); DialogResult result = MessageBox.Show("Create New Patient Demography?", "New Demography", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == DialogResult.OK) { CreateDemForm create = new CreateDemForm(); create.Show(); } } } else if (cm_Options.SelectedIndex == 2) { dictionary.Add("@patientName", txt_Output.Text); dtPatient = dc.getData("CheckPatientExistsByName", dictionary); if (dtPatient.Rows.Count != 0) { dataGridView1.Hide(); dataGridView2.Show(); this.getPatientByNameTableAdapter.Fill(getPatientByNameDataSet.GetPatientByName, txt_Output.Text.ToString()); } else { MessageBox.Show("Patient does not exist."); DialogResult result = MessageBox.Show("Create New Patient Demography?", "New Demography", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == DialogResult.OK) { CreateDemForm create = new CreateDemForm(); create.Show(); } } } else { MessageBox.Show("Please proper search text!"); txt_Output.Focus(); } } }
private void button5_Click(object sender, EventArgs e) { CreateDemForm create = new CreateDemForm(); create.MdiParent = this.MdiParent; create.Show(); }
public void testCreateDemFormCreate() { CreateDemForm a = new CreateDemForm(); Assert.IsNotNull(a); }