Exemplo n.º 1
0
 private void CalculateKCAQWMCSF()
 {
     DataRow[] rows1 = this.Unit.StructSource.ModelMeasures.Select(string.Format("XMBM='{0}'", "C10101"), "", DataViewRowState.CurrentRows);
     if (rows1.Length > 0)
     {
         _Entity_SubInfo CSAQ = new _Entity_SubInfo();
         _ObjectSource.GetObject(CSAQ, rows1[0]);
         _Mothods_MFixed fix = new _Mothods_MFixed(null, this.Unit, CSAQ);
         fix.Begin(null);
         _Method_Metaanalysis method = new _Method_Metaanalysis(this.Unit);
         method.Calculate();
     }
 }
Exemplo n.º 2
0
        public static void ModifyEdit_Metaanalysis(ModifyAttribute att, _Business bus, _UnitProject unit)
        {
            DataRow r = att.Source as DataRow;

            if (r != null)
            {
                r[att.FieldName] = att.OriginalValue;
                if (att.FieldName == "Feature")
                {
                    DataTable ParamTable = APP.Application.Global.DataTamp.TempDataSet.Tables["Params_Metaanalysis"].Copy();
                    DataRow[] rows       = ParamTable.Select(string.Format("Code='{0}'", att.OriginalValue));
                    if (rows.Length > 0)
                    {
                        r["Name"] = rows[0]["Name"];
                    }
                }
                _Method_Metaanalysis Method = new _Method_Metaanalysis(unit);
                Method.Begin(null);
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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();
        }
Exemplo n.º 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);
        }