コード例 #1
0
ファイル: UIConnector.cs プロジェクト: Davincier/openpetra
        /// <summary>
        /// Calculates the report, which is specified in the parameters table
        ///
        /// </summary>
        /// <returns>void</returns>
        public void Start(System.Data.DataTable AParameters)
        {
            TRptUserFunctionsFinance.FlushSqlCache();
            FProgressID = "ReportCalculation" + Guid.NewGuid();
            TProgressTracker.InitProgressTracker(FProgressID, string.Empty, -1.0m);
            FParameterList = new TParameterList();
            FParameterList.LoadFromDataTable(AParameters);
            FSuccess = false;
            String PathStandardReports = TAppSettingsManager.GetValue("Reporting.PathStandardReports");
            String PathCustomReports = TAppSettingsManager.GetValue("Reporting.PathCustomReports");
            FDatacalculator = new TRptDataCalculator(DBAccess.GDBAccessObj, PathStandardReports, PathCustomReports);

            // setup the logging to go to the TProgressTracker
            TLogging.SetStatusBarProcedure(new TLogging.TStatusCallbackProcedure(WriteToStatusBar));
            string session = TSession.GetSessionID();
            ThreadStart myThreadStart = delegate {
                Run(session);
            };
            Thread TheThread = new Thread(myThreadStart);
            TheThread.Name = FProgressID;
            TheThread.CurrentCulture = Thread.CurrentThread.CurrentCulture;
            TheThread.Start();
        }
コード例 #2
0
ファイル: UIConnector.cs プロジェクト: js1987/openpetragit
        /// <summary>
        /// Calculates the report, which is specified in the parameters table
        ///
        /// </summary>
        /// <returns>void</returns>
        public void Start(System.Data.DataTable AParameters)
        {
            TRptUserFunctionsFinance.FlushSqlCache();
            this.FAsyncExecProgress = new TAsynchronousExecutionProgress();
            this.FAsyncExecProgress.ProgressState = TAsyncExecProgressState.Aeps_Executing;
            FParameterList = new TParameterList();
            FParameterList.LoadFromDataTable(AParameters);
            FSuccess = false;
            String PathStandardReports = TAppSettingsManager.GetValue("Reporting.PathStandardReports");
            String PathCustomReports = TAppSettingsManager.GetValue("Reporting.PathCustomReports");
            FDatacalculator = new TRptDataCalculator(DBAccess.GDBAccessObj, PathStandardReports, PathCustomReports);

            // setup the logging to go to the FAsyncExecProgress.ProgressInformation
            TLogging.SetStatusBarProcedure(new TLogging.TStatusCallbackProcedure(WriteToStatusBar));
            Thread TheThread = new Thread(new ThreadStart(Run));
            TheThread.CurrentCulture = Thread.CurrentThread.CurrentCulture;
            TheThread.Start();
        }