/// <summary> /// 修改工程量 /// </summary> public override void UpGCL() { bool flag = ToolKit.ParseBoolen(APP.Application.Global.Configuration.Configs["清单工程量设置"]); if (flag) { DataRow[] rows = this.GetDataSource.Select(string.Format("PID={0} and SSLB={1} and TX <> '子目-增加费'", this.Current.ID, this.Current.SSLB), "", DataViewRowState.CurrentRows); _Methods_Subheadings met = new _Methods_Subheadings(this.CurrentBusiness, this.Unit, null); foreach (DataRow row in rows) { row["GCL"] = (ToolKit.ParseDecimal(row["HL"]) * this.Current.GCL).ToString("F4"); _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, row); met.Current = info; met.UpZMGLJGCL(); met.BeginCurrent();//计算子目当前数据 if (!string.IsNullOrEmpty(info.QDBH)) { DataRow[] rows1 = this.Unit.StructSource.ModelMeasures.Select(string.Format("QDBH={0} and XMBM='{1}'", info.QDBH, info.XMBM)); _Mothods_MSubheadings mett = new _Mothods_MSubheadings(this.CurrentBusiness, this.Unit, null); foreach (DataRow item in rows1) { _Entity_SubInfo sinfo = new _Entity_SubInfo(); _ObjectSource.GetObject(sinfo, item); sinfo.GCL = info.GCL * _Methods.GetNumber(sinfo.DW); mett.Current = sinfo; mett.UpGCL(); } } } } this.Begin(null); }
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); }
public override void Calculate() { DataRow[] rows = this.GetDataSource.Select(string.Format("PID={0}", this.Current.ID), "", DataViewRowState.CurrentRows); foreach (DataRow item in rows) { _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, item); _Mothods_MSubheadings met = new _Mothods_MSubheadings(this.CurrentBusiness, this.Unit, info); met.Calculate(); } _FixedList_Statistics sta = new _FixedList_Statistics(this.Current, this.Unit); sta.DataSource = this.GetDataSource; sta.Begin(GetDataSource.Select("PID = '" + Current.ID + "'")); }
public override void UpGCL() { decimal GCL = this.Current.GCL; DataRow r = (this.GetDataSource as _SubSegmentsSource).GetRowByOther(this.Current.PID.ToString()); if (r != null) { decimal d = ToolKit.ParseDecimal(r["GCL"]); if (d != 0) { decimal w = 0m; int m = ToolKit.ParseInt(APP.Application.Global.Configuration.Configs["工程量输入方式"]); if (m > 0) { w = _Methods.GetNumber(this.Current.DW); } if (w == 0) { w = 1; } this.Current.GCL = ToolKit.ParseDecimal((this.Current.GCL / w).ToString("F4")); this.Current.HL = ToolKit.ParseDecimal((this.Current.GCL / d).ToString("F6")); this.GetDataSource.UpDate(this.Current); } this.UpZMGLJGCL(); if (this.Current.QDBH != null) { DataRow[] rows = this.Unit.StructSource.ModelMeasures.Select(string.Format("QDBH={0} and XMBM='{1}' and BEIZHU='{2}'", this.Current.QDBH, this.Current.XMBM, this.Current.BEIZHU)); _Mothods_MSubheadings met = new _Mothods_MSubheadings(this.CurrentBusiness, this.Unit, null); foreach (DataRow item in rows) { _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, item); info.GCL = GCL; met.Current = info; met.UpGCL(); } } } this.Begin(null); }
public override void UpGCL() { bool flag = ToolKit.ParseBoolen(APP.Application.Global.Configuration.Configs["清单工程量设置"]); if (flag) { DataRow[] rows = this.GetDataSource.Select(string.Format("PID={0} and SSLB={1}", this.Current.ID, this.Current.SSLB), "", DataViewRowState.CurrentRows); _Mothods_MSubheadings met = new _Mothods_MSubheadings(this.CurrentBusiness, this.Unit, null); foreach (DataRow row in rows) { row["GCL"] = (ToolKit.ParseDecimal(row["HL"]) * this.Current.GCL).ToString("F4"); _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, row); met.Current = info; met.UpZMGLJGCL(); met.BeginCurrent();//计算子目当前数据 } } this.Begin(null); }
public override _Entity_SubInfo Create(int p_Sort, _Entity_SubInfo info) { info.PID = this.Current.ID; info.SSLB = 1; info.EnID = this.Current.EnID; info.UnID = this.Current.UnID; info.Deep = 6;//子目深度为6 this.SetSort(p_Sort, info); info.Key = ++this.CurrentBusiness.Current.ObjectKey; info.PKey = this.Current.Key; this.Unit.StructSource.ModelMeasures.Add(info); //创建子目参数表 this.Unit.StructSource.ModelVariable.Init_ZM(info.ID, 1); //添加工料机 _Mothods_MSubheadings mSub = new _Mothods_MSubheadings(this.CurrentBusiness, this.Unit, info); mSub.Create(); mSub.Begin(null);//子目计算 return(info); }