Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            Report_Taxation_IR56G_CHT rpt = new Report_Taxation_IR56G_CHT();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        public override ReportDocument GenerateReport()
        {
            if (TaxFormID > 0 && TaxEmpList != null && !string.IsNullOrEmpty(TaxFormType))
            {
                HROne.Taxation.DataSet.Taxation_IR56B_DataSet dataSet = HROne.Taxation.TaxationGeneration.GenerateTaxationDataSet(dbConn, TaxFormID, TaxEmpList);

                if (reportDocument == null)
                {
                    if (reportLanguage == ReportLanguage.TraditionalChinese)
                    {
                        if (TaxFormType.Equals("B", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56B_CHT();
                        }
                        else if (TaxFormType.Equals("E", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56E_CHT();
                        }
                        else if (TaxFormType.Equals("F", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56F_CHT();
                        }
                        else if (TaxFormType.Equals("G", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56G_CHT();
                        }
                        // Start 0000020, KuangWei, 2014-07-16
                        else if (TaxFormType.Equals("M", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56M_CHT();
                        }
                        // End 0000020, KuangWei, 2014-07-16
                    }
                    else
                    {
                        if (TaxFormType.Equals("B", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56B();
                        }
                        else if (TaxFormType.Equals("E", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56E();
                        }
                        else if (TaxFormType.Equals("F", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56F();
                        }
                        else if (TaxFormType.Equals("G", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56G();
                        }
                        // Start 0000020, KuangWei, 2014-07-16
                        else if (TaxFormType.Equals("M", StringComparison.CurrentCultureIgnoreCase))
                        {
                            reportDocument = new ReportTemplate.Report_Taxation_IR56M();
                        }
                        // End 0000020, KuangWei, 2014-07-16
                    }
                }
                else
                {
                }

                reportDocument.SetDataSource(dataSet);
                if (reportDocument.ParameterFields["NameOfSignature"] != null)
                {
                    reportDocument.SetParameterValue("NameOfSignature", NameOfSignature);
                }
                return(reportDocument);
            }
            else
            {
                return(null);
            }
        }