Exemple #1
0
        public void TestHsMonthReport()
        {
            string               template       = "水平位移监测月模板.xls";
            string               reportName     = "水平位移监测月报表.xls";
            string               handleName     = "HsMonthReport";
            DateTime             date           = new DateTime(2015, 11, 22, 0, 0, 0, DateTimeKind.Local);
            int                  factorId       = 9;
            int                  structId       = 2;
            int                  orgId          = 22;
            TemplateHandlerPrams para           = TestPinghanReport.CreateTemplateHandlerPrams(date, factorId, structId, orgId, template, reportName);
            string               reportFullName = TestPinghanReport.CallTemplateHandle(para, handleName);

            Assert.IsTrue(File.Exists(reportFullName));
        }
        public void TestGfmsDailyReport()
        {
            string               template       = "GfmsDailyReport.xls";
            string               reportName     = "广佛城际轻轨基坑锚杆受力监测日报表.xls";
            string               handleName     = "GfmsDailyReport";
            DateTime             date           = new DateTime(2014, 12, 14, 0, 0, 0, DateTimeKind.Local);
            int                  factorId       = 16;
            int                  structId       = 62;
            int                  orgId          = 38;
            TemplateHandlerPrams para           = TestPinghanReport.CreateTemplateHandlerPrams(date, factorId, structId, orgId, template, reportName);
            string               reportFullName = TestPinghanReport.CallTemplateHandle(para, handleName);

            Assert.IsTrue(File.Exists(reportFullName));
        }
        public void TestCxDailyReport()
        {
            string               template       = "测斜监测日模板.xls";
            string               reportName     = "测斜监测日报表.xls";
            string               handleName     = "CxDailyReport";
            DateTime             date           = new DateTime(2014, 8, 22, 0, 0, 0, DateTimeKind.Local);
            int                  factorId       = 10;
            int                  structId       = 4;
            int                  orgId          = 12;
            TemplateHandlerPrams para           = TestPinghanReport.CreateTemplateHandlerPrams(date, factorId, structId, orgId, template, reportName);
            string               reportFullName = TestPinghanReport.CallTemplateHandle(para, handleName);

            Assert.IsTrue(File.Exists(reportFullName));
        }
        public void TestDwySwDailyUnifyReport()
        {
            string               template       = "SwDailyReportNcdwy.xls";
            string               reportName     = "动物园围护结构地下水位监测日报表.xls";
            string               handleName     = "SwDailyUnifyReport";
            DateTime             date           = new DateTime(2014, 5, 22, 0, 0, 0, DateTimeKind.Local);
            int                  factorId       = 17;
            int                  structId       = 72;
            int                  orgId          = 22;
            TemplateHandlerPrams para           = TestPinghanReport.CreateTemplateHandlerPrams(date, factorId, structId, orgId, template, reportName);
            string               reportFullName = TestPinghanReport.CallTemplateHandle(para, handleName);

            Assert.IsTrue(File.Exists(reportFullName));
        }
Exemple #5
0
        public void TestCjWeekReport()
        {
            string               template       = "沉降监测周模板.xls";
            string               reportName     = "沉降监测周报表.xls";
            string               handleName     = "CjWeekReport";
            DateTime             date           = new DateTime(2014, 5, 22, 0, 0, 0, DateTimeKind.Local);
            int                  factorId       = 11;
            int                  structId       = 17;
            int                  orgId          = 22;
            TemplateHandlerPrams para           = TestPinghanReport.CreateTemplateHandlerPrams(date, factorId, structId, orgId, template, reportName);
            string               reportFullName = TestPinghanReport.CallTemplateHandle(para, handleName);

            Assert.IsTrue(File.Exists(reportFullName));
        }
        public void TestStructureMonthlyReportTemplateHandler()
        {
            string               template       = "StructureMonthlyReport.docx";
            string               reportName     = "结构物(边坡)月报表.docx";
            string               handleName     = "StructureMonthlyReportTemplateHandler";
            DateTime             date           = new DateTime(2014, 11, 1, 0, 0, 0, DateTimeKind.Local);
            int                  factorId       = -1;
            int                  structId       = 3;
            int                  orgId          = 15;
            TemplateHandlerPrams para           = TestPinghanReport.CreateTemplateHandlerPrams(date, factorId, structId, orgId, template, reportName);
            string               reportFullName = TestPinghanReport.CallTemplateHandle(para, handleName);

            Assert.IsTrue(File.Exists(reportFullName));
        }
        public void TestXwzxWeekReport()
        {
            string               fileDirPath = RPTPara.GetTemplateFilePath();
            string               template    = "GfMonthlyReport.docx";
            string               reportName  = "广佛新闻中心周报.docx";
            string               handleName  = "StructureWeekReportTemplateHandler";
            DateTime             date        = new DateTime(2015, 2, 9, 0, 0, 0, DateTimeKind.Local);
            int                  factorId    = -1;
            int                  structId    = 62;
            int                  orgId       = 38;
            TemplateHandlerPrams para        = TestPinghanReport.CreateTemplateHandlerPrams(date, factorId, structId, orgId,
                                                                                            template, reportName);
            string reportFullName = TestPinghanReport.CallTemplateHandle(para, handleName);

            Assert.IsTrue(File.Exists(reportFullName));
        }
        public void TestCjDailyReport()
        {
            string   template   = "沉降监测日模板.xls";
            string   reportName = "沉降监测日报表.xls";
            string   handleName = "CjDailyReport";
            DateTime date       = new DateTime(2014, 5, 22, 0, 0, 0, DateTimeKind.Local);
            int      factorId   = 11;
            int      structId   = 17;
            int      orgId      = 12;

            try
            {
                TemplateHandlerPrams para = TestPinghanReport.CreateTemplateHandlerPrams(date, factorId, structId, orgId, template, reportName);
                string reportFullName     = TestPinghanReport.CallTemplateHandle(para, handleName);
                Assert.IsTrue(File.Exists(reportFullName));
            }
            catch (Exception e)
            {
                throw e;
            }
        }