Ejemplo n.º 1
0
        // 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();
            }
        }
Ejemplo n.º 2
0
 // 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();
             }
         }
     }
 }