public int Build()
        {
            // force to true for now

            ReportGenerationBatch reportGenerationBatch = new ReportGenerationBatch();

            reportGenerationBatch.Name = this._period + " - " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss");
            reportGenerationBatch.Period = this._period;

            ReportGenerationQueue reportGenerationQueue = new ReportGenerationQueue();

            reportGenerationQueue.ReportId = this._reportId;
            reportGenerationQueue.ExecutionLog = string.Empty;
            reportGenerationQueue.MustDeliverReportToTestLocation = this._MustDeliverReportToTestLocation;
            reportGenerationQueue.NumberOfRetries = 0;
            reportGenerationQueue.Period = this._period;
            reportGenerationQueue.QueryText = string.Empty;
            reportGenerationQueue.ReforecastQuarterName = this._reforecastQuarterName;
            reportGenerationQueue.ReportGenerationStatus = BusinessLayer.Automation.Enums.ReportStatus.Queued;

            reportGenerationBatch.ReportGenerationQueues.Add(reportGenerationQueue);

            if (this._generationDao.CanSubmitChanges())
            {
                this._generationDao.SubmitChanges();
            }

            this._generationDao.Insert<ReportGenerationBatch>(reportGenerationBatch);

            if (this._generationDao.CanSubmitChanges())
            {
                this._generationDao.SubmitChanges();
            }

            return reportGenerationQueue.ReportGenerationQueueId;
        }
        /// <summary>
        /// Starts the generation process.
        /// </summary>
        /// <param name="generationDao">The generation DAO.</param>
        /// <param name="queuedReport">The queued report.</param>
        private void StartGenerationProcess(GenerationDao generationDao, ReportGenerationQueue queuedReport)
        {
            this.ReportQueueStatusService.UpdateReportGenerationQueue(new ReportGenerationQueueStatusDto()
            {
                ReportGenerationQueueId = queuedReport.ReportGenerationQueueId,
                ReportStatus = ReportStatus.Processing
            });

            IHostedProcess hostedApp = this.LaunchProcess(queuedReport.ReportGenerationQueueId);

            this._reportGeneratorEngineList.Add(hostedApp);
        }
예제 #3
0
파일: GRP.designer.cs 프로젝트: rsdgjb/GRP
		private void detach_ReportGenerationQueues(ReportGenerationQueue entity)
		{
			this.SendPropertyChanging();
			entity.ReportGenerationBatch = null;
		}
예제 #4
0
파일: GRP.designer.cs 프로젝트: rsdgjb/GRP
		private void attach_ReportGenerationQueues(ReportGenerationQueue entity)
		{
			this.SendPropertyChanging();
			entity.Report = this;
		}