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(); } }
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(); } }
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(); }
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(); } }