Example #1
0
        public static _Methods CreateIntaceMet(_Business m_Currentbus, _UnitProject p_un, _Entity_SubInfo info)
        {
            _Methods m = new _Methods(m_Currentbus, p_un, info);

            if (info.PID == 0)
            {
                m = new _Mothod_Measures(m_Currentbus, p_un, info);
                return(m);
            }
            if (string.IsNullOrEmpty(info.LB) && info.PID != 0)
            {
                m = new _Motheds_CommonProj(m_Currentbus, p_un, info);
                return(m);
            }

            if (info.LB.Equals("清单"))
            {
                m = new _Mothods_MFixed(m_Currentbus, p_un, info);
                return(m);
            }
            if (info.LB.Contains("子目"))
            {
                m = new _Mothods_MSubheadings(m_Currentbus, p_un, info);
                return(m);
            }
            return(m);
        }
Example #2
0
        public override void Begin(List <int> session)
        {
            if (session != null)
            {
                if (session.Contains(Current.ID))
                {
                    return;
                }
                else
                {
                    session.Add(Current.ID);
                }
            }


            _Entity_SubInfo info = null;
            DataRow         row  = null;
            _Methods        met  = null;

            _SubSegment_Statistics sta = new _SubSegment_Statistics(this.Current, this.Unit);

            sta.DataSource = this.GetDataSource;
            sta.Begin();
            //计算子目所属章
            info = new _Entity_SubInfo();
            row  = this.Unit.StructSource.ModelMeasures.GetRowByOther(this.Current.PID.ToString());
            _ObjectSource.GetObject(info, row);
            met = new _Mothod_Measures(this.CurrentBusiness, this.Unit, info);
            met.Begin(session);
        }
Example #3
0
        /// <summary>
        /// 計算最終結果
        /// </summary>
        private void CalculateResult()
        {
            var CSAQWM    = ToolKit.ParseDecimal(Variablies["CSAQWM"]);
            var KCAQWMCSF = ToolKit.ParseDecimal(Variablies["KCAQWMCSF"]);
            var CSXMHJ    = CSAQWM + KCAQWMCSF;

            var rows = this.Unit.StructSource.ModelMeasures.Select("XMBM = 'C101'");

            foreach (var row in rows)
            {
                _Methods.Build(Business, Unit, _Entity_SubInfo.Parse(row)).BeginCurrent();
            }

            rows = this.Unit.StructSource.ModelMeasures.Select("XMBM = '措施项目'");
            foreach (var row in rows)
            {
                _Methods.Build(Business, Unit, _Entity_SubInfo.Parse(row)).BeginCurrent();
            }

            var measureMethod = new _Mothod_Measures(this.Business, Unit, GetTop1MeasureItem());

            measureMethod.BeginCurrent();


            var metaanlysis = new _Method_Metaanalysis(Unit);

            metaanlysis.Calculate();


            this.UNResultVarable.Set(this.Unit.ID, -1, "CSXMHJ", CSXMHJ);
            this.UNResultVarable.Set(this.Unit.ID, -1, "CSXMF", CSXMHJ);

            this.ResultVarable.Set(this.Unit.ID, -1, "CSXMHJ", CSXMHJ);
            this.ResultVarable.Set(this.Unit.ID, -1, "CSXMF", CSXMHJ);

            //var otherStatistics = new _Method_OtherProject(this.Business, this.Unit);
            //otherStatistics.Begin();

            //var metaanalysis = new _Method_Metaanalysis(this.Unit);
            //metaanalysis.Begin(null);
        }
Example #4
0
        /// <summary>
        /// 单位工程计算
        /// </summary>
        public void Calculate()
        {
            this.Unit.IsCalculated = false;
            this.RestXH();
            //this.DeleteKong();
            _Methods method = null;

            method = new _Method_Sub(null, this.Unit, this.GetSub());
            method.Calculate();
            method = new _Mothod_Measures(null, this.Unit, this.GetTop1MeasureItem());
            method.Calculate();
            this.Begin();
            method = new _Method_OtherProject(null, this.Unit);
            method.Calculate();
            this.Begin();
            method = new _Method_Metaanalysis(this.Unit);
            method.Calculate();

            CalculateWithouSubsegment();
            this.Unit.NeedCalculate = true;
        }
Example #5
0
        /// <summary>
        /// 为新的单位工程初始化数据
        /// </summary>
        private void doLoadData(_COBJECTS p_info)
        {
            _Entity_SubInfo info;

            //分部分项数据
            info      = new _Entity_SubInfo();
            info.XMBM = "单位工程";
            info.UnID = p_info.ID;
            info.EnID = p_info.PID;
            info.Deep = 2;
            info.SSLB = 0;
            info.Key  = ++this.Current.ObjectKey;
            info.PKey = p_info.PKey;
            p_info.StructSource.ModelSubSegments.Add(info);
            //措施项目数据
            info      = new _Entity_SubInfo();
            info.UnID = p_info.ID;
            info.EnID = p_info.PID;
            info.XMBM = "措施项目";
            info.Deep = 3;
            info.SSLB = 1;
            info.Key  = ++this.Current.ObjectKey;
            info.PKey = p_info.PKey;
            p_info.StructSource.ModelMeasures.Add(info);

            _UnitProject     unit = p_info as _UnitProject;
            _Mothod_Measures met  = new _Mothod_Measures(this, unit, info);

            met.Load();
            //初始化汇总分析
            _Method_Metaanalysis hmet = new _Method_Metaanalysis(unit);

            hmet.Init();
            //其他项目-模板
            _Method_OtherProject omet = new _Method_OtherProject(this, unit);

            omet.Init();
        }
Example #6
0
        /// <summary>
        /// 为新的单位工程初始化数据
        /// </summary>
        private void doLoadData()
        {
            _Entity_SubInfo info;

            //分部分项数据
            info      = new _Entity_SubInfo();
            info.XMBM = "单位工程";
            info.UnID = this.Current.ID;
            info.EnID = this.Current.PID;
            info.Deep = 3;
            info.SSLB = 0;
            this.Current.StructSource.ModelSubSegments.Add(info);
            //措施项目数据
            info      = new _Entity_SubInfo();
            info.UnID = this.Current.ID;
            info.EnID = this.Current.PID;
            info.XMBM = "措施项目";
            info.Deep = 3;
            info.SSLB = 1;
            this.Current.StructSource.ModelMeasures.Add(info);

            _UnitProject unit = this.Current as _UnitProject;
            //初始化措施项目
            _Mothod_Measures met = new _Mothod_Measures(this, unit, info);

            met.Load();
            //初始化汇总分析
            _Method_Metaanalysis hmet = new _Method_Metaanalysis(unit);

            hmet.Init();
            //其他项目-模板
            _Method_OtherProject omet = new _Method_OtherProject(this, unit);

            omet.Init();

            //this.Current.Property.Report.LoadReport(APP.Cache.BaseReport);
        }