private void mnuRptAbsenceRecap_Click(object sender, EventArgs e) { var userAccess = userAccessRepository.GetAll(); bool isAllowed = userAccess.Exists(u => u.FullName == Store.ActiveUser && u.ObjectName == "Absensi -> Rekap" && u.IsOpen); if (isAllowed || Store.IsAdministrator) { Store.ActiveReport = "AbsenceRecap"; var frmReportParamPeriodUI = new ReportParamPeriodUI(); frmReportParamPeriodUI.Show(); frmReportParamPeriodUI.Text = "Absensi - Rekap"; } else { MessageBox.Show("Anda tidak dapat membuka laporan ini", "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public ReportUI(ReportParamPeriodUI frmReportParamPeriod) { this.frmReportParamPeriod = frmReportParamPeriod; InitializeComponent(); }