示例#1
0
        private void patientFormToolStripMenuItem_Click(object sender, EventArgs e)
        {
            patientForm patient = new patientForm();

            patient.Visible = true;
            this.Hide();
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string currentID = "";
            int    count     = 0;

            // make sure just 1 is selected since it wont take radio buttons
            foreach (DataGridViewRow row in patientQueryDataGridView.Rows)
            {
                if (row.Cells[0].Value != null && row.Cells[0].Value.Equals("true"))
                {
                    count++;
                    currentID = row.Cells[1].Value.ToString();
                }
            }
            if (count == 0)
            {
                MessageBox.Show("Please select a patient.",
                                "Row selection error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (count != 1)
            {
                MessageBox.Show("Please select only one patient.",
                                "Row selection error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                foreach (PIMSController.Patient myPatient in patients)
                {
                    if (currentID != null && myPatient.directory.patientID == currentID)
                    {
                        selectedPatient = myPatient;
                    }
                }

                // open patient grid

                PimsMain.Program.currentPatient = PIMSController.SQLcommands.buildPatient(selectedPatient.directory.patientID);
                patientForm myPatientForm = new patientForm();
                myPatientForm.Visible = true;
                // hide this one
                this.Hide();
            }
        }
示例#3
0
 private void patientFormToolStripMenuItem_Click(object sender, EventArgs e)
 {
     patientForm patient = new patientForm();
     patient.Visible = true;
     this.Hide();
 }
示例#4
0
        private void button1_Click(object sender, EventArgs e)
        {
            string currentID = "";
            int count = 0;
            // make sure just 1 is selected since it wont take radio buttons
            foreach (DataGridViewRow row in patientQueryDataGridView.Rows)
            {
                if (row.Cells[0].Value != null && row.Cells[0].Value.Equals("true"))
                {
                    count++;
                    currentID = row.Cells[1].Value.ToString();
                }
            }
            if (count == 0)
            {
                MessageBox.Show("Please select a patient.",
                    "Row selection error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (count != 1)
            {
                MessageBox.Show("Please select only one patient.",
                    "Row selection error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                foreach (PIMSController.Patient myPatient in patients)
                {
                    if(currentID != null && myPatient.directory.patientID == currentID)
                    {
                        selectedPatient = myPatient;
                    }
                }

                // open patient grid
                PimsMain.Program.currentPatient = selectedPatient;
                patientForm myPatientForm = new patientForm();
                myPatientForm.Visible = true;
                // hide this one
                this.Hide();

            }

        }