public void displayAdminUI() { if (adminUI == null) { adminUI = new AdminUI(this); } loginUI.Visible = false; adminUI.Show(); }
//log out private void tsmiLogout_Click(object sender, EventArgs e) { if (staffUI != null) { staffUI.Dispose(); staffUI = null; } else if (adminUI != null) { adminUI.Dispose(); adminUI = null; } loginUI.Visible = true; loginUI.clearTextbox(); }