Esempio n. 1
0
        Stream ProbitionaryReport(string mrfid, string applicants)
        {
            DataTable dt = new Contracts.sp_print_contractDataTable();

            foreach (var applicant in applicants.Split(','))
            {
                foreach (var i in db.sp_print_contract(mrfid, applicant))
                {
                    dt.Rows.Add(i.surname, i.firstname, i.middleinitial, i.address, i.ProjectName, i.BusinessUnit, i.Classification, i.position_name, i.company_name, i.branch, i.officeaddress);
                }
            }
            var BusinessUnit = mrfid.Split('-')[0];

            var report = new ReportDocument();

            if (BusinessUnit == "CSI")
            {
                report = new Corestaff.Probationary.ProbationaryCorestaffA();
            }
            else if (BusinessUnit == "TOPSERVE")
            {
                report = new Probitionary();
            }
            else if (BusinessUnit == "IWSC")
            {
                report = new IWSC.Probationary.ProbationaryIWSCA();
            }

            report.SetDataSource(dt);


            return(report.ExportToStream(ExportFormatType.WordForWindows));
        }
Esempio n. 2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ProbationaryIWSCA rpt = new ProbationaryIWSCA();

            rpt.Site = this.Site;
            return(rpt);
        }