Пример #1
0
        public void UpgradeBO(string id)
        {
            try
            {
                string[] elements             = this.GetSubIdAndReportName(id);
                UpgradeReportMetaWrapper urmw = new UpgradeReportMetaWrapper();
                urmw.SetArgument(UpgradeReportMetaWrapper.ReportId, id);
                urmw.SetArgument(UpgradeReportMetaWrapper.ReportName861, elements[1]);
                urmw.SetArgument(UpgradeReportMetaWrapper.ReportSubId, elements[0]);
                urmw.SetArgument(UpgradeReportMetaWrapper.DBAppServer, this._loginInfor.AppServer);
                urmw.SetArgument(UpgradeReportMetaWrapper.DBUfMetaConnString, this._loginInfor.UfMetaCnnString);
                urmw.SetArgument(UpgradeReportMetaWrapper.DBcAccId, this._loginInfor.cAccId);
                urmw.SetArgument(UpgradeReportMetaWrapper.DBcYear, this._loginInfor.cYear);

                // 升级数据源,格式....
                Hashtable infos = new Hashtable();
                infos[Upgrade872Controller.InfoKeyLoginInfo]     = this._loginInfor;
                infos[Upgrade872Controller.InfoKeyReportSubId]   = elements[0];
                infos[Upgrade872Controller.InfoKeyReportName861] = elements[1];

                UpgradeFormatService ufs = new UpgradeFormatService();
                ufs.DeliverEnvironmentInfos(infos);
                ufs.SetMeta(urmw);

                UpgradeReport ur = urmw.WrapData2Object();
                ur.SaveBO();
            }
            catch (Exception e)
            {
                Logger logger = Logger.GetLogger("Report872UpradeError");
                logger.Error(e);
                throw e;
            }
            finally
            {
                GC.Collect();
            }
        }
Пример #2
0
        public void Upgrade(string id, string filterstring, string classname)
        {
            try
            {
                UpgradeReportMetaWrapper urmw = new UpgradeReportMetaWrapper();
                urmw.SetArgument(UpgradeReportMetaWrapper.ReportId, id);
                urmw.SetArgument(UpgradeReportMetaWrapper.ReportName861, id);
                urmw.SetArgument(UpgradeReportMetaWrapper.ReportSubId, _loginInfor.SubID);
                urmw.SetArgument(UpgradeReportMetaWrapper.DBAppServer, this._loginInfor.AppServer);
                urmw.SetArgument(UpgradeReportMetaWrapper.DBUfMetaConnString, this._loginInfor.UfMetaCnnString);
                urmw.SetArgument(UpgradeReportMetaWrapper.DBcAccId, this._loginInfor.cAccId);
                urmw.SetArgument(UpgradeReportMetaWrapper.DBcYear, this._loginInfor.cYear);

                // 升级数据源,格式....
                Hashtable infos = new Hashtable();
                infos[Upgrade872Controller.InfoKeyLoginInfo]     = this._loginInfor;
                infos[Upgrade872Controller.InfoKeyReportSubId]   = _loginInfor.SubID;
                infos[Upgrade872Controller.InfoKeyReportName861] = id;

                UpgradeFormatServiceOutU8 ufs = new UpgradeFormatServiceOutU8();
                ufs.DeliverEnvironmentInfos(infos);
                ufs.SetMeta(urmw, filterstring, classname);

                UpgradeReport ur = urmw.WrapData2Object();
                ur.Save();
            }
            catch (Exception e)
            {
                Logger logger = Logger.GetLogger("Report872UpradeError");
                logger.Error(e);
                throw e;
            }
            finally
            {
                GC.Collect();
            }
        }