// Toolstrip-Button "Change Year" private void toolStripBtnChangeYear_Click(object sender, EventArgs e) { frmAdminLogin adminLogin = new frmAdminLogin(); // Open admin panel, if username & password correct if (adminLogin.ShowDialog() == DialogResult.OK && adminLogin.LoginSuccess) { administration.ShowDialog(); } }
// Open "Administration Login" private static void OpenAdminLogin() { using (frmAdminLogin adminLogin = new frmAdminLogin()) { // Open admin panel, if username & password correct if (adminLogin.ShowDialog() == DialogResult.OK && adminLogin.LoginSuccess) { using (frmAdministration administration = new frmAdministration()) { administration.ShowDialog(); } } } }