/// <summary>
        /// 計算其他項目的合計值
        /// </summary>
        private void CalculateQT()
        {
            var other = new _Method_OtherProject(null, this.Unit);

            other.Calculate();

            SetQTXM();
        }
Exemple #2
0
        public static void ModifyEdit_Other(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_Other"].Copy();
                    DataRow[] rows       = ParamTable.Select(string.Format("Code='{0}'", att.OriginalValue));
                    if (rows.Length > 0)
                    {
                        r["Name"] = rows[0]["Name"];
                    }
                }
                _Method_OtherProject Method = new _Method_OtherProject(bus, unit);
                Method.Begin();
            }
        }
        /// <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;
        }
Exemple #4
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();
        }
Exemple #5
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);
        }