예제 #1
0
파일: nurseNotes.cs 프로젝트: imc0004/PIMS
        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();
            }
        }
예제 #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();
            }
        }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            String lastNameQuery = queryTextBox.Text.ToUpper();

            //Open MainGrid
            mainGrid MainGrid = new mainGrid(lastNameQuery);
            MainGrid.Visible = true;
            //Hide mainForm
            this.Hide();
        }
예제 #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            String lastNameQuery = queryTextBox.Text.ToUpper();

            //Open MainGrid
            mainGrid MainGrid = new mainGrid(lastNameQuery);

            MainGrid.Visible = true;
            //Hide mainForm
            this.Hide();
        }
예제 #5
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();
     }
 }