private void btnLaunchReports_Click(object sender, EventArgs e) { if (Security.Authorized("DailyReport")) { //instantiate an object of type DayPassForm called frmDayPass ReportsForm frmReports = new ReportsForm(); //Display the day pass form frmReports.ShowDialog(); } }
private void btnWorker_Click(object sender, EventArgs e) { if (Program.currentUser.name != "No Current User") { if (Security.Authorized("AdminPanel")) { AdminPanel frmAdminPanel = new AdminPanel(Security); frmAdminPanel.ShowDialog(); } else { ReportsForm frmReports = new ReportsForm(); frmReports.ShowDialog(); } } else { MessageBox.Show("Please Sign In!"); } }