private void show_Sales1() { if(employee.CanAccess("AM_VIEW_INCOME_ANALYSIS_REPORT",terminalUser.Branch.Id)) { try { ReportPanel.Controls.Clear(); rptAnalysis = new ACMS.ACMSManager.Reports.RPIncomeAnalysis(employee.Id); rptAnalysis.TopLevel = false; rptAnalysis.Dock = DockStyle.Fill; rptAnalysis.Parent = ReportPanel; rptAnalysis.SetEmployeeRecord(employee); rptAnalysis.SetTerminalUser(terminalUser); rptAnalysis.initData(oUser); rptAnalysis.Show(); ReportPanel.Refresh(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } else { MessageBox.Show("You don't have sufficient right to insert new roster for this staff"); } }
private void InitReport() { rptAnalysis = new ACMS.ACMSManager.Reports.RPIncomeAnalysis(employee.Id); ReportPanel.Controls.Clear(); rptAnalysis.TopLevel = false; rptAnalysis.Dock = DockStyle.Fill; rptAnalysis.Parent = ReportPanel; rptAnalysis.SetEmployeeRecord(employee); rptAnalysis.SetTerminalUser(terminalUser); rptAnalysis.initData(oUser); rptAnalysis.Show(); ReportPanel.Refresh(); }