/// <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); }
private void doLoadDataXml(_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); this.Insert_SubData(p_info.StructSource.ModelSubSegments.Rows[0]); //措施项目数据 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); this.Insert_Sql_MeasuresData(p_info.StructSource.ModelMeasures.Rows[0]); //工程取费 this.Insert_Sql_UnitFree(p_info.StructSource.ModelUnitFee); //参数子目取费 this.Insert_Sql_PSubheadingsFee(p_info.StructSource.ModelPSubheadingsFee); }
/// <summary> /// 开始计算 /// </summary> public void Begin() { _Entity_SubInfo info = this.Current; if (info.ZJFS == _Constant.公式组价) { string str = info.JSJC; if (string.IsNullOrEmpty(str)) { str = "0"; } // this.Activitie.Property.Statistics.Begin(); str = ToolKit.ExpressionReplace(str, this.Unit.StructSource.ModelProjVariable); decimal m = 1m; //decimal.TryParse(info.FL, out m); m = ToolKit.ParseDecimal(info.FL); decimal ZHDJ = ToolKit.Calculate(str) * m * 0.01m; decimal ZHHJ = ZHDJ * info.GCL; this.Unit.StructSource.ModelResultVariable.Set(this.Current.ID, this.Current.SSLB, _Statistics.FILED_ZHHJ, ZHHJ); this.Unit.StructSource.ModelResultVariable.Set(this.Current.ID, this.Current.SSLB, _Statistics.FILED_ZHDJ, ZHDJ); this.Unit.StructSource.ModelResultVariable.Set(this.Current.ID, this.Current.SSLB, _Statistics.FILED_CLFHJ, ZHHJ); this.Unit.StructSource.ModelResultVariable.Set(this.Current.ID, this.Current.SSLB, _Statistics.FILED_CLFDJ, ZHDJ); //this.Unit.StructSource.ModelResultVariable.Set(this.Current.ID,this.Current.SSLB,_Statistics.FILED_ZHDJ, info.ZHHJ / this.Current.GCL); } else { SetValue(); } SetValueToView();; }
/// <summary> /// 确定设置 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton1_Click(object sender, EventArgs e) { //确定时创建子目到清单 _Entity_SubInfo info = new _Entity_SubInfo(); DataRowView view = this.bindingSource1.Current as DataRowView; ChangeDECJ(view); if (view != null) { using (var calculator = new Calculator(CurrentBusiness, Activitie)) { GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfo(info, view.Row, this.Activitie.Property.Libraries.FixedLibrary.FullName); info.LB = "子目-降效"; _Mothods_MFixed fix = new _Mothods_MFixed(this.CurrentBusiness, this.Activitie, this.m_MFixed); var createdMeasure = fix.Create(-1, info); DataRow[] rows = this.Activitie.StructSource.ModelQuantity.Select(string.Format("ZMID={0} and SSLB={1}", info.ID, info.SSLB)); foreach (DataRow item in rows) { item["DEDJ"] = item["SCDJ"]; } //fix.Calculate(); //var method = GLODSOFT.QDJJ.BUSINESS._Methods.CreateIntaceMet(this.CurrentBusiness, this.Activitie, createdMeasure); //method.Calculate(); calculator.Entities.Add(info); this.DialogResult = DialogResult.OK; } CurrentBusiness.FastCalculate(); } }
/// <summary> /// 插入清单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void sButtonOK_Click(object sender, EventArgs e) { DataRowView view = qg.galleryGridList1.bindingSource1.Current as DataRowView; if (view != null) { if (this.CurrQD != null) { if (string.IsNullOrEmpty(this.CurrQD.XMBM) && string.IsNullOrEmpty(this.CurrQD.XMMC)) { DataRow row = this.Activitie.StructSource.ModelSubSegments.GetRowByOther(this.CurrQD.ID.ToString()); if (row != null) { row.Delete(); } } } _Entity_SubInfo info = new _Entity_SubInfo(); ///【2013.2.26 李波更改,作用处理各种备注来源】 GLODSOFT.QDJJ.BUSINESS._Methods.SetFixedInfo(info, view.Row, this.Activitie.Property.Libraries.ListGallery.FullName, this.Activitie.StructSource.ModelSubSegments, "CXCK"); _Method_Sub met = _Method_Sub.GetSub(this.CurrentBusiness, this.Activitie); //当前操作的清单为null int m = this.CurrQD.Sort; met.Create(m, info); Sform.subSegmentListData1.FocusedNode(info.ID); //this.BindData(); //this.CurrQD = info; } // throw new NotImplementedException(); }
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.ModelSubSegments.GetRowByOther("1"); _ObjectSource.GetObject(info, row); met = new _Method_Sub(this.CurrentBusiness, this.Unit, info); met.Begin(session); }
public static _Methods CreateIntaceMet(_Business m_Currentbus, _UnitProject p_un, DataRow r) { _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, r); _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 _Entity_SubInfo Create(bool IsGCL, int p_Sort, _Entity_SubInfo info) { this.CreateZM(p_Sort, info, IsGCL); this.Begin(null); return(info); }
/// <summary> /// Copy当前清单到指定清单之下 /// </summary> /// <param name="QD_info"></param> public override void CopyTo(_Entity_SubInfo QD_info) { DataRow[] rows = this.Unit.StructSource.ModelSubSegments.Select(string.Format("PID={0} and SSLB={1}", this.Current.ID, this.Current.SSLB)); this.Current.Key = ++this.CurrentBusiness.Current.ObjectKey; if (QD_info == null) { this.SetSort(-1, this.Current); } else { this.SetSort(QD_info.Sort, this.Current); } int intCount = GLODSOFT.QDJJ.BUSINESS._Methods.GetCountByBH(this.Current.OLDXMBM, this.Unit.StructSource.ModelSubSegments); this.Current.BEIZHU = GLODSOFT.QDJJ.BUSINESS._Methods.GetQDbeizhu(this.Current.OLDXMBM, intCount, "YJFZ"); this.Unit.StructSource.ModelSubSegments.Add(this.Current); foreach (DataRow item in rows) { _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, item); _Methods_Subheadings m = new _Methods_Subheadings(this.CurrentBusiness, this.Unit, info); m.CopyTo(this.Current); } }
private void simpleButton1_Click(object sender, EventArgs e) { this.Activitie.StructSource.ModelSubheadingsFee.RemoveAll(); this.Activitie.DataTemp.ZMQFDataTemp.IsChange = true; DataRow[] m_FBFXZM = this.Activitie.StructSource.ModelSubSegments.Select("LB='子目' OR LB='子目-降效' OR LB='子目-增加费'"); DataRow[] m_CSXMZM = this.Activitie.StructSource.ModelMeasures.Select("LB='子目' OR LB='子目-降效' OR LB='子目-增加费'"); this.m_ZMCount = m_FBFXZM.Length + m_CSXMZM.Length; foreach (DataRow item in m_FBFXZM) { _Entity_SubInfo m_Entity_SubInfo = new _Entity_SubInfo(); _ObjectSource.GetObject(m_Entity_SubInfo, item); _Methods_Subheadings m_Methods_Subheadings = new _Methods_Subheadings(this.CurrentBusiness, this.Activitie, m_Entity_SubInfo); m_Methods_Subheadings.CreateZMQFS(); } foreach (DataRow item in m_CSXMZM) { _Entity_SubInfo m_Entity_SubInfo = new _Entity_SubInfo(); _ObjectSource.GetObject(m_Entity_SubInfo, item); _Methods_Subheadings m_Methods_Subheadings = new _Methods_Subheadings(this.CurrentBusiness, this.Activitie, m_Entity_SubInfo); m_Methods_Subheadings.CreateZMQFS(); } GLODSOFT.QDJJ.BUSINESS._Project_Statistics m_Project_Statistics = new GLODSOFT.QDJJ.BUSINESS._Project_Statistics(this.Activitie, this.CurrentBusiness); m_Project_Statistics.Calculate(); MsgBox.Alert(m_ZMCount + "条定额刷新成功"); }
public override _Entity_SubInfo Create(int p_Sort, _Entity_SubInfo info) { this.CreateZM(p_Sort, info, true); this.Begin(null); return(info); }
public static void ModifyEdit_Sub(ModifyAttribute att, _Business bus, _UnitProject unit) { DataRow r = att.Source as DataRow; if (r != null) { if (r["LB"].ToString().Contains("子目") && att.FieldName == "GCL") { decimal w = 0m; int m = ToolKit.ParseInt(APP.Application.Global.Configuration.Configs["工程量输入方式"]); if (m > 0) { w = _Methods.GetNumber(r["DW"].ToString()); } if (w == 0) { w = 1; } r["GCL"] = ToolKit.ParseDecimal((ToolKit.ParseDecimal(att.OriginalValue) * w).ToString("F4")); } else { r[att.FieldName] = att.OriginalValue; } _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, att.Source as DataRow); GLODSOFT.QDJJ.BUSINESS._Methods met = GLODSOFT.QDJJ.BUSINESS._Methods.CreateIntace(bus, unit, info); _Modify_Method.Edit_Sub(att.FieldName, met, r); } }
public void SetSort(int p_Sort, _Entity_SubInfo p_info) { string Str_where = string.Format("Deep={0}", p_info.Deep); if (p_Sort < 0) { DataRow[] rows0 = this.GetDataSource.Select(Str_where, " Sort desc", DataViewRowState.CurrentRows); if (rows0.Length > 0) { p_info.Sort = ToolKit.ParseInt(rows0[0]["Sort"]) + 1; } else { p_info.Sort = 1; } } else { p_info.Sort = p_Sort + 1;//赋值排序字段 } //this.GetDataSource.AsEnumerable().Where(p => p["Deep"].Equals(p_info.Deep) && ToolKit.ParseInt(p["Sort"])>=p_info.Sort).Any(s => ToolKit.ParseInt((s["Sort"] = ToolKit.ParseInt(s["Sort"]) + 1)) > 0); DataRow[] rows = this.GetDataSource.Select(Str_where + string.Format(" and Sort>={0}", p_info.Sort), "Sort asc", DataViewRowState.CurrentRows); for (int i = 0; i < rows.Length; i++) { rows[i]["Sort"] = p_info.Sort + i + 1; } }
/// <summary> /// 通过定额库给定额赋值【2013.2.27 李波重载的,作用处理各种备注来源】 /// </summary> /// <param name="info"></param> /// <param name="dr"></param> /// <param name="Libname"></param> /// <param name="strCZBM">操作编码 如:SGSR 手工输入、 CXCK 查询窗口</param> /// <param name="intSD">流水码</param> /// <param name="strQDBH">所属清单编号</param> public static void SetSubheadingsInfo(_Entity_SubInfo info, DataRow dr, string Libname, string strCZBM, int intSD, string strQDBH) { info.XMBM = dr[CEntity定额表.FILED_DINGEH].ToString(); info.XMMC = dr[CEntity定额表.FILED_DINGEMC].ToString(); info.OLDXMBM = dr[CEntity定额表.FILED_DINGEH].ToString(); info.TX = dr[CEntity定额表.FILED_TX1].ToString(); info.DW = dr[CEntity定额表.FILED_DINGEDW].ToString(); info.LB = "子目"; info.XMTZ = ""; info.GCLJSS = ""; info.HL = 0.00m; info.GCL = 1; info.ZHDJ = ToolKit.ParseDecimal(dr[CEntity定额表.FILED_DINGEJJ].ToString()); info.RGFDJ = ToolKit.ParseDecimal(dr[CEntity定额表.FILED_RENGF].ToString()); info.CLFDJ = ToolKit.ParseDecimal(dr[CEntity定额表.FILED_CAILF].ToString()); info.JXFDJ = ToolKit.ParseDecimal(dr[CEntity定额表.FILED_JIXF].ToString()); info.LibraryName = Libname; info.DECJ = dr[CEntity定额表.FILED_DECJ].ToString(); info.JX = dr[CEntity定额表.FILED_JIANGX].ToString() == "是" ? true : false; if (dr[CEntity定额表.FILED_TX1].ToString() == "模板") { info.SC = false; } else { info.SC = true; } string strBEIZHU; strBEIZHU = GetDEbeizhu(strCZBM, intSD, strQDBH); info.BEIZHU = strBEIZHU; }
/// <summary> /// 从清单索引插入到清单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton1_Click(object sender, EventArgs e) { if (this.CurrQD == null) { return; } if (iform.comboxTreelist1.CheckNodes.Count < 1) { this.Alert("请选择定额号"); return; } IEnumerable <DataRowView> views = iform.comboxTreelist1.CheckNodes.Cast <DataRowView>().OrderBy(p => p["DINGEH"].ToString()); ArrayList a = new ArrayList(); a.AddRange(views.ToList()); int intStart = 0; foreach (DataRowView item in a) { _Entity_SubInfo info = new _Entity_SubInfo(); ///【2013.2.27 李波更改,作用处理各种备注来源】 GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfo(info, item.Row, this.Activitie.Property.Libraries.FixedLibrary.FullName, "CXCK", ++intStart, this.CurrQD.OLDXMBM); _Methods_Fixed fix = new _Methods_Fixed(this.CurrentBusiness, this.Activitie, this.CurrQD); fix.Create(-1, info); } this.ExpandNode(); //BindData(); //this.bindingSource5.ResetBindings(false); iform.TreeListResate(); }
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; _FixedList_Statistics sta = new _FixedList_Statistics(this.Current, this.Unit); sta.DataSource = this.GetDataSource; sta.Begin(this.Unit.StructSource.ModelMeasures.Select("PID = " + this.Current.ID)); //计算子目所属节 info = new _Entity_SubInfo(); row = this.Unit.StructSource.ModelMeasures.GetRowByOther(this.Current.PID.ToString()); if (row == null) { return; } _ObjectSource.GetObject(info, row); met = new _Motheds_CommonProj(this.CurrentBusiness, this.Unit, info); met.Begin(session); }
private void DeleteRows(_Entity_SubInfo p_Toinfo) { DataRow[] zrs = this.Unit.StructSource.ModelSubSegments.Select(string.Format(" PID={0}", p_Toinfo.ID)); for (int i = 0; i < zrs.Length; i++) { zrs[i].Delete(); } }
private _Entity_SubInfo GetZMByID(string temp) { DataRow[] rows = this.Activitie.Property.Libraries.FixedLibrary.LibraryDataSet.Tables["定额表"].Select(string.Format("DINGEH='{0}'", temp.ToUpper())); _Entity_SubInfo sinfo = new _Entity_SubInfo(); GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfo(sinfo, rows[0], this.Activitie.Property.Libraries.FixedLibrary.FullName); sinfo.LibraryName = this.Activitie.Property.Libraries.FixedLibrary.FullName; return(sinfo); }
void Sform_FixedChange(_Entity_SubInfo sender) { this.m_CurrQD = sender; if (iform != null) { iform.CurrQD = sender; iform.BindTreeList(); } }
public void DoFilter(_Entity_SubInfo info) { this.m_CurObj = info; if (this.bindingSource1.DataSource == null) { this.bindingSource1.DataSource = this.Activitie.StructSource.ModelIncreaseCosts.DefaultView; this.gridControl1.DataSource = bindingSource1; } this.bindingSource1.Filter = string.Format("ZMID={0} and SSLB={1}", this.m_CurObj.ID, this.m_CurObj.SSLB); }
void ProjWorker_DoWork(object sender, DoWorkEventArgs e) { foreach (DataRowView item in this.treeList1.CheckNodes) { _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, item); CopyTo(info); } }
public static _Method_Sub GetSub(_Business bus, _UnitProject p_Unit) { _Entity_SubInfo Sub_info = new _Entity_SubInfo(); DataRow row = p_Unit.StructSource.ModelSubSegments.GetRowByOther("1"); _ObjectSource.GetObject(Sub_info, row); _Method_Sub mrt = new _Method_Sub(bus, p_Unit, Sub_info); return(mrt); }
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; * * * _Subheadings_Statistics stat = new _Subheadings_Statistics(this.Current, this.Unit); * stat.DataSource = this.GetDataSource; * stat.Begin(); * //计算子目经过子目取费 * _ResultSubheadings_Statictics sta = new _ResultSubheadings_Statictics(this.Current, this.Unit); * sta.DataSource = this.GetDataSource; * sta.Begin(); * * //计算子目所属清单 * info = new _Entity_SubInfo(); * row = this.Unit.StructSource.ModelSubSegments.GetRowByOther(this.Current.PID.ToString()); * _ObjectSource.GetObject(info, row); * met = new _Methods_Fixed(this.Unit, info); * met.Begin();*/ _Entity_SubInfo info = null; DataRow row = null; _Methods met = null; _Subheadings_Statistics stat = new _Subheadings_Statistics(this.Current, this.Unit); stat.Begin(); //计算子目经过子目取费 _ResultSubheadings_Statictics sta = new _ResultSubheadings_Statictics(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 _Mothods_MFixed(this.CurrentBusiness, this.Unit, info); met.Begin(session); }
/// <summary> /// /// </summary> /// <param name="str"></param> /// <param name="info"></param> private void SetZM(DataRow row, _Entity_SubInfo info, string strBEIZHU) { info.XMBM = row["DEBH"].ToString(); info.XMMC = row["DEMC"].ToString(); info.OLDXMBM = row["DEBH"].ToString(); info.DW = row["DW"].ToString(); info.LB = "子目"; info.XMTZ = ""; info.GCLJSS = ""; //info.HL = 1.00m; //update by fuqiang 2013-8-19 if (row.Table.Columns.Contains("XS")) { info.HL = ToolKit.ParseDecimal(row["XS"]); } else { info.HL = 1.00m; } info.SC = true; if (row.Table.Columns.Contains("GCL")) { info.GCL = ToolKit.ParseDecimal(row["GCL"]); } else { info.GCL = 1; } info.LibraryName = this.m_Unit.Property.Libraries.FixedLibrary.FullName; info.BEIZHU = strBEIZHU; DataTable dt = this.m_Unit.Property.Libraries.FixedLibrary.LibraryDataSet.Tables["定额表"]; if (dt != null) { info.XMBM = info.XMBM.Replace(" ", " "); string[] temp = info.XMBM.Split(' '); DataRow[] rows = dt.Select(string.Format("DINGEH='{0}'", temp[0])); if (rows.Length > 0) { info.JX = rows[0]["JIANGX"].ToString() == "是" ? true : false; info.TX = rows[0]["TX1"].ToString(); info.DECJ = rows[0]["DECJ"].ToString(); if (row.Table.Columns.Contains("HSQ") && row.Table.Columns.Contains("HSH")) { string oldvalue = row["HSQ"].ToString(); string newvalue = row["HSH"].ToString(); if (oldvalue.Length > 0) { info.XMBM = info.XMBM + "换"; info.DECJ = info.DECJ.Replace(oldvalue, newvalue); } } } } }
private void barEditItem1_EditValueChanged(object sender, EventArgs e) { BarEditItem item = sender as BarEditItem; _Entity_SubInfo info = item.EditValue as _Entity_SubInfo; if (info != null) { this.CurrQD = info; this.BindData(); } }
/// <summary> /// 获取分部分项对象 /// </summary> /// <returns></returns> private _Entity_SubInfo GetSub() { _Entity_SubInfo info = new _Entity_SubInfo(); DataRow[] rows = this.Unit.StructSource.ModelSubSegments.Select("PID=0"); if (rows.Length > 0) { _ObjectSource.GetObject(info, rows[0]); } return(info); }
private _Entity_SubInfo GetMea() { _Entity_SubInfo info = new _Entity_SubInfo(); DataRow[] rows = this.Activitie.StructSource.ModelMeasures.Select("PID=0"); if (rows.Length > 0) { _ObjectSource.GetObject(info, rows[0]); } return(info); }
private _Method_Sub GetSub() { DataRow[] rows = this.Unit.StructSource.ModelSubSegments.Select("PID=0"); if (rows.Length > 0) { _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, rows[0]); _Method_Sub sub = new _Method_Sub(this.CurrentBusiness, this.Unit, info); return(sub); } return(null); }
void ProjWorker_DoWork(object sender, DoWorkEventArgs e) { foreach (DataRowView item in this.treeList1.CheckNodes) { _Entity_SubInfo info = new _Entity_SubInfo(); _ObjectSource.GetObject(info, item); CopyTo(info); GLODSOFT.QDJJ.BUSINESS._Methods calculateMethod = GLODSOFT.QDJJ.BUSINESS._Methods.CreateIntace(this.CurrentBusiness, this.Activitie, info); calculateMethod.Begin(null); } }
private void CreateZM(DataRow row, _Entity_SubInfo info, bool Is_th, string strBEIZHU) { APP.UserPriceLibrary.AllQuantityUnit = this.Unit.StructSource.ModelQuantity; APP.UserPriceLibrary.UnName = this.Unit.Name; APP.UserPriceLibrary.Range = 1; _Entity_SubInfo sinfo = new _Entity_SubInfo(); //sinfo.ISXSHS = false; SetZM(row, sinfo, strBEIZHU); //info.Create(sinfo); if (row["WZLX"].Equals("措施项目")) { if (_Constant.超高定额号.IndexOf("'" + sinfo.OLDXMBM + "'") != -1) { ChangeDECJ(sinfo); } //根据位置找清单 DataRow[] rows = this.Unit.StructSource.ModelMeasures.Select("XMBM='" + row["WZ"] + "'", "id desc"); if (rows.Length > 0) { _Entity_SubInfo info1 = new _Entity_SubInfo(); _ObjectSource.GetObject(info1, rows[0]); DataRow[] rowsDE = this.Unit.StructSource.ModelMeasures.Select(string.Format(" ZDSC=True and XMBM='{0}' and PID='{1}'", row["DEBH"], info1.ID), "id desc"); int m_Sort = -1; if (Is_th && rowsDE.Length > 0) { m_Sort = ToolKit.ParseInt(rowsDE[0]["Sort"]); rowsDE[0].Delete(); } this.methods_Fixed = new _Mothods_MFixed(this.CurrentBusiness, this.Unit, info1); sinfo.ZDSC = true; this.methods_Fixed.Create(m_Sort, sinfo); } } else { this.methods_Fixed.Current = info; this.methods_Fixed.CreateByGCXX(-1, sinfo); } if (!string.IsNullOrEmpty(row["ZCMCTH"].ToString())) { DataRow[] drs = this.Unit.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1} AND LB='主材'", sinfo.SSLB, sinfo.ID)); foreach (DataRow item in drs) { item.BeginEdit(); item["MC"] = row["ZCMCTH"]; APP.UserPriceLibrary.Update("MC", item["MC", DataRowVersion.Current], item); item.EndEdit(); } } }