Exemple #1
0
        private void searchButton_Click(object sender, EventArgs e)
        {
            String lastNameQuery = searchBox.Text.ToUpper();

            PimsMain.Program.currentPatient = null;
            //Open MainGrid
            if (PimsMain.Program.currentUser is PIMSController.Volunteer)
            {
                volunteerGrid volGrid = new volunteerGrid(lastNameQuery);
                volGrid.Visible = true;
                this.Hide();
            }
            else if (PimsMain.Program.currentUser is PIMSController.Doctor ||
                     PimsMain.Program.currentUser is PIMSController.MedStaff ||
                     PimsMain.Program.currentUser is PIMSController.OfficeStaff)
            {
                mainGrid MainGrid = new mainGrid(lastNameQuery);
                MainGrid.Visible = true;
                //Hide mainForm
                this.Hide();
            }
            else
            {
                // This case should not happen, but here just in case
                MessageBox.Show("Invalid User! Closing Program",
                                "Invalid User", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            String lastNameQuery = queryTextBox.Text.ToUpper();

            //Open MainGrid
            if (PimsMain.Program.currentUser is PIMSController.Volunteer)
            {
                volunteerGrid volGrid = new volunteerGrid(lastNameQuery);
                volGrid.Visible = true;
                this.Hide();
            }
            else if (PimsMain.Program.currentUser is PIMSController.Doctor ||
                    PimsMain.Program.currentUser is PIMSController.MedStaff ||
                    PimsMain.Program.currentUser is PIMSController.OfficeStaff)
            {
                mainGrid MainGrid = new mainGrid(lastNameQuery);
                MainGrid.Visible = true;
                //Hide mainForm
                this.Hide();
            }
            else
            {
                MessageBox.Show("Invalid User! Closing Program",
                        "Invalid User", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }
        }
Exemple #3
0
        private void volunteerGridToolStripMenuItem_Click(object sender, EventArgs e)
        {
            volunteerGrid vol = new volunteerGrid(PimsMain.Program.currentPatient.directory.lName.ToUpper());

            vol.Visible = true;
            this.Hide();
        }
Exemple #4
0
 private void searchButton_Click(object sender, EventArgs e)
 {
     String lastNameQuery = textBox1.Text.ToUpper();
     PimsMain.Program.currentPatient = null;
     //Open MainGrid
     if (PimsMain.Program.currentUser is PIMSController.Volunteer)
     {
         volunteerGrid volGrid = new volunteerGrid(lastNameQuery);
         volGrid.Visible = true;
         this.Hide();
     }
     else if (PimsMain.Program.currentUser is PIMSController.Doctor ||
             PimsMain.Program.currentUser is PIMSController.MedStaff ||
             PimsMain.Program.currentUser is PIMSController.OfficeStaff)
     {
         mainGrid MainGrid = new mainGrid(lastNameQuery);
         MainGrid.Visible = true;
         //Hide mainForm
         this.Hide();
     }
     else
     {
         // This case should not happen, but here just in case
         MessageBox.Show("Invalid User! Closing Program",
                 "Invalid User", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Application.Exit();
     }
 }
Exemple #5
0
 private void volunteerGridToolStripMenuItem_Click(object sender, EventArgs e)
 {
     volunteerGrid vol = new volunteerGrid(PimsMain.Program.currentPatient.directory.lName.ToUpper());
     
     vol.Visible = true;
     this.Hide();
 }