private void PrintYosanJissekiTaihi3Column(models.db.KaikeiDatabase db, int currentYear, int lastYear, int hoseiKaisuu, int kaikeiKubun, DateTime?printDate) { string houjinMei = ""; houjinMei = db.MTKaikeiKubun.GetRowFromCache(db.MTKaikeiKubun.RootNodeId).GetStr("name") as string; var yosanUchiwake = new models.query.YosanUchiwake(); yosanUchiwake.Calc(db, currentYear, lastYear, hoseiKaisuu, kaikeiKubun, withJisseki: true, withSyoukubun: false, withHojoKamoku: false); var report = new views.reports.SyuushiYosanJissekiReport(); report.OmitZeroRow = form.OmitZeroRow; report.SetDB(db); report.SetHeader(houjinMei, new DateTime(currentYear, 4, 1), new DateTime(currentYear + 1, 3, 31)); for (int i = 0; i < yosanUchiwake.ChildKaikeiKubunNameList.Count; i++) { report.SetKaikeiKubunCaption(i, yosanUchiwake.ChildKaikeiKubunNameList[i]); } var popup = new views.popup.ReportPreviewPopup(); report.DataSource = yosanUchiwake.YosanUchiwakeRowList; report.Run(); popup.Document = report.Document; popup.ShowDialog(); }
private void PrintYosanUchiwake(int currentYear, int lastYear, int hoseiKaisuu, int kaikeiKubun, DateTime?printDate) { string houjinMei = ""; houjinMei = Context.KaikeiDatabase.MTKaikeiKubun.GetRowFromCache(Context.KaikeiDatabase.MTKaikeiKubun.RootNodeId).GetStr("name") as string; var yosanUchiwake = new models.query.YosanUchiwake(); yosanUchiwake.Calc(Context.KaikeiDatabase, currentYear, lastYear, hoseiKaisuu, kaikeiKubun, withJisseki: false, withSyoukubun: true, withHojoKamoku: false); var report = new views.reports.SyuushiYosanUchiwakeReport(); report.SetDB(Context.KaikeiDatabase); report.SetHeader(houjinMei, new DateTime(currentYear, 4, 1), new DateTime(currentYear + 1, 3, 31)); for (int i = 0; i < yosanUchiwake.ChildKaikeiKubunNameList.Count; i++) { report.SetKaikeiKubunCaption(i, yosanUchiwake.ChildKaikeiKubunNameList[i]); } for (int colCt = 0; colCt < yosanUchiwake.KaikeiKubunList.Count; colCt++) { report.SetYobihi(colCt, yosanUchiwake.YosanTable.GetYobihiRow(yosanUchiwake.KaikeiKubunList[colCt]).YosanHonnenDisplay); report.SetZandaka(colCt, yosanUchiwake.YosanTable.GetZenkimatsuZandakaRow(yosanUchiwake.KaikeiKubunList[colCt]).YosanHonnenDisplay); } var popup = new views.popup.ReportPreviewPopup(); report.DataSource = yosanUchiwake.YosanUchiwakeRowList; report.Run(); popup.Document = report.Document; popup.ShowDialog(); }