private void show_Sales2() { ReportPanel.Controls.Clear(); rptMtMSales = new ACMS.ACMSManager.Reports.RPMtMSales(); rptMtMSales.TopLevel = false; rptMtMSales.Dock = DockStyle.Fill; rptMtMSales.Parent = ReportPanel; rptMtMSales.SetEmployeeRecord(employee); rptMtMSales.SetTerminalUser(terminalUser); rptMtMSales.initData(oUser); rptMtMSales.Show(); ReportPanel.Refresh(); }
private void show_Sales2() { if (employee.CanAccess("AM_VIEW_MONTH_TO_MONTH_SALES_REPORT", terminalUser.Branch.Id)) { try { ReportPanel.Controls.Clear(); rptMtMSales = new ACMS.ACMSManager.Reports.RPMtMSales(); rptMtMSales.TopLevel = false; rptMtMSales.Dock = DockStyle.Fill; rptMtMSales.Parent = ReportPanel; rptMtMSales.SetEmployeeRecord(employee); rptMtMSales.SetTerminalUser(terminalUser); rptMtMSales.initData(oUser); rptMtMSales.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"); } }