using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Payroll.BO; using Ease.CoreV35; using Ease.CoreV35.Model; using Microsoft.Reporting.WinForms; using Payroll.Controls; using System.IO; using System.Configuration; namespace Payroll.Report { public partial class fReportViewer : Form { List _parameters = null; ReportItem _item = null; ReportParameter rParam = null; string _PATH = string.Empty; string sSearchDate = ""; DataSet _subreportDataSet = null; DateTime _salaryMonth; DataSet _oSubReportDataSet = null; public fReportViewer() { InitializeComponent(); } public ReportViewer ReportViewer { get { return rptViewer; } } private List reportParameters; public List ReportParams { get { return reportParameters; } set { reportParameters = value; } } #region Common Report Viewer Functions /// /// Common Report Viewer For Showing Report /// /// Used for providing the SearchCriteria parameter.\n Send null if not needed /// The Full Path of the RDLC. Example: Payroll.Report.xyz.rdlc /// The DataSet Containing The Data Tables of the Report. Send null if not needed public void CommonReportViewer(ReportItem item, string RDLC, DataSet dSet) { CommonReportViewer(item, RDLC, dSet, null, true); } /// /// Common Report Viewer For Showing Report /// /// Used for providing the SearchCriteria parameter.\n Send null if not needed /// The Full Path of the RDLC. Example: Payroll.Report.xyz.rdlc /// The DataSet Containing The Data Tables of the Report. Send null if not needed /// Whether 5 Basic parameter is needed. Send TRUE if needed public void CommonReportViewer(ReportItem item, string RDLC, DataSet dSet, bool isBasicParametersNeeded) { CommonReportViewer(item, RDLC, dSet, null, isBasicParametersNeeded); } /// /// Common Report Viewer For Showing Report /// /// Used for providing the SearchCriteria parameter.\n Send null if not needed /// The Full Path of the RDLC. Example: Payroll.Report.xyz.rdlc /// The DataSet Containing The Data Tables of the Report. Send null if not needed /// "Sets Report parameters. Send null if not needed" public void CommonReportViewer(ReportItem item, string RDLC, DataSet dSet, List _parameters) { CommonReportViewer(item, RDLC, dSet, _parameters, true); } /// /// Common Report Viewer For Showing Report /// /// Used for providing the SearchCriteria parameter.\n Send null if not needed /// The Full Path of the RDLC. Example: Payroll.Report.xyz.rdlc /// The DataSet Containing The Data Tables of the Report. Send null if not needed /// "Sets Report parameters. Send null if not needed" /// Whether 5 Basic parameter is needed. Send TRUE if needed public void CommonReportViewer(ReportItem item, string RDLC, DataSet dSet, List _parameters, bool isBasicParametersNeeded) { _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; this.ReportParams = _parameters; if (isBasicParametersNeeded) GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } #endregion public void PreviewReport(ReportItem item, List dataSource, string embeddedResource, string caption) { Payroll.BO.SystemInformation sysInfo = null; DataTable cInformation = null; this.Text = caption; cInformation = new Payroll.Report.PayrollDataSet.dsCompany.ComapnyInformationDataTable(); sysInfo = new Payroll.BO.SystemInformation(); sysInfo = Payroll.BO.SystemInformation.Get(); DataRow row = cInformation.NewRow(); row["Name"] = sysInfo.name; row["Address"] = sysInfo.corporateAddress; row["Email"] = sysInfo.email; row["Web"] = sysInfo.webAddress; cInformation.Rows.Add(row); dataSource.Add(new ReportDataSource("CompanyInformation_ComapnyInformation", cInformation)); //rptViewer.Refresh(); //rptViewer.LocalReport.DataSources.Clear(); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; rptViewer.Refresh(); rptViewer.LocalReport.DataSources.Clear(); rptViewer.LocalReport.EnableExternalImages = true; try { foreach (ReportDataSource source in dataSource) { rptViewer.LocalReport.DataSources.Add(source); } rptViewer.LocalReport.ReportEmbeddedResource = embeddedResource; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) rptViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void PreviewReport(List dataSource, string embeddedResource, string caption) { Payroll.BO.SystemInformation sysInfo = null; DataTable cInformation = null; this.Text = caption; cInformation = new Payroll.Report.PayrollDataSet.dsCompany.ComapnyInformationDataTable(); sysInfo = new Payroll.BO.SystemInformation(); sysInfo = Payroll.BO.SystemInformation.Get(); DataRow row = cInformation.NewRow(); row["Name"] = sysInfo.name; row["Address"] = sysInfo.corporateAddress; row["Email"] = sysInfo.email; row["Web"] = sysInfo.webAddress; cInformation.Rows.Add(row); dataSource.Add(new ReportDataSource("CompanyInformation_ComapnyInformation", cInformation)); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { foreach (ReportDataSource source in dataSource) { ReportViewer.LocalReport.DataSources.Add(source); } ReportViewer.LocalReport.ReportEmbeddedResource = embeddedResource; GetParametersForLeave(); this.rptViewer.LocalReport.SetParameters(_parameters); this.ShowDialog(); //this.ReportParams = _parameters; //if (reportParameters != null) // ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } } public void PreviewReport2(List dataSource, string embeddedResource, string caption, string sDate) { sSearchDate = sDate; Payroll.BO.SystemInformation sysInfo = null; Payroll.Report.PayrollDataSet.dsCompany.ComapnyInformationDataTable cInformation = null; this.Text = caption; cInformation = new Payroll.Report.PayrollDataSet.dsCompany.ComapnyInformationDataTable(); sysInfo = new Payroll.BO.SystemInformation(); sysInfo = Payroll.BO.SystemInformation.Get(); DataRow row = cInformation.NewRow(); row["Name"] = sysInfo.name; row["Address"] = sysInfo.corporateAddress; row["Email"] = sysInfo.email; row["Web"] = sysInfo.webAddress; cInformation.Rows.Add(row); //dataSource.Add(new ReportDataSource("CompanyInformation_ComapnyInformation", cInformation)); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { foreach (ReportDataSource source in dataSource) { ReportViewer.LocalReport.DataSources.Add(source); } ReportViewer.LocalReport.ReportEmbeddedResource = embeddedResource; GetParameters2(); this.rptViewer.LocalReport.SetParameters(_parameters); this.ShowDialog(); //this.ReportParams = _parameters; //if (reportParameters != null) // ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } } internal void ShowMultipleEmpLeaveBalanceNew(ReportItem reportItem, DataSet dSet, string reportName, string leaveYear) { //DataSet dSet = new DataSet(); ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; _item = reportItem; _PATH = Application.StartupPath + @"\Logo.jpg"; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = reportName; } GetParameters(); this.ReportParams = _parameters; ReportParameter parameter; parameter = new ReportParameter("FromDate", leaveYear); _parameters.Add(parameter); parameter = new ReportParameter("ToDate", leaveYear); _parameters.Add(parameter); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowMultipleEmpLeaveBalance(ReportItem reportItem, DataSet dSet, string reportName, string leaveYear) { //DataSet dSet = new DataSet(); ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; _item = reportItem; _PATH = Application.StartupPath + @"\Logo.jpg"; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = reportName; } GetParameters(); this.ReportParams = _parameters; ReportParameter parameter; parameter = new ReportParameter("LeaveYear", leaveYear); _parameters.Add(parameter); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlg(DataSet dSet, string RDLC) { _PATH = Application.StartupPath + @"\Logo.jpg"; // _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; //GetParametersForBasic(); GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlg(string reportName, string dataSourceName, DataTable dataSourceValue) { _PATH = Application.StartupPath + @"\Logo.jpg"; GetParameters(); if (this.rptViewer.IsDisposed == false) { this.rptViewer.Refresh(); this.rptViewer.LocalReport.DataSources.Clear(); this.rptViewer.LocalReport.EnableExternalImages = true; this.rptViewer.LocalReport.DataSources.Add(new ReportDataSource(dataSourceName, dataSourceValue)); this.rptViewer.LocalReport.ReportEmbeddedResource = reportName; this.rptViewer.LocalReport.SetParameters(_parameters); this.rptViewer.RefreshReport(); this.ShowDialog(); } } public void ShowDlg(string reportName, string dataSourceName1, DataTable dataSourceValue1, string dataSourceName2, DataTable dataSourceValue2) { _PATH = Application.StartupPath + @"\Logo.jpg"; GetParameters(); if (this.rptViewer.IsDisposed == false) { this.rptViewer.Refresh(); this.rptViewer.LocalReport.DataSources.Clear(); this.rptViewer.LocalReport.EnableExternalImages = true; this.rptViewer.LocalReport.DataSources.Add(new ReportDataSource(dataSourceName1, dataSourceValue1)); this.rptViewer.LocalReport.DataSources.Add(new ReportDataSource(dataSourceName2, dataSourceValue2)); this.rptViewer.LocalReport.ReportEmbeddedResource = reportName; this.rptViewer.LocalReport.SetParameters(_parameters); this.rptViewer.RefreshReport(); this.ShowDialog(); } } public void ShowDlg(ReportItem item, DataSet dSet, string RDLC) { _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpBasic(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmployeeInfo"; RDLC = "Payroll.Report.RDLC.EmployeeInfo.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForCashPaymentSummary(DataTable odtable) { DataSet dSet = new DataSet(); string RDLC; odtable.TableName = "dsCompany_CashPaymentSummary"; RDLC = "Payroll.Report.RDLC.CashWisePaymentSummaryReport.rdlc"; dSet.Tables.Add(odtable); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpJoining(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmployeeJoining"; RDLC = "Payroll.Report.RDLC.EmployeeJoining.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpJoining4Novartis(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpJoining4Novartis"; RDLC = "Payroll.Report.RDLC.EmployeeJoining4Nov.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForUpCommingEmp(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_UpCommingEmp"; RDLC = "Payroll.Report.RDLC.UpCommingEmp.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForUpCommingEmpForRekit(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_UpCommingEmp"; RDLC = "Payroll.Report.RDLC.UpCommingEmpForRekit.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpDetails(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmployeeDetail"; RDLC = "Payroll.Report.RDLC.EmployeeDetail.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpHistory(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmployeeHistory"; RDLC = "Payroll.Report.RDLC.EmployeeHistory.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForExceptionReport(ReportItem item, DataTable oFinalDT, string dSalaryMonth, string tableNaem, string RDLCName) { Payroll.BO.SystemInformation _systemInfo = Payroll.BO.SystemInformation.Get(); DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = tableNaem; RDLC = RDLCName; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("ExceptionMonth", dSalaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpGBasic(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpGradeBasic"; RDLC = "Payroll.Report.RDLC.EmpBasicGrade.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForDesignation(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpDesCatChange"; RDLC = "Payroll.Report.RDLC.DesignationChange.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForCategory(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpDesCatChange"; RDLC = "Payroll.Report.RDLC.CategoryChange.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpAllowDeduct(ReportItem item, DataTable oFinalDT, DateTime fromDate, DateTime toDate) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpAllowDeduct"; RDLC = "Payroll.Report.RDLC.EmpAllowDeduct.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); ReportParameter oReportParameter = new ReportParameter("FromDate", fromDate.ToString("MMM yyyy")); _parameters.Add(oReportParameter); oReportParameter = new ReportParameter("ToDate", fromDate.ToString("MMM yyyy")); _parameters.Add(oReportParameter); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpBankHistory(ReportItem item, DataTable oFinalDT, DateTime fromDate, DateTime toDate) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpBankHistory"; RDLC = "Payroll.Report.RDLC.EmpBankHistory.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); ReportParameter oReportParameter = new ReportParameter("FromDate", fromDate.ToString("MMM yyyy")); _parameters.Add(oReportParameter); oReportParameter = new ReportParameter("ToDate", fromDate.ToString("MMM yyyy")); _parameters.Add(oReportParameter); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpConfirmHistory(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpConfirmHis"; RDLC = "Payroll.Report.RDLC.EmpConfirmHis.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpPFHistory(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpPFHis"; RDLC = "Payroll.Report.RDLC.EmpPFHis.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpPosting(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_PostingDetails"; RDLC = "Payroll.Report.RDLC.EmpPostingDetails.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForBankAdvice(ReportItem item, DataTable oFinalDT, string amountInWord) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "dsCompany_BankAdvice"; RDLC = "Payroll.Report.RDLC.BankAdvice.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("TakaInWord", amountInWord); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForBankForwordingLetter(ReportItem item, DataTable oFinalDT, string amountInWord, string salaryDate, Bank oBank) { DataSet dSet = new DataSet(); string RDLC = string.Empty; oFinalDT.TableName = "dsCompany_BankAdvice"; if (oBank.ID.Integer == 3) { RDLC = "Payroll.Report.RDLC.BankAdviceForwardingLetter.rdlc"; } else throw new ServiceException("please select correct bank"); dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("NetAmount", amountInWord); _parameters.Add(rParam); rParam = new ReportParameter("SalaryDate", salaryDate); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForCashChequePaymentReport(DataTable oFinalDT, string month, string PaymentType) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_CashChequePayment"; RDLC = "Payroll.Report.RDLC.CashChequePaymentReport.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", month); _parameters.Add(rParam); rParam = new ReportParameter("PaymentMode", PaymentType); _parameters.Add(rParam); List oAuthorizations = ReportAuthorization.GetByReportID(ID.FromInteger(350)); List oPersons = AuthorizedPerson.Get(); int nCount = 1; foreach (ReportAuthorization item2 in oAuthorizations) { AuthorizedPerson person = oPersons.Find(x => x.ID == item2.AuthorizePersionId); if (person != null) { if (nCount == 1) { _parameters.Add(new ReportParameter("Person1", person.Name)); _parameters.Add(new ReportParameter("Designation1", person.Designation)); } if (nCount == 2) { _parameters.Add(new ReportParameter("Person2", person.Name)); _parameters.Add(new ReportParameter("Designation2", person.Designation)); } if (nCount == 3) { _parameters.Add(new ReportParameter("Person3", person.Name)); _parameters.Add(new ReportParameter("Designation3", person.Designation)); } } nCount++; } this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForBankDisbursment(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "dsCompany_BankAdvice"; RDLC = "Payroll.Report.RDLC.SalaryBankDisbursement.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEuroBankAdvice(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "dsCompany_BankAdvice"; RDLC = "Payroll.Report.RDLC.EuroBankAdvice.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForOPIBankAdvice(ReportItem item, DataTable oFinalDT, string amountInWord) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BankAdvice"; //oBankLetter.TableName = "PayrollDataSet_BankAdviceLetter"; RDLC = "Payroll.Report.RDLC.OPIBankAdvice.rdlc"; dSet.Tables.Add(oFinalDT); // dSet.Tables.Add(oBankLetter); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("AmountInWord", amountInWord); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForHNMOPIBankAdvice(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BankAdvice"; //oBankLetter.TableName = "PayrollDataSet_BankAdviceLetter"; RDLC = "Payroll.Report.RDLC.OPIHNMBankAdvice.rdlc"; dSet.Tables.Add(oFinalDT); // dSet.Tables.Add(oBankLetter); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void OPIBankDisbursement(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BankAdvice"; //oBankLetter.TableName = "PayrollDataSet_BankAdviceLetter"; RDLC = "Payroll.Report.RDLC.OPIBankDisbursement.rdlc"; dSet.Tables.Add(oFinalDT); // dSet.Tables.Add(oBankLetter); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForNovartisBankAdvice(ReportItem item, DataTable oFinalDT, DataTable oBankLetter) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BankAdvice"; oBankLetter.TableName = "PayrollDataSet_BankAdviceLetter"; RDLC = "Payroll.Report.RDLC.BankAdvice.rdlc"; dSet.Tables.Add(oFinalDT); dSet.Tables.Add(oBankLetter); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForIDLCBankAdvice(ReportItem item, DataTable oFinalDT, DataTable oBankLetter, string totalTaka) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BankAdvice"; oBankLetter.TableName = "PayrollDataSet_BankAdviceLetter"; RDLC = "Payroll.Report.RDLC.BankAdvice.rdlc"; dSet.Tables.Add(oFinalDT); dSet.Tables.Add(oBankLetter); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("TotalTaka", totalTaka); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForCCDetailWReport(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_CCDetailReport"; RDLC = "Payroll.Report.RDLC.CCDetailReport.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowRewardStatementReport(string empName, string empDivision, string empDesignation, string currentYear, string previousYear, DataTable dtRewardStatement) { DataSet dSet = new DataSet(); string RDLC; if (dtRewardStatement != null && dtRewardStatement.Rows.Count > 0) dtRewardStatement.TableName = "PayrollDataSet_RewardStatement"; RDLC = "Payroll.Report.RDLC.RewardStatement.rdlc"; dSet.Tables.Add(dtRewardStatement); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Name", empName); _parameters.Add(rParam); rParam = new ReportParameter("Division", empDivision); _parameters.Add(rParam); rParam = new ReportParameter("Designation", empDesignation); _parameters.Add(rParam); rParam = new ReportParameter("CurrentYear", currentYear); _parameters.Add(rParam); rParam = new ReportParameter("PreviousYear", previousYear); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForCCWReport(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_CCWReport"; RDLC = "Payroll.Report.RDLC.CCWReport.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForHourlyOTSheet(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_OTHourlySheet"; RDLC = "Payroll.Report.RDLC.OTHourlySheet.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForMRange(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_OTMonthRange"; RDLC = "Payroll.Report.RDLC.OTMonthRange.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForBranchWOT(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BranchWiseOT"; RDLC = "Payroll.Report.RDLC.BranchWiseOT.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForDivisionWOT(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_DivisionWiseOT"; RDLC = "Payroll.Report.RDLC.DivisionWiseOT.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForMonthlyOTSheet(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_OTMonthlySheet"; RDLC = "Payroll.Report.RDLC.OTMonthlySheet.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } //Added By Anup 21 December 2010 public byte[] WriteFileForPaySlip(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; byte[] bytes = null; oFinalDT.TableName = "PayrollDataSet_Payslip"; RDLC = "Payroll.Report.RDLC.Payslip.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); Warning[] warnings; string[] streamids; string mimeType; string encoding; string filenameExtension; bytes = ReportViewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out filenameExtension, out streamids, out warnings); } catch (Exception ex) { throw new Exception(ex.Message, ex); } return bytes; } //-------------------------------- public void ShowDlgForBanglaPaySlipOverAllSummary(ReportItem item, DataTable oFinalDT, string month, string sSalaryMonth) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BanglaPaySlipNew"; //RDLC = "Payroll.Report.RDLC.BanglaPayslipNew.rdlc"; RDLC = "Payroll.Report.RDLC.BanglaPSlip.rdlc"; //RDLC = "Payroll.Report.RDLC.Test.rdlc"; dSet.Tables.Add(oFinalDT); //PATH = Application.StartupPath + @"\Logo.bmp"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); //ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //GetParameters(); #region unused code //if (_ArrearExit) //{ // rParam = new ReportParameter("ArrearExist", "1"); // _parameters.Add(rParam); //} //else //{ // rParam = new ReportParameter("ArrearExist", "-1"); // _parameters.Add(rParam); //} //if (_UnAuthorizedExit) //{ // rParam = new ReportParameter("UnAuthorizedExist", "1"); // _parameters.Add(rParam); //} //else //{ // rParam = new ReportParameter("UnAuthorizedExist", "-1"); // _parameters.Add(rParam); //} #endregion Payroll.BO.SystemInformation sysInfo = null; Payroll.Report.PayrollDataSet.dsCompany.ComapnyInformationDataTable cInformation = null; //this.Text = caption; cInformation = new Payroll.Report.PayrollDataSet.dsCompany.ComapnyInformationDataTable(); sysInfo = new Payroll.BO.SystemInformation(); sysInfo = Payroll.BO.SystemInformation.Get(); ReportParameter parameter = new ReportParameter("rptMonth", month); _parameters = new List(); _parameters.Add(parameter); parameter = new ReportParameter("companyName", ConfigurationSettings.AppSettings["companyBanglaName"]); _parameters.Add(parameter); parameter = new ReportParameter("SalalyMonthEng", sSalaryMonth); _parameters.Add(parameter); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForPaySlip(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_Payslip"; RDLC = "Payroll.Report.RDLC.EskayefPaySlip.rdlc"; //RDLC = "Payroll.Report.RDLC.Payslip.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForPaySlipCiti(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_Payslip"; RDLC = "Payroll.Report.RDLC.Payslip.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForNewPaySlip(ReportItem item, DataTable dMain, DataSet dsSub, string salaryMonth) { _item = item; _oSubReportDataSet = dsSub; //this.rptViewer.Refresh(); //this.ShowDialog(); string RDLC; if (Payroll.BO.SystemInformation.CurrentSysInfo.PayrollTypeID.Integer == 1) { RDLC = "Payroll.Report.RDLC.PaySlipNew.rdlc"; } else { //RDLC = "Payroll.Report.RDLC.PaySlipNewNMGT.rdlc"; RDLC = "Payroll.Report.RDLC.PaySlipNew.rdlc"; } ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(dMain.TableName, dMain)); ReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; GetParameters(); _parameters.RemoveAll(p => p.Name == "Logo"); if (Payroll.BO.SystemInformation.CurrentSysInfo.PayrollTypeID.Integer == 1) { rParam = new ReportParameter("isBold", false.ToString()); _parameters.Add(rParam); } else { rParam = new ReportParameter("isBold", true.ToString()); _parameters.Add(rParam); } rParam = new ReportParameter("Logo", Application.StartupPath + @"\logo.jpg"); _parameters.Add(rParam); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); rParam = new ReportParameter("PrintedBy", Payroll.BO.User.CurrentUser.Name); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { StringBuilder sb = new StringBuilder(); sb.Append(ex.Message); Exception InnerException = ex.InnerException; while (InnerException != null) { sb.Append("-->Inner Exception: "); sb.Append(InnerException.Message); InnerException = InnerException.InnerException; } throw new Exception(sb.ToString(), ex); } this.ShowDialog(); } public byte[] MailNewPaySlip(ReportItem item, DataTable dMain, DataSet dsSub, string salaryMonth) { _item = item; _oSubReportDataSet = dsSub; byte[] bytes = null; string RDLC; if (Payroll.BO.SystemInformation.CurrentSysInfo.PayrollTypeID.Integer == 1) { RDLC = "Payroll.Report.RDLC.PaySlipNew.rdlc"; } else { //RDLC = "Payroll.Report.RDLC.PaySlipNewNMGT.rdlc"; RDLC = "Payroll.Report.RDLC.PaySlipNew.rdlc"; } ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(dMain.TableName, dMain)); ReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; GetParameters(); _parameters.RemoveAll(p => p.Name == "Logo"); if (Payroll.BO.SystemInformation.CurrentSysInfo.PayrollTypeID.Integer == 1) { rParam = new ReportParameter("isBold", false.ToString()); _parameters.Add(rParam); } else { rParam = new ReportParameter("isBold", true.ToString()); _parameters.Add(rParam); } rParam = new ReportParameter("Logo", Application.StartupPath + @"\Resource\home_pano.jpg"); _parameters.Add(rParam); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); rParam = new ReportParameter("PrintedBy", Payroll.BO.User.CurrentUser.Name); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); Warning[] warnings; string[] streamids; string mimeType; string encoding; string filenameExtension; bytes = ReportViewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out filenameExtension, out streamids, out warnings); } catch (Exception ex) { StringBuilder sb = new StringBuilder(); sb.Append(ex.Message); Exception InnerException = ex.InnerException; while (InnerException != null) { sb.Append("-->Inner Exception: "); sb.Append(InnerException.Message); InnerException = InnerException.InnerException; } throw new Exception(sb.ToString(), ex); } return bytes; } public void ShowDlgForPaySlipCiti1(ReportItem item, DataSet oDS) { DataSet dSet = new DataSet(); string RDLC; RDLC = "Payroll.Report.RDLC.PaySlip.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (oDS != null && oDS.Tables.Count > 0) { foreach (DataTable table in oDS.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; ReportViewer.LocalReport.ReportPath = @"RDLC\PaySlip.rdlc"; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForPaySlipCiti4(DataSet oDS) { DataSet dSet = new DataSet(); string RDLC; RDLC = "Payroll.Report.RDLC.PaySlip.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (oDS != null && oDS.Tables.Count > 0) { foreach (DataTable table in oDS.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; ReportViewer.LocalReport.ReportPath = @"RDLC\PaySlip.rdlc"; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public byte[] ShowDlgForSkfExpensesPSlip1(DataTable oFinalDT, string month) { DataSet dSet = new DataSet(); string RDLC; byte[] bytes = null; oFinalDT.TableName = "PayrollDataSet_SKFExpencesPaySlip"; RDLC = "Payroll.Report.RDLC.SKFExpencesPaySlip.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", month); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); Warning[] warnings; string[] streamids; string mimeType; string encoding; string filenameExtension; bytes = ReportViewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out filenameExtension, out streamids, out warnings); } catch (Exception ex) { throw new Exception(ex.Message, ex); } return bytes; } public byte[] ShowDlgForSkfSalaryPSlip1(ReportItem item, DataTable oFinalDT, string month) { DataSet dSet = new DataSet(); string RDLC; byte[] bytes = null; oFinalDT.TableName = "PayrollDataSet_SkfSalaryPaySlip"; RDLC = "Payroll.Report.RDLC.SKFSalaryPaySlipNew.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", month); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); Warning[] warnings; string[] streamids; string mimeType; string encoding; string filenameExtension; bytes = ReportViewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out filenameExtension, out streamids, out warnings); } catch (Exception ex) { throw new Exception(ex.Message, ex); } return bytes; } public void ShowDlgForSkfSalaryPSlip(ReportItem item, DataTable oFinalDT, string month) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_SkfSalaryPaySlip"; RDLC = "Payroll.Report.RDLC.SKFSalaryPaySlipNew.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", month); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForSkfExpensesPSlip(DataTable oFinalDT, string month) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_SKFExpencesPaySlip"; RDLC = "Payroll.Report.RDLC.SKFExpencesPaySlip.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", month); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForNovartisPaySlip(ReportItem item, DataTable oFinalDT, DateTime dSalaryMonth) { DataSet dSet = new DataSet(); string RDLC; string logoPath1 = string.Empty; string logoPath2 = string.Empty; oFinalDT.TableName = "PayrollDataSet_Payslip"; RDLC = "Payroll.Report.RDLC.Payslip.rdlc"; dSet.Tables.Add(oFinalDT); logoPath1 = Application.StartupPath + @"\Logo.jpg"; logoPath2 = Application.StartupPath + @"\Logo1.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } _parameters = new List(); rParam = new ReportParameter("Logo", logoPath1); _parameters.Add(rParam); rParam = new ReportParameter("Logo1", logoPath2); _parameters.Add(rParam); rParam = new ReportParameter("SalaryMonth", dSalaryMonth.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForPaySlipOverAllSummary(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_OverAllSummary"; RDLC = "Payroll.Report.RDLC.OverAllSummary.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; //_ArrearExit = IsArrear; //_UnAuthorizedExit = IsUnAuthorized; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //if (_ArrearExit) //{ // rParam = new ReportParameter("ArrearExist", "1"); // _parameters.Add(rParam); //} //else //{ // rParam = new ReportParameter("ArrearExist", "-1"); // _parameters.Add(rParam); //} //if (_UnAuthorizedExit) //{ // rParam = new ReportParameter("UnAuthorizedExist", "1"); // _parameters.Add(rParam); //} //else //{ // rParam = new ReportParameter("UnAuthorizedExist", "-1"); // _parameters.Add(rParam); //} this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForSalarySheetIDLC(ReportItem item, DataTable oFinalDT, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.DetailSalarySheet.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForBEFTNform(DataSet dSet, string salaryMonth, string serial, string amountInTaka, string processDate) { DataSet ds = dSet; string RDLC; dSet.Tables[0].TableName = "dsCompany_BEFTNform"; dSet.Tables[1].TableName = "dsCompany_FormattedAmount"; RDLC = "Payroll.Report.RDLC.BEFTNform.rdlc"; //dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } _parameters = new List(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); rParam = new ReportParameter("SL", serial); _parameters.Add(rParam); rParam = new ReportParameter("AmountInTaka", amountInTaka); _parameters.Add(rParam); rParam = new ReportParameter("ProcessDate", processDate); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForChallan(DataSet dSet, string RDLC, string AssYear, string FisYear) { _PATH = Application.StartupPath + @"\Logo.jpg"; _parameters = new List(); // = IsArrear; //_UnAuthorizedExit = IsUnAuthorized; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); rParam = new ReportParameter("AssesmentYear", AssYear); _parameters.Add(rParam); rParam = new ReportParameter("FiscalYear", FisYear); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForSalarySheet(ReportItem item, DataTable oFinalDT, ID nReportID) { DataSet dSet = new DataSet(); string RDLC; ReportAuthorization oReportAuthorization = null; oReportAuthorization = ReportAuthorization.Get(nReportID); oFinalDT.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.SalarySheetWithArrear.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); string name = string.Empty; List oAuthorizations = ReportAuthorization.GetByReportID(nReportID); List oPersons = AuthorizedPerson.Get(); int nCount = 1; foreach (ReportAuthorization item2 in oAuthorizations) { AuthorizedPerson person = oPersons.Find(x => x.ID == item2.AuthorizePersionId); if (person != null) { if (nCount == 1) { _parameters.Add(new ReportParameter("Person1", person.Name)); _parameters.Add(new ReportParameter("Designation1", person.Designation)); } if (nCount == 2) { _parameters.Add(new ReportParameter("Person2", person.Name)); _parameters.Add(new ReportParameter("Designation2", person.Designation)); } if (nCount == 3) { _parameters.Add(new ReportParameter("Person3", person.Name)); _parameters.Add(new ReportParameter("Designation3", person.Designation)); } } nCount++; } this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForPNL(ReportItem item, DataTable oFinalDT, ID nReportID, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; ReportAuthorization oReportAuthorization = null; oReportAuthorization = ReportAuthorization.Get(nReportID); oFinalDT.TableName = "PayrollDataSet_PNL"; RDLC = "Payroll.Report.RDLC.PNLReport.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //rParam = new ReportParameter("SalaryMonth", salaryMonth); //_parameters.Add(rParam); //string name = string.Empty; //ID authorizePersionId = ReportAuthorization.Get(nReportID, 1).AuthorizePersionId; //if (authorizePersionId != null) //{ // name = AuthorizedPerson.Get(authorizePersionId).Name; // if (name != "") // { // rParam = new ReportParameter("PreparedBy", name); // _parameters.Add(rParam); // } //} //authorizePersionId = ReportAuthorization.Get(nReportID, 2).AuthorizePersionId; //if (authorizePersionId != null) //{ // name = AuthorizedPerson.Get(authorizePersionId).Name; // if (name != "") // { // rParam = new ReportParameter("CheckedBy", name); // _parameters.Add(rParam); // } //} //authorizePersionId = ReportAuthorization.Get(nReportID, 3).AuthorizePersionId; //if (authorizePersionId != null) //{ // name = AuthorizedPerson.Get(authorizePersionId).Name; // if (name != "") // { // rParam = new ReportParameter("HeadofHRApprovedBy", name); // _parameters.Add(rParam); // } //} //authorizePersionId = ReportAuthorization.Get(nReportID, 4).AuthorizePersionId; //if (authorizePersionId != null) //{ // name = AuthorizedPerson.Get(authorizePersionId).Name; // if (name != "") // { // rParam = new ReportParameter("CCOApprovedBy", name); // _parameters.Add(rParam); // } //} this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEuroSalarySheet(ReportItem item, DataTable oFinalDT, ID nReportID) { DataSet dSet = new DataSet(); string RDLC; ReportAuthorization oReportAuthorization = null; oReportAuthorization = ReportAuthorization.Get(nReportID); oFinalDT.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.EuroSalarySheet.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); string name = string.Empty; ID authorizePersionId = ReportAuthorization.Get(nReportID, 1).AuthorizePersionId; if (authorizePersionId != null) { name = AuthorizedPerson.Get(authorizePersionId).Name; if (name != "") { rParam = new ReportParameter("PreparedBy", name); _parameters.Add(rParam); } } authorizePersionId = ReportAuthorization.Get(nReportID, 2).AuthorizePersionId; if (authorizePersionId != null) { name = AuthorizedPerson.Get(authorizePersionId).Name; if (name != "") { rParam = new ReportParameter("CheckedBy", name); _parameters.Add(rParam); } } authorizePersionId = ReportAuthorization.Get(nReportID, 3).AuthorizePersionId; if (authorizePersionId != null) { name = AuthorizedPerson.Get(authorizePersionId).Name; if (name != "") { rParam = new ReportParameter("HeadofHRApprovedBy", name); _parameters.Add(rParam); } } authorizePersionId = ReportAuthorization.Get(nReportID, 4).AuthorizePersionId; if (authorizePersionId != null) { name = AuthorizedPerson.Get(authorizePersionId).Name; if (name != "") { rParam = new ReportParameter("CCOApprovedBy", name); _parameters.Add(rParam); } } //rParam = new ReportParameter("DynamicGroup",DynamicGroup); //_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForExpatSalarySheet(ReportItem item, DataTable oFinalDT, ID nReportID) { DataSet dSet = new DataSet(); string RDLC; ReportAuthorization oReportAuthorization = null; oReportAuthorization = ReportAuthorization.Get(nReportID); oFinalDT.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.ExpatSalarySheet.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); string name = string.Empty; ID authorizePersionId = ReportAuthorization.Get(nReportID, 1).AuthorizePersionId; if (authorizePersionId != null) { name = AuthorizedPerson.Get(authorizePersionId).Name; if (name != "") { rParam = new ReportParameter("PreparedBy", name); _parameters.Add(rParam); } } authorizePersionId = ReportAuthorization.Get(nReportID, 2).AuthorizePersionId; if (authorizePersionId != null) { name = AuthorizedPerson.Get(authorizePersionId).Name; if (name != "") { rParam = new ReportParameter("CheckedBy", name); _parameters.Add(rParam); } } authorizePersionId = ReportAuthorization.Get(nReportID, 3).AuthorizePersionId; if (authorizePersionId != null) { name = AuthorizedPerson.Get(authorizePersionId).Name; if (name != "") { rParam = new ReportParameter("HeadofHRApprovedBy", name); _parameters.Add(rParam); } } authorizePersionId = ReportAuthorization.Get(nReportID, 4).AuthorizePersionId; if (authorizePersionId != null) { name = AuthorizedPerson.Get(authorizePersionId).Name; if (name != "") { rParam = new ReportParameter("CCOApprovedBy", name); _parameters.Add(rParam); } } //rParam = new ReportParameter("DynamicGroup",DynamicGroup); //_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForCasualSalarySheet(ReportItem item, DataTable oFinalDT, ID nReportID) { DataSet dSet = new DataSet(); string RDLC; ReportAuthorization oReportAuthorization = null; oReportAuthorization = ReportAuthorization.Get(nReportID); oFinalDT.TableName = "PayrollDataSet_CasualSalarySheet"; RDLC = "Payroll.Report.RDLC.rptCasualSalarySheet.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //string name = string.Empty; //ID authorizePersionId = ReportAuthorization.Get(nReportID, 1).AuthorizePersionId; //if (authorizePersionId != null) //{ // name = AuthorizedPerson.Get(authorizePersionId).Name; // if (name != "") // { // rParam = new ReportParameter("PreparedBy", name); // _parameters.Add(rParam); // } //} //authorizePersionId = ReportAuthorization.Get(nReportID, 2).AuthorizePersionId; //if (authorizePersionId != null) //{ // name = AuthorizedPerson.Get(authorizePersionId).Name; // if (name != "") // { // rParam = new ReportParameter("CheckedBy", name); // _parameters.Add(rParam); // } //} //authorizePersionId = ReportAuthorization.Get(nReportID, 3).AuthorizePersionId; //if (authorizePersionId != null) //{ // name = AuthorizedPerson.Get(authorizePersionId).Name; // if (name != "") // { // rParam = new ReportParameter("HeadofHRApprovedBy", name); // _parameters.Add(rParam); // } //} //authorizePersionId = ReportAuthorization.Get(nReportID, 4).AuthorizePersionId; //if (authorizePersionId != null) //{ // name = AuthorizedPerson.Get(authorizePersionId).Name; // if (name != "") // { // rParam = new ReportParameter("CCOApprovedBy", name); // _parameters.Add(rParam); // } //} ////rParam = new ReportParameter("DynamicGroup",DynamicGroup); ////_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForCCWiswSalaryDetails(ReportItem item, DataTable oFinalDT, DateTime dSMonth) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_CCWSalaryDetail"; RDLC = "Payroll.Report.RDLC.CCWSalaryDetail.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", dSMonth.ToString("MMM-yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForChildrenEduAllow(DataTable dtChildEduAllow) { DataSet dSet = new DataSet(); string RDLC; dtChildEduAllow.TableName = "PayrollDataSet_ChildrenEduAllow"; RDLC = "Payroll.Report.RDLC.ChildrenEduAllow.rdlc"; dSet.Tables.Add(dtChildEduAllow); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForCCWiswSalarySummary(ReportItem item, DataTable oFinalDT, DateTime dSMonth) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_CCWSaSummary"; RDLC = "Payroll.Report.RDLC.CCWSSummary.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", dSMonth.ToString("MMM-yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForNewCCWiswSalarySummary(ReportItem item, DataTable oFinalDT, DateTime dSMonth) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_NewCCSalarySummary"; RDLC = "Payroll.Report.RDLC.NewCCWiseSalarySummary.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", dSMonth.ToString("MMM-yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForWTSalarySheet(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_WartsilaSalarySheet"; RDLC = "Payroll.Report.RDLC.WartsilaSalarySheet.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //rParam = new ReportParameter("DynamicGroup",DynamicGroup); //_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForWTSRSheet(ReportItem item, DataTable oFinalDT, DataTable oSRDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_WartsilaReconciliation"; oSRDT.TableName = "PayrollDataSet_WartSilaRSummary"; RDLC = "Payroll.Report.RDLC.WartsilaReconciliation.rdlc"; dSet.Tables.Add(oFinalDT); dSet.Tables.Add(oSRDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForWTPaySlip(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_WartsilaPaySlip"; RDLC = "Payroll.Report.RDLC.WartsilaPaySlip.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //rParam = new ReportParameter("DynamicGroup",DynamicGroup); //_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForSalarySheetByCC(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "dsCompany_SalarySheet"; RDLC = "Payroll.Report.RDLC.CCWiseSalarySheet.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //rParam = new ReportParameter("DynamicGroup",DynamicGroup); //_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForSalaryReconcilSummary(ReportItem reportItem, DataTable oFinalDT, DataTable _salaryReconDecuction, string FirstMonth, string Nextmonth, string CurrMonEmp, string PrevMonEmp) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_SalaryReconciliationSummary"; _salaryReconDecuction.TableName = "PayrollDataSet_SalaryReconDeduction"; RDLC = "Payroll.Report.RDLC.SalaryReconciliationSummary.rdlc"; dSet.Tables.Add(oFinalDT); dSet.Tables.Add(_salaryReconDecuction); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = reportItem; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FirstMonth", FirstMonth); _parameters.Add(rParam); rParam = new ReportParameter("Nextmonth", Nextmonth); _parameters.Add(rParam); rParam = new ReportParameter("CurrmonthEmp", CurrMonEmp); _parameters.Add(rParam); rParam = new ReportParameter("PrevmonthEmp", PrevMonEmp); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForSalaryReconcil(ReportItem item, DataTable oFinalDT, string FirstMonth, string Nextmonth, string CurrMonEmp, string PrevMonEmp) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_SalaryReconsilation"; //oFinalDTGross.TableName = "PayrollDataSet_SalaryReconciliationSummary"; //_salaryReconDecuction.TableName = "PayrollDataSet_SalaryReconDeduction"; RDLC = "Payroll.Report.RDLC.SalaryReconciliation.rdlc"; dSet.Tables.Add(oFinalDT); //dSet.Tables.Add(oFinalDTGross); //dSet.Tables.Add(_salaryReconDecuction); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FirstMonth", FirstMonth); _parameters.Add(rParam); rParam = new ReportParameter("Nextmonth", Nextmonth); _parameters.Add(rParam); rParam = new ReportParameter("CurrmonthEmp", CurrMonEmp); _parameters.Add(rParam); rParam = new ReportParameter("PrevmonthEmp", PrevMonEmp); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForSalaryReconcil(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_SalaryReconsilation"; RDLC = "Payroll.Report.RDLC.SalaryReconciliation.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //rParam = new ReportParameter("DynamicGroup",DynamicGroup); //_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForExtendedSalarySheet(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_ExtendedSalarySheet"; RDLC = "Payroll.Report.RDLC.ExtendedSalarySheet.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //rParam = new ReportParameter("DynamicGroup",DynamicGroup); //_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForTaxCard(ReportItem item, DataSet dSet, string RDLC, string EmpName, string EmpNo, string TINNo, string AssYear, string FisYear) { _PATH = Application.StartupPath + @"\Logo.jpg"; string sAuthSignaturePath = Application.StartupPath + @"\AuthSignature.png"; _item = item; // = IsArrear; //_UnAuthorizedExit = IsUnAuthorized; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; //GetParameters(); _parameters = new List(); rParam = new ReportParameter("Logo", _PATH); _parameters.Add(rParam); Payroll.BO.SystemInformation _systemInfo = Payroll.BO.SystemInformation.Get(); rParam = new ReportParameter("CompanyInfo", _systemInfo.name.ToString().Trim()); _parameters.Add(rParam); rParam = new ReportParameter("SearchCriteria", "Journal Voucher for month - " + _salaryMonth.ToString("dd-MMM-yyyy"), true); _parameters.Add(rParam); rParam = new ReportParameter("Address", _systemInfo.corporateAddress.ToString().Trim()); _parameters.Add(rParam); rParam = new ReportParameter("Phone", _systemInfo.TelephoneNo.ToString()); _parameters.Add(rParam); rParam = new ReportParameter("EmpName", EmpName); _parameters.Add(rParam); rParam = new ReportParameter("EmpNo", EmpNo); _parameters.Add(rParam); rParam = new ReportParameter("TINNo", TINNo); _parameters.Add(rParam); rParam = new ReportParameter("AssesmentYear", AssYear); _parameters.Add(rParam); rParam = new ReportParameter("FiscalYear", FisYear); _parameters.Add(rParam); rParam = new ReportParameter("AuthSignature", sAuthSignaturePath); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForReckittTaxCard(DataSet dSet, string RDLC, string EmpName, string EmpNo, string TINNo, string AssYear, string FisYear) { _PATH = Application.StartupPath + @"\Logo.jpg"; Payroll.BO.SystemInformation _systemInfo = Payroll.BO.SystemInformation.Get(); ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { table.TableName = "PayrollDataSet_ReckittTaxCard"; ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //GetParameters(); _parameters = new List(); rParam = new ReportParameter("Logo", _PATH); _parameters.Add(rParam); rParam = new ReportParameter("CompanyInfo", _systemInfo.name.ToString()); _parameters.Add(rParam); rParam = new ReportParameter("Address", _systemInfo.corporateAddress.ToString()); //rParam = new ReportParameter("Address", "6th-9th Floors ,Noor Tower,110, Bir Uttam C.R Dattta Road, Dhaka-1205"); _parameters.Add(rParam); rParam = new ReportParameter("Phone", _systemInfo.TelephoneNo.ToString()); //rParam = new ReportParameter("Phone", "0124232323"); _parameters.Add(rParam); rParam = new ReportParameter("EmpName", EmpName); _parameters.Add(rParam); rParam = new ReportParameter("EmpNo", EmpNo); _parameters.Add(rParam); rParam = new ReportParameter("TINNo", TINNo); _parameters.Add(rParam); rParam = new ReportParameter("AssesmentYear", AssYear); _parameters.Add(rParam); rParam = new ReportParameter("FiscalYear", FisYear); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForMultipleEmpTaxCard(ReportItem item, DataSet dSet, string RDLC) { _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; // = IsArrear; //_UnAuthorizedExit = IsUnAuthorized; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForLoanIssue(ReportItem item, DataSet dSet, string RDLC, string EmpName, string EmpNo, double LAmount, double IntRate, int noOfInstalment, DateTime dFromDate, DateTime dToDate, string LoanName, DateTime dIssueDate) { _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); rParam = new ReportParameter("Name", EmpName); _parameters.Add(rParam); rParam = new ReportParameter("EmpNo", EmpNo); _parameters.Add(rParam); rParam = new ReportParameter("Amount", Convert.ToString(LAmount)); _parameters.Add(rParam); rParam = new ReportParameter("InterestRate", Convert.ToString(IntRate)); _parameters.Add(rParam); rParam = new ReportParameter("NoOfInstallment", Convert.ToString(noOfInstalment)); _parameters.Add(rParam); rParam = new ReportParameter("IssueDate", dIssueDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("FromDate", dIssueDate.ToString("MMM-yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", dToDate.ToString("MMM-yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("LoanName", LoanName); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForSharedLoanIssue(ReportItem item, DataSet dSet, string RDLC, string EmpName, string EmpNo, double LAmount, double IntRate, int noOfInstalment, DateTime dFromDate, DateTime dToDate, string LoanName, DateTime dIssueDate, double MaxCmpPayPercent, double ResiduePercent, double PMTValue) { _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); rParam = new ReportParameter("Name", EmpName); _parameters.Add(rParam); rParam = new ReportParameter("EmpNo", EmpNo); _parameters.Add(rParam); rParam = new ReportParameter("Amount", Convert.ToString(LAmount)); _parameters.Add(rParam); rParam = new ReportParameter("InterestRate", Convert.ToString(IntRate)); _parameters.Add(rParam); rParam = new ReportParameter("NoOfInstallment", Convert.ToString(noOfInstalment)); _parameters.Add(rParam); rParam = new ReportParameter("IssueDate", dIssueDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("FromDate", dFromDate.ToString("MMM-yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", dToDate.ToString("MMM-yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("LoanName", LoanName); _parameters.Add(rParam); rParam = new ReportParameter("MaxCmpPayPercent", MaxCmpPayPercent.ToString()); _parameters.Add(rParam); rParam = new ReportParameter("ResiduePercent", ResiduePercent.ToString()); _parameters.Add(rParam); rParam = new ReportParameter("PMTValue", PMTValue.ToString()); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForNovartisLoanIssue(ReportItem item, DataSet dSet, string RDLC, string EmpName, string EmpNo, double LAmount, double IntRate, int noOfInstalment, DateTime dFromDate, DateTime dToDate, string LoanName, string sDesignation, string sRC, string sDepartment, string sLocation) { _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParametersForNLoan(); rParam = new ReportParameter("Name", EmpName); _parameters.Add(rParam); rParam = new ReportParameter("EmpNo", EmpNo); _parameters.Add(rParam); rParam = new ReportParameter("Amount", Convert.ToString(LAmount)); _parameters.Add(rParam); rParam = new ReportParameter("InterestRate", Convert.ToString(IntRate)); _parameters.Add(rParam); rParam = new ReportParameter("NoOfInstallment", Convert.ToString(noOfInstalment)); _parameters.Add(rParam); //rParam = new ReportParameter("IssueDate", dIssueDate.ToString("dd MMM yyyy")); //_parameters.Add(rParam); rParam = new ReportParameter("FromDate", dFromDate.ToString("MMM-yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", dToDate.ToString("MMM-yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("LoanName", LoanName); _parameters.Add(rParam); rParam = new ReportParameter("Designation", sDesignation); _parameters.Add(rParam); rParam = new ReportParameter("RC", sRC); _parameters.Add(rParam); rParam = new ReportParameter("Department", sDepartment); _parameters.Add(rParam); rParam = new ReportParameter("Location", sLocation); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForLoanPaymentDue(ReportItem item, DataTable oFinalDT, string LoanMonth) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_LaonPaymentDue"; RDLC = "Payroll.Report.RDLC.LoanPaymentDue.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("LoanMonth", LoanMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForBonusRegister(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BonusRegister"; RDLC = "Payroll.Report.RDLC.BonusRegister.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForOldBonusRegister(DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BonusRegister"; RDLC = "Payroll.Report.RDLC.BonusRegister.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForLoyaltyBonusRegister(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BonusRegister"; RDLC = "Payroll.Report.RDLC.rptLoyaltyBonusRegister.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForBonusRegisterForSGS(ReportItem item, DataTable oFinalDT, string sBonusName) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BonusRegister"; RDLC = "Payroll.Report.RDLC.BonusRegister.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); rParam = new ReportParameter("BonusName", sBonusName); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForBonusPaySlip(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BonusPaySlip"; RDLC = "Payroll.Report.RDLC.BonusPayslp.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForOPIRegister(ReportItem item, DataTable oFinalDT, string sOPIMonth) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_OPIRegister"; RDLC = "Payroll.Report.RDLC.OPIRegister.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportParameter rParam = new ReportParameter("OPIMonth", sOPIMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForOPITotalValueRegister(ReportItem item, DataTable oFinalDT, string sFromOPIMonth, string sToOPIMonth) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_OPITotalValueRegister"; RDLC = "Payroll.Report.RDLC.OPITotalValueRegister.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportParameter rParam1 = new ReportParameter("FromOPIMonth", sFromOPIMonth); _parameters.Add(rParam1); ReportParameter rParam2 = new ReportParameter("ToOPIMonth", sToOPIMonth); _parameters.Add(rParam2); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowMameorandumDetails(DataSet dSet, DateTime dMemoDate, string sEmpName, string sMemoType) { string RDLC; RDLC = "Payroll.Report.RDLC.Memorandum.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("MemorandumTo", sEmpName)); _parameters.Add(new ReportParameter("Subject", sMemoType)); _parameters.Add(new ReportParameter("MDate", dMemoDate.ToString("dd MMM yyyy"))); this.ReportParams = _parameters; //this.ReportParams = if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowMameorandumDetails2(DataSet dSet, DateTime dMemoDate, string sEmpName, string sMemoType) { string RDLC; RDLC = "Payroll.Report.RDLC.Memorandum.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } DataSet ds = SalaryMonthly.CostCenterCount(GlobalFunctions.LastDateOfMonth(dMemoDate)); GetParameters(); ReportItem ritm = new ReportItem(); ObjectsTemplate ccs = Costcenter.Get(); _parameters.Add(new ReportParameter("MemorandumTo", sEmpName)); _parameters.Add(new ReportParameter("Subject", sMemoType)); _parameters.Add(new ReportParameter("MDate", dMemoDate.ToString("dd MMM yyyy"))); _parameters.Add(new ReportParameter("cccount", ds.Tables[0].Rows.Count.ToString())); this.ReportParams = _parameters; //this.ReportParams = if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } //public void ShowDlgForBankRegister(ReportItem item, DataTable oFinalDT) //{ // DataSet dSet = new DataSet(); // string RDLC; // oFinalDT.TableName = "PayrollDataSet_BonusBankAdvice"; // RDLC = "Payroll.Report.RDLC.BonusBankAdvice.rdlc"; // dSet.Tables.Add(oFinalDT); // _PATH = Application.StartupPath + @"\Logo.jpg"; // _item = item; // ReportViewer.Refresh(); // ReportViewer.LocalReport.DataSources.Clear(); // ReportViewer.LocalReport.EnableExternalImages = true; // try // { // if (dSet != null && dSet.Tables.Count > 0) // { // foreach (DataTable table in dSet.Tables) // { // ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); // //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); // } // ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; // } // //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; // GetParameters(); // this.ReportParams = _parameters; // if (reportParameters != null) // ReportViewer.LocalReport.SetParameters(reportParameters); // } // catch (Exception ex) // { // throw new Exception(ex.Message, ex); // } // this.ShowDialog(); //} public void ShowDlgForBankRegister(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "dsCompany_BonusBankAdvice"; RDLC = "Payroll.Report.RDLC.BonusBankAdvice.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForBonusBankDisbursement(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "dsCompany_BonusBankAdvice"; RDLC = "Payroll.Report.RDLC.BonusBankDisbursement.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForJVReport(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_JVReport"; RDLC = "Payroll.Report.RDLC.jvReportCEL.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.png"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForJVReport(ReportItem item, DataTable oFinalDT, DateTime dt) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_JVReport"; RDLC = "Payroll.Report.RDLC.JVReport.rdlc"; dSet.Tables.Add(oFinalDT); _salaryMonth = dt; _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForJVsalaryDetail(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_JVSalaryDetail"; RDLC = "Payroll.Report.RDLC.JVSalaryDetail.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForCapitalization(ReportItem item, DataTable oFinalDT, DateTime month) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "dsCompany_dtCapitalization"; RDLC = "Payroll.Report.RDLC.rptCapitalization.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); rParam = new ReportParameter("Month", month.ToString("MMMM, yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForPNLReport(ReportItem item, DataTable oFinalDT, DateTime month) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_PNLReport"; RDLC = "Payroll.Report.RDLC.PNLReportNew.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", month.ToString("MMMM, yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForADIReport(ReportItem item, DataTable oFinalDT, DateTime month) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "dsCompany_dtCapitalization"; RDLC = "Payroll.Report.RDLC.rptADIReport.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); rParam = new ReportParameter("Month", month.ToString("MMMM, yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForJVLocationWReport(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; //oFinalDT.TableName = "PayrollDataSet_JVLoactionWReport"; //RDLC = "Payroll.Report.RDLC.JVReport.rdlc"; oFinalDT.TableName = "PayrollDataSet_JVReport"; RDLC = "Payroll.Report.RDLC.JVReport.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForJVBranchWReport(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BWiseJV"; RDLC = "Payroll.Report.RDLC.BranchWiseJVSetup.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForJVSummaryReport(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_JVSummaryReport"; RDLC = "Payroll.Report.RDLC.JVSummaryReport.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForReport108(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_Report108"; RDLC = "Payroll.Report.RDLC.Report108.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } #region For Attendance Report public void ShowDlgForEmpDailyAttn(DataSet dSet, string RDLC) { _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetBasicParameters(); //this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForEmpInfo(DataSet dSet, string RDLC) { _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetBasicParameters(); //this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForDailyInOut(ReportItem item, DataTable oDailyInOut, DateTime inOutDate) { DataSet dSet = new DataSet(); string RDLC; oDailyInOut.TableName = "AttendenceDataSet_DailyInOut"; RDLC = "Payroll.Report.Attendence.RDLC.DailyInOut.rdlc"; dSet.Tables.Add(oDailyInOut); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; _parameters = new List(); rParam = new ReportParameter("AttnDate", inOutDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForDailyAbsent(ReportItem item, DataTable oDailyAbsent, DateTime absentDate) { DataSet dSet = new DataSet(); string RDLC; oDailyAbsent.TableName = "AttendenceDataSet_DailyAbsent"; RDLC = "Payroll.Report.Attendence.RDLC.DailyAbsent.rdlc"; dSet.Tables.Add(oDailyAbsent); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; _parameters = new List(); rParam = new ReportParameter("AttnDate", absentDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForMonthlyAttn(ReportItem item, DataTable oMonthlyAttn, DateTime fromDate, DateTime toDate) { DataSet dSet = new DataSet(); string RDLC; oMonthlyAttn.TableName = "AttendenceDataSet_MonthlyAttn"; RDLC = "Payroll.Report.Attendence.RDLC.MonthlyAttn.rdlc"; dSet.Tables.Add(oMonthlyAttn); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } _parameters = new List(); rParam = new ReportParameter("FromDate", fromDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", toDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForMonthlyDetailAttn(ReportItem item, DataTable oMonthlyDetailAttn, DateTime fromDate, DateTime toDate) { DataSet dSet = new DataSet(); string RDLC; oMonthlyDetailAttn.TableName = "AttendenceDataSet_MonthlyDetail"; RDLC = "Payroll.Report.Attendence.RDLC.MontjlyDetail.rdlc"; dSet.Tables.Add(oMonthlyDetailAttn); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } _parameters = new List(); rParam = new ReportParameter("Fromdate", fromDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", toDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForAttnInfo(ReportItem item, DataTable oAttnInfo) { DataSet dSet = new DataSet(); string RDLC; oAttnInfo.TableName = "AttendenceDataSet_EmpAttenInfo"; RDLC = "Payroll.Report.Attendence.RDLC.EmpAttenInfo.rdlc"; dSet.Tables.Add(oAttnInfo); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } //For Buyer public void ShowDlgForDailyInOutForBuyer(ReportItem item, DataTable oDailyInOut, DateTime inOutDate) { DataSet dSet = new DataSet(); string RDLC; oDailyInOut.TableName = "AttendenceDataSet_DailyInOut"; RDLC = "Payroll.Report.Attendence.RDLC.DailyInOut.rdlc"; dSet.Tables.Add(oDailyInOut); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; _parameters = new List(); rParam = new ReportParameter("AttnDate", inOutDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForDailyAbsentForBuyer(ReportItem item, DataTable oDailyAbsent, DateTime absentDate) { DataSet dSet = new DataSet(); string RDLC; oDailyAbsent.TableName = "AttendenceDataSet_DailyAbsent"; RDLC = "Payroll.Report.Attendence.RDLC.DailyAbsent.rdlc"; dSet.Tables.Add(oDailyAbsent); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; _parameters = new List(); rParam = new ReportParameter("AttnDate", absentDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForMonthlyAttnForBuyer(ReportItem item, DataTable oMonthlyAttn, DateTime fromDate, DateTime toDate) { DataSet dSet = new DataSet(); string RDLC; oMonthlyAttn.TableName = "AttendenceDataSet_MonthlyAttn"; RDLC = "Payroll.Report.Attendence.RDLC.MonthlyAttn.rdlc"; dSet.Tables.Add(oMonthlyAttn); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } _parameters = new List(); rParam = new ReportParameter("FromDate", fromDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", toDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowDlgForMonthlyDetailAttnForBuyer(ReportItem item, DataTable oMonthlyDetailAttn, DateTime fromDate, DateTime toDate) { DataSet dSet = new DataSet(); string RDLC; oMonthlyDetailAttn.TableName = "AttendenceDataSet_MonthlyDetail"; RDLC = "Payroll.Report.Attendence.RDLC.MontjlyDetail.rdlc"; dSet.Tables.Add(oMonthlyDetailAttn); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } _parameters = new List(); rParam = new ReportParameter("Fromdate", fromDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", toDate.ToString("dd MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; GetBasicParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } // public void GetBasicParameters() { //_parameters = new List(); Payroll.BO.SystemInformation systemInfo = Payroll.BO.SystemInformation.Get(); if (reportParameters == null) { reportParameters = new List(); } _PATH = Application.StartupPath + @"\Resource\Logo.png"; if (!File.Exists(_PATH)) { _PATH = Application.StartupPath + @"\Logo.jpg"; } rParam = new ReportParameter("Logo", _PATH); reportParameters.Add(rParam); rParam = new ReportParameter("CompanyInfo", systemInfo.name.ToString()); reportParameters.Add(rParam); rParam = new ReportParameter("Address", systemInfo.corporateAddress); reportParameters.Add(rParam); rParam = new ReportParameter("Phone", systemInfo.TelephoneNo); reportParameters.Add(rParam); rParam = new ReportParameter("Fax", ""); reportParameters.Add(rParam); rParam = new ReportParameter("Email", systemInfo.email); reportParameters.Add(rParam); } #endregion public void GetParameters() { Payroll.BO.SystemInformation _systemInfo = Payroll.BO.SystemInformation.Get(); _parameters = new List(); _PATH = Application.StartupPath + @"\Resource\Logo.png"; if (!File.Exists(_PATH)) { _PATH = Application.StartupPath + @"\Logo.jpg"; } rParam = new ReportParameter("Logo", _PATH); _parameters.Add(rParam); rParam = new ReportParameter("CompanyInfo", _systemInfo.name.ToString()); _parameters.Add(rParam); //if (_item != null) //{ rParam = new ReportParameter("SearchCriteria", "Journal Voucher for month - " + _salaryMonth.ToString("dd-MMM-yyyy"), true); _parameters.Add(rParam); //} //else //{ // rParam = new ReportParameter("SearchCriteria", "", false); // _parameters.Add(rParam); //} rParam = new ReportParameter("Address", _systemInfo.corporateAddress.ToString()); //rParam = new ReportParameter("Address", "6th-9th Floors ,Noor Tower,110, Bir Uttam C.R Dattta Road, Dhaka-1205"); _parameters.Add(rParam); rParam = new ReportParameter("Phone", _systemInfo.TelephoneNo.ToString()); //rParam = new ReportParameter("Phone", "0124232323"); _parameters.Add(rParam); //rParam = new ReportParameter("Fax", "++03423232323"); //_parameters.Add(rParam); //rParam = new ReportParameter("Email", _systemInfo.webAddress); //_parameters.Add(rParam); } public void GetParameters2() { Payroll.BO.SystemInformation _systemInfo = Payroll.BO.SystemInformation.Get(); _parameters = new List(); _PATH = Application.StartupPath + @"\Resource\Logo.png"; if (!File.Exists(_PATH)) { _PATH = Application.StartupPath + @"\Logo.jpg"; } rParam = new ReportParameter("Logo", _PATH); _parameters.Add(rParam); rParam = new ReportParameter("CompanyInfo", _systemInfo.name.ToString()); _parameters.Add(rParam); if (_item != null) { rParam = new ReportParameter("SearchCriteria", " ", _item.IsSearchCriteria); _parameters.Add(rParam); } else { rParam = new ReportParameter("SearchCriteria", sSearchDate); _parameters.Add(rParam); } rParam = new ReportParameter("Address", _systemInfo.corporateAddress.ToString()); //rParam = new ReportParameter("Address", "6th-9th Floors ,Noor Tower,110, Bir Uttam C.R Dattta Road, Dhaka-1205"); _parameters.Add(rParam); rParam = new ReportParameter("Phone", _systemInfo.TelephoneNo.ToString()); //rParam = new ReportParameter("Phone", "0124232323"); _parameters.Add(rParam); //rParam = new ReportParameter("Fax", "++03423232323"); //_parameters.Add(rParam); //rParam = new ReportParameter("Email", _systemInfo.webAddress); //_parameters.Add(rParam); } public void GetParametersForNLoan() { Payroll.BO.SystemInformation _systemInfo = Payroll.BO.SystemInformation.Get(); _parameters = new List(); _PATH = Application.StartupPath + @"\Resource\Logo.png"; if (!File.Exists(_PATH)) { _PATH = Application.StartupPath + @"\Logo.jpg"; } rParam = new ReportParameter("Logo", _PATH); _parameters.Add(rParam); //rParam = new ReportParameter("CompanyInfo", _systemInfo.name.ToString()); //_parameters.Add(rParam); if (_item != null) { rParam = new ReportParameter("SearchCriteria", " ", _item.IsSearchCriteria); _parameters.Add(rParam); } else { rParam = new ReportParameter("SearchCriteria", " ", false); _parameters.Add(rParam); } //rParam = new ReportParameter("Address", _systemInfo.corporateAddress.ToString()); ////rParam = new ReportParameter("Address", "6th-9th Floors ,Noor Tower,110, Bir Uttam C.R Dattta Road, Dhaka-1205"); //_parameters.Add(rParam); //rParam = new ReportParameter("Phone", _systemInfo.TelephoneNo.ToString()); ////rParam = new ReportParameter("Phone", "0124232323"); //_parameters.Add(rParam); //rParam = new ReportParameter("Fax", "++03423232323"); //_parameters.Add(rParam); //rParam = new ReportParameter("Email", _systemInfo.webAddress); //_parameters.Add(rParam); } public void GetParametersForBasic() { // Payroll.BO.SystemInformation _systemInfo = Payroll.BO.SystemInformation.Get(); _parameters = new List(); _PATH = Application.StartupPath + @"\Resource\Logo.png"; if (!File.Exists(_PATH)) { _PATH = Application.StartupPath + @"\Logo.jpg"; } rParam = new ReportParameter("Logo", _PATH); _parameters.Add(rParam); rParam = new ReportParameter("CompanyInfo", "ZN Tower (Siemens House) Gulshan Avenue / Road # 8, Plot # 2Gulshan-1, Dhaka-1212"); //rParam = new ReportParameter("CompanyInfo", "Novartis (Bangladesh) Limited"); _parameters.Add(rParam); //rParam = new ReportParameter("SearchCriteria", " ", false); //_parameters.Add(rParam); rParam = new ReportParameter("Address", "Road # 113/A Gulshan -2, Dhaka"); //rParam = new ReportParameter("Address", "House 510, Road 2A, Dhanmondi, Dhaka-1209"); _parameters.Add(rParam); rParam = new ReportParameter("Phone", "0124232323"); //rParam = new ReportParameter("Phone", "+88"); _parameters.Add(rParam); rParam = new ReportParameter("Fax", "++03423232323"); _parameters.Add(rParam); rParam = new ReportParameter("Email", "info@DHL.com"); _parameters.Add(rParam); } private void fReportViewer_Load(object sender, EventArgs e) { this.rptViewer.RefreshReport(); this.rptViewer.RefreshReport(); } internal void ShowDlgForIndivisualLoanReport(ReportItem item, DataTable dTable) { DataSet dSet = new DataSet(); string RDLC; dTable.TableName = "PayrollDataSet_IndividualLoanReport"; RDLC = "Payroll.Report.RDLC.IndividualLoanReport.rdlc"; dSet.Tables.Add(dTable); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForindividualLoanReportByLoan(DataTable dTable) { DataSet dSet = new DataSet(); string RDLC; dTable.TableName = "PayrollDataSet_IndividualLoanReport"; RDLC = "Payroll.Report.RDLC.IndividualLoanReport.rdlc"; dSet.Tables.Add(dTable); _PATH = Application.StartupPath + @"\Logo.jpg"; //_item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void showEmployeeRetirementReport(DataTable dTable) { DataSet dSet = new DataSet(); string RDLC; dTable.TableName = "PayrollDataSet_EmployeeRetirement"; RDLC = "Payroll.Report.RDLC.EmployeeRetirement.rdlc"; dSet.Tables.Add(dTable); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } private void rptViewer_ReportExport(object sender, ReportExportEventArgs e) { } public void rptViewer_ShowIndividualEmployeeDetails(DataSet dSet, string sEmpPhptpPath) { ObjectsTemplate oPhotoPaths = PhotoPath.Get(); string RDLC; RDLC = "Payroll.Report.RDLC.EmpPersonalInformation.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); if (sEmpPhptpPath != string.Empty) rParam = new ReportParameter("EmployeePicture", oPhotoPaths[0].EmployeePhoto + "\\" + sEmpPhptpPath); else rParam = new ReportParameter("EmployeePicture", ""); // string t = _oPhotoPaths[0].EmployeePhoto + "\\" + sEmpPhptpPath; _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowShowAllPFandDetails(DataSet dSet) { string RDLC; RDLC = "Payroll.Report.RDLC.ShowITPfAndOtherDetails.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); //_parameters.Add( this.ReportParams = _parameters; //this.ReportParams = if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void showLafForAllEmployees(DataSet dSet, DateTime dFromdate, DateTime dToDate) { string RDLC; RDLC = "Payroll.Report.RDLC.LFAforIndividual.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportParameter rpFromdate = new ReportParameter("FromDate", dFromdate.ToString("dd MMM yyyy")); _parameters.Add(rpFromdate); ReportParameter rpToDate = new ReportParameter("ToDate", dToDate.ToString("dd MMM yyyy")); _parameters.Add(rpToDate); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void showLafEligibleEmployees(DataSet dSet, DateTime dFromdate, DateTime dToDate) { string RDLC; RDLC = "Payroll.Report.RDLC.LFAEligibleEmployee.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportParameter rpFromdate = new ReportParameter("FromDate", dFromdate.ToString("dd MMM yyyy")); _parameters.Add(rpFromdate); ReportParameter rpToDate = new ReportParameter("ToDate", dToDate.ToString("dd MMM yyyy")); _parameters.Add(rpToDate); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowPmpObjectives(DataSet ds, DateTime year) { string RDLC; RDLC = "Payroll.Report.RDLC.PMPObjectives.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; DataTable ndt = ds.Tables[1]; try { if (ds != null && ds.Tables.Count > 0) { foreach (DataTable table in ds.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("PmpYear", year.ToString("yyyy"))); string associateName = String.Empty; string managerName = String.Empty; if (ndt.Rows.Count >= 1) { if (ndt.Rows[0]["AssociateName"] != null) associateName = Convert.ToString(ndt.Rows[0]["AssociateName"]); if (ndt.Rows[0]["NameOfManager"] != null) managerName = Convert.ToString(ndt.Rows[0]["NameOfManager"]); } _parameters.Add(new ReportParameter("associateName", associateName)); _parameters.Add(new ReportParameter("managerName", managerName)); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); this.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } public void ShowPmpValueBehavoirRatings(DataSet ds, DateTime year) { string RDLC; RDLC = "Payroll.Report.RDLC.PmpEmployeeValueBehaviors.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (ds != null && ds.Tables.Count > 0) { foreach (DataTable table in ds.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("PmpYear", year.ToString("yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); this.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } public void ShowBasicEmpDataForPmp(DataSet ds, DateTime year) { string RDLC; RDLC = "Payroll.Report.RDLC.PmpReport.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (ds != null && ds.Tables.Count > 0) { foreach (DataTable table in ds.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("PmpYear", year.ToString("yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); this.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } public void ShowCloloredBoxReport(DataSet ds, DateTime year) { string RDLC; RDLC = "Payroll.Report.RDLC.PmpManager.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (ds != null && ds.Tables.Count > 0) { foreach (DataTable table in ds.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("PmpYear", year.ToString("yyyy"))); _parameters.Add(new ReportParameter("point", "3")); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); this.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } public void ShowCloloredBoxReportFroInDirectManager(DataSet ds, DateTime year) { string RDLC; RDLC = "Payroll.Report.RDLC.PmpIndirectManager.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (ds != null && ds.Tables.Count > 0) { foreach (DataTable table in ds.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("PmpYear", year.ToString("yyyy"))); _parameters.Add(new ReportParameter("point", "3")); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); this.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } public void ShowReportForEmpTransfer(string TableName, string RDLCName, DataTable oDt, DateTime tDt) { DataSet ds = new DataSet(); ds.Tables.Add(oDt); string RDLC; RDLC = "Payroll.Report.RDLC.EmployeeTransfer.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (ds != null && ds.Tables.Count > 0) { foreach (DataTable table in ds.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("date", tDt.ToString("MMM yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); this.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } public void ShowReportForEmpContinueFromDiscontinue(string TableName, string RDLCName, DataTable oDt, string tDt) { DataSet ds = new DataSet(); ds.Tables.Add(oDt); string RDLC; RDLC = "Payroll.Report.RDLC.EmployeeContinueFromDiscontinue.rdlc"; _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (ds != null && ds.Tables.Count > 0) { foreach (DataTable table in ds.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("date", tDt)); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); this.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } internal void ShowDlgForCCDetailWReportByMonth(DateTime startDate, Payroll.Report.PayrollDataSet.PayrollDataSet.CCDetailReportDataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_CCDetailReport"; RDLC = "Payroll.Report.RDLC.CCDetailReport.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowEmpITAndBasic(DataTable oFinalDT, DateTime tDt) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpITInfoAndBasicInfo"; RDLC = "Payroll.Report.RDLC.EmployeeITAndBasicInfo.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("date", tDt.ToString("MMM yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowRptForSalaryStracture(Payroll.Report.PayrollDataSet.PayrollDataSet.SalaryStractureDataTable oSalDt) { DataSet dSet = new DataSet(); string RDLC; oSalDt.TableName = "PayrollDataSet_SalaryStracture"; RDLC = "Payroll.Report.RDLC.SalaryStracture.rdlc"; dSet.Tables.Add(oSalDt); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //ReportItem ritm = new ReportItem(); //_parameters.Add(new ReportParameter("date", tDt.ToString("MMM yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowRetirement(Payroll.Report.PayrollDataSet.PayrollDataSet.EmployeeRetirementDataTable oSalDt) { DataSet dSet = new DataSet(); string RDLC; oSalDt.TableName = "PayrollDataSet_EmployeeRetirement"; RDLC = "Payroll.Report.RDLC.EmployeeRetirement.rdlc"; dSet.Tables.Add(oSalDt); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //ReportItem ritm = new ReportItem(); //_parameters.Add(new ReportParameter("date", tDt.ToString("MMM yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDataForDeductedTaxAmount(Payroll.Report.PayrollDataSet.PayrollDataSet.DedtaxByMonthDataTable oSalDt, DateTime dedDate) { DataSet dSet = new DataSet(); string RDLC; oSalDt.TableName = "PayrollDataSet_DedtaxByMonth"; RDLC = "Payroll.Report.RDLC.ITDeductionByMonth.rdlc"; dSet.Tables.Add(oSalDt); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("TaxDedDate", dedDate.ToString("MMM yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowSalaryForYear(Payroll.Report.PayrollDataSet.PayrollDataSet.SalarySheetByMonthDataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_SalarySheetByMonth"; RDLC = "Payroll.Report.RDLC.PayrollRegister.rdlc"; dSet.Tables.Add(oFinalDT); PayrollDataSet.PayrollDataSet.SalarySheetDataTable dTSalarySheet = new Payroll.Report.PayrollDataSet.PayrollDataSet.SalarySheetDataTable(); dTSalarySheet.TableName = "PayrollDataSet_SalarySheet"; dSet.Tables.Add(dTSalarySheet); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); var NM = from DataRow dr in oFinalDT.Rows select Convert.ToString(dr["EmpName"]); string name = NM.First(); var DT = from DataRow dr in oFinalDT.Rows select Convert.ToDateTime(dr["MonthOfYear"]); string date = DT.First().ToString("yyyy"); rParam = new ReportParameter("Name", name); _parameters.Add(rParam); date = "From Jan to Dec " + date; ReportParameter rrParam = new ReportParameter("Date", date); _parameters.Add(rrParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowEmpServiceLengthReport(Payroll.Report.PayrollDataSet.PayrollDataSet.EmployeeServiceLengthDataTable oSalDt) { DataSet dSet = new DataSet(); string RDLC; oSalDt.TableName = "PayrollDataSet_EmployeeServiceLength"; RDLC = "Payroll.Report.RDLC.EmployeeServiceLength.rdlc"; dSet.Tables.Add(oSalDt); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //ReportItem ritm = new ReportItem(); //_parameters.Add(new ReportParameter("date", tDt.ToString("MMM yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowPayRollRegisterByAll(Payroll.Report.PayrollDataSet.PayrollDataSet.PayRollRegisterForAllDataTable oSalDt) { DataSet dSet = new DataSet(); string RDLC; oSalDt.TableName = "PayrollDataSet_PayRollRegisterForAll"; RDLC = "Payroll.Report.RDLC.PayrollRegisterByAll.rdlc"; dSet.Tables.Add(oSalDt); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //ReportItem ritm = new ReportItem(); //_parameters.Add(new ReportParameter("date", tDt.ToString("MMM yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDataForDeductedTaxAmountByDateRange(DateTime startDate, DateTime endDate, Payroll.Report.PayrollDataSet.PayrollDataSet.DedtaxByMonthRangeDataTable oSalDt) { DataSet dSet = new DataSet(); string RDLC; oSalDt.TableName = "PayrollDataSet_DedtaxByMonthRange"; RDLC = "Payroll.Report.RDLC.DedtaxByMonthRange.rdlc"; dSet.Tables.Add(oSalDt); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //ReportItem ritm = new ReportItem(); _parameters.Add(new ReportParameter("startDate", startDate.ToString("MMM yyyy"))); //ReportItem rritm = new ReportItem(); _parameters.Add(new ReportParameter("endDate", endDate.ToString("MMM yyyy"))); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowEERS(DataSet dSet, string dataTablename, string RDLC) { _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowOldPayslip(DataSet dSet, string RDLC) { _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowMonthlyWorkingHour(DataTable dTEmpGratuity, string Month) { DataSet dSet = new DataSet(); string RDLC; dTEmpGratuity.TableName = "dsCompany_MonthlyWorkingHour"; RDLC = "Payroll.Report.RDLC.MonthlyWorkingHour.rdlc"; dSet.Tables.Add(dTEmpGratuity); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", Month); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowEmpGratuityProvision(DataTable dTEmpGratuity, string Month) { DataSet dSet = new DataSet(); string RDLC; dTEmpGratuity.TableName = "PayrollDataSet_GratuityProvision"; RDLC = "Payroll.Report.RDLC.GratuityProvision.rdlc"; dSet.Tables.Add(dTEmpGratuity); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", Month); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowGratuityLedgerData(DataTable oGratuityLedger, string DateRange, string OpeningDate, string Employee) { DataSet dSet = new DataSet(); string RDLC; oGratuityLedger.TableName = "PayrollDataSet_GratuityLedger"; RDLC = "Payroll.Report.RDLC.GratuityLedger.rdlc"; dSet.Tables.Add(oGratuityLedger); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("EmpName", Employee); _parameters.Add(rParam); rParam = new ReportParameter("DateRange", DateRange); _parameters.Add(rParam); rParam = new ReportParameter("OpeningMonth", OpeningDate); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowGRRegistryData(DataTable registryDataTable, string firstDate, string lastDate) { DataSet dSet = new DataSet(); string RDLC; registryDataTable.TableName = "PayrollDataSet_GratuityRegister"; RDLC = "Payroll.Report.RDLC.GratuityRegister.rdlc"; dSet.Tables.Add(registryDataTable); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FirstMonth", firstDate); _parameters.Add(rParam); rParam = new ReportParameter("LastMonth", lastDate); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowEmpGratuityBalance(DataTable dTEmpGratuity, string Month) { DataSet dSet = new DataSet(); string RDLC; dTEmpGratuity.TableName = "PayrollDataSet_GratuityProvision"; RDLC = "Payroll.Report.RDLC.GratuityBalance.rdlc"; dSet.Tables.Add(dTEmpGratuity); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", Month); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void PreviewReport(DataTable dt, string caption) { Payroll.BO.SystemInformation sysInfo = null; this.Text = caption; DataSet dSet = new DataSet(); string RDLC; dt.TableName = "PayrollDataSet_EncashAmount"; RDLC = "Payroll.Report.RDLC.rptEncashAmount.rdlc"; dSet.Tables.Add(dt); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Caption", caption); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForSalarySheetWithOPIItems(ReportItem reportItem, DataTable dTSalarySheet) { DataSet dSet = new DataSet(); string RDLC; dTSalarySheet.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.SalarySheet.rdlc"; dSet.Tables.Add(dTSalarySheet); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //rParam = new ReportParameter("DynamicGroup",DynamicGroup); //_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForSalarySheetIDLCWithOPIItems(ReportItem reportItem, DataTable dTSalarySheet, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTSalarySheet.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.SalarySheetForIDLCWithOPIItems.rdlc"; dSet.Tables.Add(dTSalarySheet); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = reportItem; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForEmployeeConfirmation(DataSet dSet, string RDLC, DateTime dConfirmationMonth) { _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); //ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("", table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //ReportViewer.LocalReport.ReportEmbeddedResource = "Payroll.Report.RDLC.Payslip.rdlc"; GetParameters(); rParam = new ReportParameter("ConfirmationMonth", dConfirmationMonth.ToString("MMMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForBankRegister(ReportItem item, DataTable oFinalDT, DataTable oBankLetter, string totalTaka) { #region Old Code //DataSet dSet = new DataSet(); //string RDLC; //dBonusBankData.TableName = "PayrollDataSet_BankAdvice"; ////dBonusBankData.TableName = "PayrollDataSet_BonusBankAdvice"; //bankAdviceLetter.TableName = "PayrollDataSet_BankAdviceLetter"; ////RDLC = "Payroll.Report.RDLC.NewBonusBankAdvice.rdlc"; //RDLC = "Payroll.Report.RDLC.BankAdvice.rdlc"; //dSet.Tables.Add(dBonusBankData); //dSet.Tables.Add(bankAdviceLetter); //_PATH = Application.StartupPath + @"\Logo.jpg"; //_item = reportItem; //ReportViewer.Refresh(); //ReportViewer.LocalReport.DataSources.Clear(); //ReportViewer.LocalReport.EnableExternalImages = true; //try //{ // if (dSet != null && dSet.Tables.Count > 0) // { // foreach (DataTable table in dSet.Tables) // { // ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); // } // ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; // } // GetParameters(); // rParam = new ReportParameter("TotalTaka", totalTaka); // _parameters.Add(rParam); // this.ReportParams = _parameters; // if (reportParameters != null) // ReportViewer.LocalReport.SetParameters(reportParameters); //} //catch (Exception ex) //{ // throw new Exception(ex.Message, ex); //} //this.ShowDialog(); #endregion DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_BankAdvice"; //oBankLetter.TableName = "PayrollDataSet_BankAdviceLetter"; RDLC = "Payroll.Report.RDLC.BankAdvice.rdlc"; dSet.Tables.Add(oFinalDT); //dSet.Tables.Add(oBankLetter); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("TotalTaka", totalTaka); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void GetPayScaleData(DataTable dTPayScale, string Gradename) { DataSet dSet = new DataSet(); string RDLC; dTPayScale.TableName = "PayrollDataSet_PayScaleSetUp"; RDLC = "Payroll.Report.RDLC.PayScaleSetUp.rdlc"; dSet.Tables.Add(dTPayScale); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("GradeName", Gradename); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForDetailOtherPayrollItems(ReportItem reportItem, DataTable dtOtherPayrollItems, string sOPIMonth) { DataSet dSet = new DataSet(); string RDLC; dtOtherPayrollItems.TableName = "PayrollDataSet_DetailOtherPayrollItems"; RDLC = "Payroll.Report.RDLC.DetailOtherPayrollItems.rdlc"; dSet.Tables.Add(dtOtherPayrollItems); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("OPIMonth", sOPIMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void PayrollSummary(ReportItem reportItem, DataTable dTPayrollSummary, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTPayrollSummary.TableName = "PayrollDataSet_PayrollSummary"; RDLC = "Payroll.Report.RDLC.PayrollSummary.rdlc"; dSet.Tables.Add(dTPayrollSummary); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDeductReport(ReportItem reportItem, DataTable dTSalarySheet, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTSalarySheet.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.DeductReport.rdlc"; dSet.Tables.Add(dTSalarySheet); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void BranchWiseSalary(ReportItem reportItem, DataTable dtBranchWiseSalary, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dtBranchWiseSalary.TableName = "PayrollDataSet_BranchWiseSalary"; RDLC = "Payroll.Report.RDLC.BranchWiseSalarySummary.rdlc"; dSet.Tables.Add(dtBranchWiseSalary); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void CostCenterWiseSalarySheet(ReportItem reportItem, DataTable dTSalarySheet, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTSalarySheet.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.CostCenterWiseSalaryDetail.rdlc"; dSet.Tables.Add(dTSalarySheet); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void DivisionWiseReport(ReportItem reportItem, DataTable dTPayrollSummary, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTPayrollSummary.TableName = "PayrollDataSet_PayrollSummary"; RDLC = "Payroll.Report.RDLC.DivisionWiseReport.rdlc"; dSet.Tables.Add(dTPayrollSummary); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void DepartmentWiseReport(ReportItem reportItem, DataTable dTPayrollSummary, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTPayrollSummary.TableName = "PayrollDataSet_PayrollSummary"; RDLC = "Payroll.Report.RDLC.DepartmentWiseReport.rdlc"; dSet.Tables.Add(dTPayrollSummary); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } //internal void CTCDetailReport(ReportItem reportItem, Payroll.Report.PayrollDataSet.PayrollDataSet.PayrollSummaryDataTable dTPayrollSummary, string salaryMonth) //{ // DataSet dSet = new DataSet(); // string RDLC; // dTPayrollSummary.TableName = "PayrollDataSet_PayrollSummary"; // RDLC = "Payroll.Report.RDLC.CTCDetailReport.rdlc"; // dSet.Tables.Add(dTPayrollSummary); // _PATH = Application.StartupPath + @"\Logo.jpg"; // ReportViewer.Refresh(); // ReportViewer.LocalReport.DataSources.Clear(); // ReportViewer.LocalReport.EnableExternalImages = true; // try // { // if (dSet != null && dSet.Tables.Count > 0) // { // foreach (DataTable table in dSet.Tables) // { // ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); // } // ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; // } // GetParameters(); // rParam = new ReportParameter("SalaryMonth", salaryMonth); // _parameters.Add(rParam); // this.ReportParams = _parameters; // if (reportParameters != null) // ReportViewer.LocalReport.SetParameters(reportParameters); // } // catch (Exception ex) // { // throw new Exception(ex.Message, ex); // } // this.ShowDialog(); //} internal void CCWiseFinance(ReportItem reportItem, DataTable dTPayrollSummary, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTPayrollSummary.TableName = "PayrollDataSet_PayrollSummary"; RDLC = "Payroll.Report.RDLC.CostCenterReportToFinance.rdlc"; dSet.Tables.Add(dTPayrollSummary); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void EmpJoiningReport(ReportItem reportItem, DataTable dTJoining, string FormDate, string ToDate) { DataSet dSet = new DataSet(); string RDLC; dTJoining.TableName = "PayrollDataSet_EmpJoiningReport"; RDLC = "Payroll.Report.RDLC.JoiningReport.rdlc"; dSet.Tables.Add(dTJoining); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FormDate", FormDate); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", ToDate); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void IDLCCCWiseSummary(ReportItem reportItem, DataTable dTPayrollSummary, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTPayrollSummary.TableName = "PayrollDataSet_PayrollSummary"; RDLC = "Payroll.Report.RDLC.CostCenterWiseSummary.rdlc"; dSet.Tables.Add(dTPayrollSummary); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForIDLCPaySlip(ReportItem reportItem, DataTable PayslipData, string _SalaryMonth) { DataSet dSet = new DataSet(); string RDLC; PayslipData.TableName = "PayrollDataSet_Payslip"; RDLC = "Payroll.Report.RDLC.IDLCPayslip.rdlc"; dSet.Tables.Add(PayslipData); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = reportItem; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", _SalaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void IncrementDetailReport(ReportItem reportItem, DataTable dTIncrement, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTIncrement.TableName = "PayrollDataSet_Increment"; RDLC = "Payroll.Report.RDLC.IncrementDetail.rdlc"; dSet.Tables.Add(dTIncrement); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void HeadWiseReport(DataTable dTSalarySheet, string position, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTSalarySheet.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.HeadWiseReport.rdlc"; dSet.Tables.Add(dTSalarySheet); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); rParam = new ReportParameter("HeadParameter", position); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void IncrementSummaryReport(ReportItem reportItem, DataTable dTIncrement, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; dTIncrement.TableName = "PayrollDataSet_Increment"; RDLC = "Payroll.Report.RDLC.IncrementSummary.rdlc"; dSet.Tables.Add(dTIncrement); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForIDLCOPIPaySlip(ReportItem reportItem, DataTable PayslipData, string salaryMonth) { DataSet dSet = new DataSet(); string RDLC; PayslipData.TableName = "PayrollDataSet_Payslip"; RDLC = "Payroll.Report.RDLC.OPIPayslip.rdlc"; dSet.Tables.Add(PayslipData); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = reportItem; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", salaryMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowItemWiseSalary(ReportItem reportItem, DataTable oSalary, DateTime _SalaryMonth, DateTime toDate, string itemName) { DataSet dSet = new DataSet(); string RDLC; oSalary.TableName = "PayrollDataSet_EmpItemWiseSalary"; RDLC = "Payroll.Report.RDLC.ItemWiseSalary.rdlc"; dSet.Tables.Add(oSalary); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = reportItem; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FormDate", _SalaryMonth.ToString("MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", toDate.ToString("MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ItemName", itemName); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForSalarySheet(DataTable dTSalarySheet, string sEmpID, DateTime formDate, DateTime toDate, string empName) { DataSet dSet = new DataSet(); string RDLC; dTSalarySheet.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.IndEmpSalarySheet.rdlc"; dSet.Tables.Add(dTSalarySheet); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FormDate", formDate.ToString("MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", toDate.ToString("MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("EmpName", empName); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowChangedReport(DataTable dTChanged, DateTime fromDate, DateTime toDate) { DataSet dSet = new DataSet(); string RDLC; dTChanged.TableName = "PayrollDataSet_ChangedSalaryDesig"; RDLC = "Payroll.Report.RDLC.ChangedReport.rdlc"; dSet.Tables.Add(dTChanged); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); //rParam = new ReportParameter("Month", fromDate.ToString("MMM yyyy")); //_parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForSalarySheet(DataTable dTSalarySheet, DateTime fromDate, DateTime todate) { DataSet dSet = new DataSet(); string RDLC; dTSalarySheet.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.SalaryReconciliationForAllItems.rdlc"; dSet.Tables.Add(dTSalarySheet); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FormDate", fromDate.ToString("MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", todate.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowPFLedger(DataTable dTPFLedger, string sEmpID, DateTime FromDate, DateTime toDate, string sEmpName, string sEmpNo, double opening) { DataSet dSet = new DataSet(); string RDLC; dTPFLedger.TableName = "PayrollDataSet_PFLedger"; RDLC = "Payroll.Report.RDLC.PFLedger.rdlc"; dSet.Tables.Add(dTPFLedger); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FormDate", FromDate.ToString("dd-MMM-yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", toDate.ToString("dd-MMM-yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("EmpName", sEmpName); _parameters.Add(rParam); rParam = new ReportParameter("EmpNo", sEmpNo); _parameters.Add(rParam); rParam = new ReportParameter("Opening", opening.ToString()); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void PrintEnvelop(ReportItem item, DataTable oFinalDT) { DataSet dSet = new DataSet(); string RDLC; oFinalDT.TableName = "PayrollDataSet_EmpLifeCycle"; RDLC = "Payroll.Report.RDLC.PrintEnvelop.rdlc"; dSet.Tables.Add(oFinalDT); _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void PreviewtrainingReport(List dataSource, string embeddedResource, string caption) { Payroll.BO.SystemInformation sysInfo = null; DataTable cInformation = null; this.Text = caption; cInformation = new Payroll.Report.PayrollDataSet.dsCompany.ComapnyInformationDataTable(); sysInfo = new Payroll.BO.SystemInformation(); sysInfo = Payroll.BO.SystemInformation.Get(); DataRow row = cInformation.NewRow(); row["Name"] = sysInfo.name; row["Address"] = sysInfo.corporateAddress; row["Email"] = sysInfo.email; row["Web"] = sysInfo.webAddress; cInformation.Rows.Add(row); dataSource.Add(new ReportDataSource("CompanyInformation_ComapnyInformation", cInformation)); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { foreach (ReportDataSource source in dataSource) { ReportViewer.LocalReport.DataSources.Add(source); } ReportViewer.LocalReport.ReportEmbeddedResource = embeddedResource; GetParametersForLeave(); this.rptViewer.LocalReport.SetParameters(_parameters); this.ShowDialog(); } catch (Exception ex) { throw new Exception(ex.Message, ex); } } public void GetParametersForLeave() { Payroll.BO.SystemInformation _systemInfo = Payroll.BO.SystemInformation.Get(); _parameters = new List(); ObjectsTemplate oPRTypes = PayrollType.Get(); PayrollType oPT = oPRTypes.Find(delegate(PayrollType oItemPT) { return oItemPT.ID == Payroll.BO.SystemInformation.CurrentSysInfo.PayrollTypeID; }); _PATH = Application.StartupPath + @"\Logo.jpg"; rParam = new ReportParameter("Logo", _PATH); _parameters.Add(rParam); rParam = new ReportParameter("CompanyInfo", _systemInfo.name.ToString()); _parameters.Add(rParam); rParam = new ReportParameter("Address", _systemInfo.corporateAddress.ToString()); _parameters.Add(rParam); rParam = new ReportParameter("Phone", _systemInfo.TelephoneNo.ToString()); _parameters.Add(rParam); if (_item != null) { rParam = new ReportParameter("SearchCriteria", " ", _item.IsSearchCriteria); _parameters.Add(rParam); } else { rParam = new ReportParameter("SearchCriteria", " ", false); _parameters.Add(rParam); } } internal void ShowDlgForSalaryCertificate(ReportItem reportItem, DataTable oSalary, DateTime FromDate, DateTime toDate) { DataSet dSet = new DataSet(); string RDLC; oSalary.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.SalaryCertificate.rdlc"; dSet.Tables.Add(oSalary); _PATH = Application.StartupPath + @"\Citi Logo.jpg"; string signaturePath = Application.StartupPath + @"\Faisal Signature.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); DateTime formDate = GlobalFunctions.FirstDateOfMonth(FromDate); int fromYear = FromDate.Year; rParam = new ReportParameter("FormDate", formDate.ToString("MMMM dd, yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("FormYear", fromYear.ToString()); _parameters.Add(rParam); DateTime _toDate = GlobalFunctions.LastDateOfMonth(toDate); int toYear = toDate.Year; rParam = new ReportParameter("ToDate", _toDate.ToString("MMMM dd, yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToYear", toYear.ToString()); _parameters.Add(rParam); rParam = new ReportParameter("Signature", signaturePath); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void CommonReportView(ReportItem reportItem, DataSet dSet, string reportName, List parameters) { ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; _item = reportItem; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } } ReportViewer.LocalReport.ReportEmbeddedResource = reportName; GetParameters(); if (parameters != null) { foreach (ReportParameter parItem in parameters) { _parameters.Add(parItem); } } this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public byte[] ShowDlgForPaySlipCiti2(ReportItem item, DataSet oDS) { DataSet dSet = new DataSet(); string RDLC; RDLC = "Payroll.Report.RDLC.EskayefPaySlip.rdlc"; byte[] bytes = null; _PATH = Application.StartupPath + @"\Logo.jpg"; _item = item; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (oDS != null && oDS.Tables.Count > 0) { foreach (DataTable table in oDS.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); Warning[] warnings; string[] streamids; string mimeType; string encoding; string filenameExtension; bytes = ReportViewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out filenameExtension, out streamids, out warnings); } catch (Exception ex) { throw new Exception(ex.Message, ex); } return bytes; } public void CommonReportView(ReportItem reportItem, DataSet dSet, DataSet dSubReportDataSet, string reportName, List parameters, bool defaultParameterNeeded) { _subreportDataSet = dSubReportDataSet; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; _item = reportItem; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } } if (_subreportDataSet != null) { ReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); } ReportViewer.LocalReport.ReportEmbeddedResource = reportName; _parameters = new List(); if (defaultParameterNeeded) { GetParameters(); } if (parameters != null) { foreach (ReportParameter parItem in parameters) { _parameters.Add(parItem); } } this.reportParameters = _parameters; if (reportParameters != null && reportParameters.Count > 0) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void CommonReportViewShow(ReportItem reportItem, DataSet dSet, string reportName, List parameters) { ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; _item = reportItem; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = reportName; } GetParameters(); if (parameters != null) { foreach (ReportParameter parItem in parameters) { _parameters.Add(parItem); } } this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForSalaryCertificate(DataTable dtTempSalarySheet, DataTable dTChallan, DateTime fromDate, DateTime toDate, DataTable dTChallan2) { DataSet dSet = new DataSet(); string RDLC; dtTempSalarySheet.TableName = "PayrollDataSet_SalaryCertificate"; dTChallan.TableName = "PayrollDataSet_TaxChallan"; dTChallan2.TableName = "PayrollDataSet_ChallanNoWithMonth"; RDLC = "Payroll.Report.RDLC.NewSalaryCertificate.rdlc"; dSet.Tables.Add(dtTempSalarySheet); dSet.Tables.Add(dTChallan); dSet.Tables.Add(dTChallan2); _PATH = Application.StartupPath + @"\Citi Logo.jpg"; string signaturePath = Application.StartupPath + @"\Faisal Signature.jpg"; string barLogo = Application.StartupPath + @"\Citi Banner.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); DateTime formDate = GlobalFunctions.FirstDateOfMonth(fromDate); int fromYear = formDate.Year; rParam = new ReportParameter("FormDate", formDate.ToString("MMMM dd, yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("FormYear", fromYear.ToString()); _parameters.Add(rParam); DateTime _toDate = GlobalFunctions.LastDateOfMonth(toDate); int toYear = toDate.Year; rParam = new ReportParameter("ToDate", _toDate.ToString("MMMM dd, yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToYear", toYear.ToString()); _parameters.Add(rParam); rParam = new ReportParameter("Signature", signaturePath); _parameters.Add(rParam); rParam = new ReportParameter("CitiBanner", barLogo); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowLeaveReport(DataTable dTEmpLeave, LeaveYear lyy) { DataSet dSet = new DataSet(); string RDLC; dTEmpLeave.TableName = "dsEmpLeaveLedger_LeaveBalance"; RDLC = "Payroll.Report.RDLC.LeaveReport.rdlc"; dSet.Tables.Add(dTEmpLeave); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FromDate", lyy.StartDate.ToString("dd MMMM, yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ToDate", lyy.EndDate.ToString("dd MMMM, yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowShortLeaveReport(DataTable dTShortLeave) { DataSet dSet = new DataSet(); string RDLC; dTShortLeave.TableName = "dsEmpLeaveLedger_ShortLeave"; RDLC = "Payroll.Report.RDLC.EmployeeShortLeave.rdlc"; dSet.Tables.Add(dTShortLeave); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } //internal void CommonReportView(ReportItem reportItem, DataSet dSet, string reportName, List parameters) //{ // ReportViewer.Refresh(); // ReportViewer.LocalReport.DataSources.Clear(); // ReportViewer.LocalReport.EnableExternalImages = true; // _item = reportItem; // try // { // if (dSet != null && dSet.Tables.Count > 0) // { // foreach (DataTable table in dSet.Tables) // { // ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); // } // ReportViewer.LocalReport.ReportEmbeddedResource = reportName; // } // GetParameters(); // if (parameters != null) // { // foreach (ReportParameter parItem in parameters) // { // _parameters.Add(parItem); // } // } // this.ReportParams = _parameters; // if (reportParameters != null) // ReportViewer.LocalReport.SetParameters(reportParameters); // } // catch (Exception ex) // { // throw new Exception(ex.Message, ex); // } // this.ShowDialog(); //} internal void ShowEmployeesTaxDeductionReport(DataTable dTEmpTax, string fiscalYear) { DataSet dSet = new DataSet(); string RDLC; dTEmpTax.TableName = "dsEmpLeaveLedger_EmployeesTaxDeduction"; RDLC = "Payroll.Report.RDLC.rptEmployeesTaxDeduction.rdlc"; dSet.Tables.Add(dTEmpTax); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FiscalYear", fiscalYear); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowtaxInvestmentReport(DataTable dttaxInvestment, string fiscalYear) { DataSet dSet = new DataSet(); string RDLC; dttaxInvestment.TableName = "dsEmpLeaveLedger_TaxInvestment"; RDLC = "Payroll.Report.RDLC.rptTaxInvestment.rdlc"; dSet.Tables.Add(dttaxInvestment); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FiscalYear", fiscalYear); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowTaxChallanReport(DataTable dtTaxChallan, string fiscalYear) { DataSet dSet = new DataSet(); string RDLC; dtTaxChallan.TableName = "dsEmpLeaveLedger_TaxChallan"; RDLC = "Payroll.Report.RDLC.TaxChallanNew.rdlc"; dSet.Tables.Add(dtTaxChallan); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("FiscalYear", fiscalYear); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowLeaveApplicationReport(DataTable dTEmpLeave) { DataSet dSet = new DataSet(); string RDLC; dTEmpLeave.TableName = "dsEmpLeaveLedger_LeaveApplication"; RDLC = "Payroll.Report.RDLC.LeaveApplication.rdlc"; dSet.Tables.Add(dTEmpLeave); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDepartmentWiseManpower(DataTable dTManpower) { DataSet dSet = new DataSet(); string RDLC; dTManpower.TableName = "dsCompany_DepartmentWiseManpower"; RDLC = "Payroll.Report.RDLC.rptDepartmentWiseManpower.rdlc"; dSet.Tables.Add(dTManpower); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForBankAdvice(DateTime salaryMonth, DataTable bankAdvice, DataTable bankAdviceLetter, DataTable bankAdviceParameter, Bank obank, string sub, string amountInTaka) { DataSet dSet = new DataSet(); string sBankName = string.Empty; string RDLC = string.Empty; bankAdvice.TableName = "dsCompany_BankAdvice"; bankAdviceLetter.TableName = "dsCompany_BankAdviceLetter"; bankAdviceParameter.TableName = "dsCompany_BankAdviceParameters"; if (obank.ID.Integer == 2) { RDLC = "Payroll.Report.RDLC.rptDutchBanglaSalaryAdvice.rdlc"; sBankName = ""; } else if (obank.ID.Integer == 3) { RDLC = "Payroll.Report.RDLC.rptCBCLSalaryAdvice.rdlc"; sBankName = ""; } else if (obank.ID.Integer == 4) { RDLC = "Payroll.Report.RDLC.rptEBLSalaryAdvice.rdlc"; sBankName = ""; } else if (obank.ID.Integer == 5 || obank.ID.Integer == 6 || obank.ID.Integer == 7) { RDLC = "Payroll.Report.RDLC.rptSCBSalaryAdvice.rdlc"; if (obank.ID.Integer == 5) { sBankName = "Standard Chartered Bank"; } else if (obank.ID.Integer == 6) { sBankName = "United Commercial Bank Limited."; } else if (obank.ID.Integer == 7) { sBankName = "AB Bank"; } } else if (obank.ID.Integer == 1) { RDLC = "Payroll.Report.RDLC.rptHSBCSalaryAdvice.rdlc"; sBankName = ""; } dSet.Tables.Add(bankAdvice); dSet.Tables.Add(bankAdviceLetter); dSet.Tables.Add(bankAdviceParameter); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("BankName", sBankName); _parameters.Add(rParam); rParam = new ReportParameter("Subject", sub); _parameters.Add(rParam); rParam = new ReportParameter("AmountInTaka", amountInTaka); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowAgeRange(DataTable dtAgerange) { DataSet dSet = new DataSet(); string RDLC; dtAgerange.TableName = "dsCompany_DtAgeRange"; RDLC = "Payroll.Report.RDLC.rptDateRange.rdlc"; dSet.Tables.Add(dtAgerange); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowManpower(DataTable dtQualification) { DataSet dSet = new DataSet(); string RDLC; dtQualification.TableName = "dsCompany_dtQualificationWiseManpower"; RDLC = "Payroll.Report.RDLC.rQualificationWiseManpower.rdlc"; dSet.Tables.Add(dtQualification); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowEmployeesMasterData(DataTable dtMaster, DateTime _SalaryMonth) { DataSet dSet = new DataSet(); string RDLC; dtMaster.TableName = "dsCompany_EmployeeMasterData"; RDLC = "Payroll.Report.RDLC.EmployeeMasterData.rdlc"; dSet.Tables.Add(dtMaster); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", _SalaryMonth.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowPFTransactionReport(DataTable dtProvident, DateTime dateTime) { DataSet dSet = new DataSet(); string RDLC; dtProvident.TableName = "dsCompany_DTProvidentFund"; RDLC = "Payroll.Report.RDLC.rptProvidentFund.rdlc"; dSet.Tables.Add(dtProvident); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("PFMonth", dateTime.ToString("dd MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowStuffList(DateTime dtFrom, DataTable dtStuffList, string empCount) { DataSet dSet = new DataSet(); string RDLC; dtStuffList.TableName = "dsCompany_StuffListWithoutSalary"; RDLC = "Payroll.Report.RDLC.StuffListWithoutSalary.rdlc"; dSet.Tables.Add(dtStuffList); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", dtFrom.ToString("dd MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("ECount", empCount); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowMonthlyPFReport(DateTime dateTime, DataTable dtMonthlyPF) { DataSet dSet = new DataSet(); string RDLC; dtMonthlyPF.TableName = "dsCompany_DTMonthlyPF"; RDLC = "Payroll.Report.RDLC.MonthlyPFAmount.rdlc"; dSet.Tables.Add(dtMonthlyPF); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", dateTime.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowItemWiseOPI(DataTable dtOPI, DateTime dFromOPIMonth, string sOPIName) { DataSet dSet = new DataSet(); string RDLC; dtOPI.TableName = "dsCompany_DTOPI"; RDLC = "Payroll.Report.RDLC.ItemWiseOPI.rdlc"; dSet.Tables.Add(dtOPI); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", dFromOPIMonth.ToString("MMM yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("OPIName", sOPIName); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowCostCenterWiseOT(DataTable dtOT, DateTime dOTMonth) { DataSet dSet = new DataSet(); string RDLC; dtOT.TableName = "dsCompany_DTOPI"; RDLC = "Payroll.Report.RDLC.CostCenterWiseOT.rdlc"; dSet.Tables.Add(dtOT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", dOTMonth.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void OTBankDisbursement(DataTable dtOT, DateTime dOTMonth) { DataSet dSet = new DataSet(); string RDLC; dtOT.TableName = "dsCompany_DTOPI"; RDLC = "Payroll.Report.RDLC.OTBankDisbursement.rdlc"; dSet.Tables.Add(dtOT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", dOTMonth.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowSalarySummaryReport(DataTable dtSalarySummary, DateTime dateTime) { DataSet dSet = new DataSet(); string RDLC; dtSalarySummary.TableName = "dsCompany_SalarySummary"; RDLC = "Payroll.Report.RDLC.rptSalarySummary.rdlc"; dSet.Tables.Add(dtSalarySummary); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("SalaryMonth", dateTime.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowSalaryComparisonData(DataTable dtSalaryComparison, DateTime _SalaryMonth) { DataSet dSet = new DataSet(); string RDLC; dtSalaryComparison.TableName = "dsCompany_SalaryComparison"; RDLC = "Payroll.Report.RDLC.rptSalaryComparison.rdlc"; dSet.Tables.Add(dtSalaryComparison); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); DateTime dtLast = GlobalFunctions.LastDateOfMonth(_SalaryMonth.AddMonths(-1)); rParam = new ReportParameter("SalaryMonth", dtLast.ToString("MMM yyyy") + " to " + _SalaryMonth.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowExperienceReport(DataTable dtExperience) { DataSet dSet = new DataSet(); string RDLC; dtExperience.TableName = "dsCompany_ExperienceCertificate"; RDLC = "Payroll.Report.RDLC.ExperienceCertificate.rdlc"; dSet.Tables.Add(dtExperience); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowManagersOPI(DataTable dtManagersPTT, DateTime dOPIMonth, string sOPIName) { DataSet dSet = new DataSet(); string RDLC; dtManagersPTT.TableName = "dsCompany_ManagersPTT"; RDLC = "Payroll.Report.RDLC.ManagersPTT.rdlc"; dSet.Tables.Add(dtManagersPTT); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Year", dOPIMonth.ToString("yyyy")); _parameters.Add(rParam); rParam = new ReportParameter("OPIName", sOPIName); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowAuditReport(DataTable dtAudit, DateTime _SalaryMonth) { DataSet dSet = new DataSet(); string RDLC; dtAudit.TableName = "dsCompany_DeptWiseCompany"; RDLC = "Payroll.Report.RDLC.DeptWiseCompany.rdlc"; dSet.Tables.Add(dtAudit); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowSalaryCertificate(DataTable dtSalary, Bank oBank) { DataSet dSet = new DataSet(); string RDLC; dtSalary.TableName = "dsCompany_SalaryCertificate"; if (oBank.ID.Integer == 1) { RDLC = "Payroll.Report.RDLC.BankSalaryCertificate.rdlc"; } else { RDLC = "Payroll.Report.RDLC.OtherBanksSalaryCertificate.rdlc"; } dSet.Tables.Add(dtSalary); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowFSSReport(DataTable dtFSS, DataTable dtItems, string sAmount) { DataSet dSet = new DataSet(); string RDLC; _parameters = new List(); dtFSS.TableName = "dsCompany_DTFSS"; dtItems.TableName = "dsCompany_DTFSSItems"; RDLC = "Payroll.Report.RDLC.rptNewFSS.rdlc"; dSet.Tables.Add(dtFSS); dSet.Tables.Add(dtItems); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } rParam = new ReportParameter("Amount", sAmount); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowExceptionPFReport(DateTime fromdate, DataTable dtExceptionPF) { DataSet dSet = new DataSet(); string RDLC; _parameters = new List(); dtExceptionPF.TableName = "dsCompany_PFException"; RDLC = "Payroll.Report.RDLC.PFException.rdlc"; dSet.Tables.Add(dtExceptionPF); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", fromdate.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowExceptionPFConfirmationReport(DateTime fromdate, DateTime todate, DataTable dtMonthlyPF) { DataSet dSet = new DataSet(); string RDLC; _parameters = new List(); dtMonthlyPF.TableName = "dsCompany_NewPF"; RDLC = "Payroll.Report.RDLC.NewPFReport.rdlc"; dSet.Tables.Add(dtMonthlyPF); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", fromdate.ToString("MMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowExceptionSalaryRevisionReport(DateTime fromDate, DateTime todate, DataTable dtMonthlySalaryRevision) { DataSet dSet = new DataSet(); string RDLC; _parameters = new List(); dtMonthlySalaryRevision.TableName = "dsCompany_MonthlySalaryRevision"; RDLC = "Payroll.Report.RDLC.EmpSalaryRevisionNew.rdlc"; dSet.Tables.Add(dtMonthlySalaryRevision); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", fromDate.ToString("MMM yyyy")); _parameters.Add(rParam); //this.ReportParams = _parameters; //if (reportParameters != null) // ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForCTCReport(ReportItem reportItem, DataTable dTSalarySheet, string param, string fromMonth, string ToMonth) { DataSet dSet = new DataSet(); string RDLC; dTSalarySheet.TableName = "PayrollDataSet_SalarySheet"; RDLC = "Payroll.Report.RDLC.CTCReport.rdlc"; dSet.Tables.Add(dTSalarySheet); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("EmpParam", param); _parameters.Add(rParam); rParam = new ReportParameter("FromMonth", fromMonth); _parameters.Add(rParam); rParam = new ReportParameter("ToMonth", ToMonth); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowBankPaymentSummaryReport(DataTable dtBankPaymentSummary, DateTime dateTime) { DataSet dSet = new DataSet(); string RDLC; dtBankPaymentSummary.TableName = "dsCompany_BankPaymentSummary"; RDLC = "Payroll.Report.RDLC.BankPaymentSummary.rdlc"; dSet.Tables.Add(dtBankPaymentSummary); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); rParam = new ReportParameter("Month", dateTime.ToString("MMMM yyyy")); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } internal void ShowDlgForBEFTNform(DataTable bftnTable, DataTable fAmount, string smonth, string serial, string amountInTaka, string processDate) { DataSet dSet = new DataSet(); string RDLC; bftnTable.TableName = "dsCompany_BEFTNform"; RDLC = "Payroll.Report.RDLC.BEFTNform.rdlc"; dSet.Tables.Add(bftnTable); //dSet.Tables.Add(fAmount); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; try { if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } //GetParameters(); _parameters = new List(); rParam = new ReportParameter("SalaryMonth", smonth); _parameters.Add(rParam); rParam = new ReportParameter("SL", serial); _parameters.Add(rParam); rParam = new ReportParameter("AmountInTaka", amountInTaka); _parameters.Add(rParam); rParam = new ReportParameter("ProcessDate", processDate); _parameters.Add(rParam); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } public void ShowUploadedComponentReport(DataTable dtUploadedComponent) { try { DataSet dSet = new DataSet(); string RDLC; dtUploadedComponent.TableName = "dsCompany_dtUploadedComponent"; RDLC = "Payroll.Report.RDLC.UploadedComponent.rdlc"; dSet.Tables.Add(dtUploadedComponent); _PATH = Application.StartupPath + @"\Logo.jpg"; ReportViewer.Refresh(); ReportViewer.LocalReport.DataSources.Clear(); ReportViewer.LocalReport.EnableExternalImages = true; if (dSet != null && dSet.Tables.Count > 0) { foreach (DataTable table in dSet.Tables) { ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(table.TableName, table)); } ReportViewer.LocalReport.ReportEmbeddedResource = RDLC; } GetParameters(); this.ReportParams = _parameters; if (reportParameters != null) ReportViewer.LocalReport.SetParameters(reportParameters); } catch (Exception ex) { throw new Exception(ex.Message, ex); } this.ShowDialog(); } private void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e) { Microsoft.Reporting.WinForms.LocalReport lReport = sender as Microsoft.Reporting.WinForms.LocalReport; if (lReport != null) { string sederReportName = lReport.ReportEmbeddedResource.Split('.').Last(x => x != "rdlc"); if (sederReportName == "PaySlipNew") { if (e.ReportPath == "PayslipGross") { e.DataSources.Add(new ReportDataSource("SalaryMonthlysGross", _oSubReportDataSet.Tables["SalaryMonthlysGross"])); } else { e.DataSources.Add(new ReportDataSource("RemainingLoanforPayslip", _oSubReportDataSet.Tables["RemainingLoanforPayslip"])); } } else if (sederReportName == "PaySlipNewNMGT") { if (e.ReportPath == "PayslipGross") { e.DataSources.Add(new ReportDataSource("SalaryMonthlysGross", _oSubReportDataSet.Tables["SalaryMonthlysGross"])); } else { e.DataSources.Add(new ReportDataSource("RemainingLoanforPayslip", _oSubReportDataSet.Tables["RemainingLoanforPayslip"])); } } } } } }