private void button4_Click(object sender, EventArgs e) { Login login = new Login(); login.ShowDialog(); if (Login.logincorrect == true) { AdminApp adminapp = new AdminApp(); adminapp.Show(); Login.logincorrect = false; } }
private void button3_Click(object sender, EventArgs e) { Login login = new Login(); login.ShowDialog(); //add code here //if we type a wrong pwd but close the dialog, we can still log in the sales report if (Login.logincorrect == true) { SalesApp salesapp = new SalesApp(); salesapp.Show(); Login.logincorrect = false; } }