public void InsertStaticReport(
     StaticReport sr,
     SqlTransaction tr)
 {
     sr.LogInfo = this.LogInfo;
     sr.Insert(tr);
 }
 public void RetriveStaticReport(
     StaticReport sr,
     SqlTransaction tr)
 {
     sr.LogInfo = this.LogInfo;
     sr.Retrive(tr);
 }
 public void DeleteStaticReport(StaticReport sr)
 {
     sr.LogInfo = this.LogInfo;
     sr.Delete(null);
 }
示例#4
0
        private IReportNode GetMyReportTreeNode(
            DataRow dr,
            Hashtable u861FormatRelated,
            Hashtable isUsingU861Format,
            ref string key)
        {
            IReportNode im = null;

            if (key == ReportCenterDataService.KEY_StaticReport)
            {
                im = new StaticReport(this._iOpenReportCenterNode);
            }
            else
            {
                im = new DynamicReport(this._iOpenReportCenterNode);
            }
            (im as IFillData).FillData(dr);

            DynamicReport rep = im as DynamicReport;

            if (rep != null)
            {
                object val = null;

                //关于新老报表存在如下情形:(自定义报表都不能切换)
                //1.只存在老报表数据:
                //	-a. bNewRpt=NULL则不允许切换,不允许发布,使用老报表打开
                //	-b. bNewRpt<>NULL则允许切换
                //		-b.1 bNewRpt=1 ->不允许发布,使用新报表打开
                //		-b.2 bNewRpt=0 ->不允许发布,使用老报表打开
                //2.只存在新报表数据:不允许切换,允许发布,使用新报表打开
                //3.新老报表数据同时存在:
                //  -a. bNewRpt=NULL则按照1-a情形
                //  -b. bNewRpt<>NULL且bHadUpgradedFrom861=NULL ->不允许切换
                //		 -a.1 bNewRpt=0 ->不允许发布,使用老报表打开
                //		 -a.2 bNewRpt=1 ->允许发布,使用新报表打开
                //  -c. bNewRpt<>NULL且bHadUpgradedFrom861<>NULL
                //		 -a.1 bNewRpt=0 ->允许切换,不允许发布,使用老报表打开
                //		 -a.2 bNewRpt=1 ->允许切换,使用新报表打开
                //				-a.1 bHadUpgradedFrom861=1则允许发布
                //				-a.1 bHadUpgradedFrom861=0则不允许发布

                //CanUseAs861Report表示此报表能够进行切换
                rep.CanUseAs861Report = false;
                if (this.ContainsKey(u861FormatRelated, rep, ref val))
                {
                    rep.CanUseAs861Report = true;
                }

                //IsUsing861Report表示当前报表使用老报表方式查询
                //对应bNewRpt的值:
                //bNewRpt=0或null -> IsUsing861Report=true
                //bNewRpt=1 -> IsUsing861Report=false
                val = null;
                rep.IsUsing861Report = false;
                if (this.ContainsKey(isUsingU861Format, rep, ref val))
                {
                    rep.IsUsing861Report = !SqlHelper.GetBooleanFrom(val, false);
                }

                if (rep.bSystem)
                {
                    key = ReportCenterDataService.KeySystem;
                }
                else
                {
                    key = ReportCenterDataService.KeyCustom;
                }
            }

            return(im);
        }
 public void DeleteStaticReport(StaticReport sr, SqlTransaction tr)
 {
     sr.LogInfo = this.LogInfo;
     sr.Delete(tr);
 }
 public void DeleteStaticReport(StaticReport sr)
 {
     this.DeleteStaticReport(sr, null);
 }