コード例 #1
0
 public StiReport MakeReport(System.Data.DataSet ds, bool? showSaveButtons, string watermarkText, float? watermarkSize)
 {
     if (this.m_UseNoticeReportGenerator)
     {
         ObjectList<Organization> list = new ObjectList<Organization>();
         ObjectList<NoticeNoticeTemplateSetting> list2 = new ObjectList<NoticeNoticeTemplateSetting> {
             this.m_NoticeNoticeTemplateSetting
         };
         ActionDetails details = new ActionDetails(false) {
             Period = this.m_NoticePeriod,
             HouseHolders = list,
             AreaId = this.m_Area.Id,
             NoticeNoticeTemplateSettings = list2,
             FetchOnly = false,
             ForceGenerate = this.m_GenerateBeforeView,
             PrintTypeId = FasetItem.Null.Id,
             FilterMinDebt = (decimal) System.Convert.ToInt64(this.FilterMinDebt),
             FixedShowDebt = (decimal) System.Convert.ToInt64(this.FixedShowDebt),
             IsGenerate = true,
             IsExportPDF = false,
             IsShow = true,
             EditInDesign = false,
             IsClearData = false,
             IsClearRendered = false
         };
         details.Logger.UseFileLog = false;
         details.Logger.ExceptionLog.UseFileLog = false;
         NoticeGenerationWorker worker = new NoticeGenerationWorker {
             Action = details
         };
         worker.DoActionSync();
         if ((!worker.IsBreak && !worker.IsChancel) && (worker.Action.ReportResult != null))
         {
             return worker.Action.ReportResult;
         }
         return null;
     }
     StiReport report = new StiReport();
     if (showSaveButtons.get_HasValue())
     {
         this.m_StimulsoftUtilsOptions = new StimulsoftUtilsOptions(showSaveButtons.Value);
     }
     report.LoadFromString(this.m_NoticeNoticeTemplateSetting.Template.Template);
     report.ReportCacheMode = StiReportCacheMode.Off;
     if (watermarkText != null)
     {
         foreach (StiPage page in report.Pages)
         {
             page.Watermark.Text = watermarkText;
             if (watermarkSize.get_HasValue())
             {
                 page.Watermark.Font = (System.Drawing.Font) new System.Drawing.Font("Arial", watermarkSize.Value);
             }
         }
     }
     report.Compile();
     report.RegData((System.Data.DataSet) ds);
     report.ReportCacheMode = StiReportCacheMode.Off;
     report.Compile();
     return report;
 }
コード例 #2
0
ファイル: PaymentNoticeView.cs プロジェクト: u4097/SQLScript
 private void ngWorker_Start()
 {
     this.UpdateReenable(false);
     this.m_ngWorker = new NoticeGenerationWorker();
     this.m_ngWorker.Action = this.m_actionDetails;
     this.m_ngWorker.OnCompleted += new ActionDelegate(this.ngWorker_Finally);
     this.m_ngWorker.DoAction();
     this.ngWorker_RefrashProgress();
     this.timerProgress.set_Enabled(true);
 }