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 + "条定额刷新成功"); }
//GLODSOFT.QDJJ.BUSINESS._OtherProject_Statistics Statistics = new GLODSOFT.QDJJ.BUSINESS._OtherProject_Statistics(null); public OtherProjectForm(_UnitProject active) { this.Activitie = active; this.ProjectStaistics = new GLODSOFT.QDJJ.BUSINESS._Project_Statistics(active, this.CurrentBusiness); //this.Statistics.Unit = active; InitializeComponent(); }
public override void BeginCurrent() { _SubSegment_Statistics sta = new _SubSegment_Statistics(this.Current, this.Unit); sta.DataSource = this.GetDataSource; sta.Begin(); _Project_Statistics stat = new _Project_Statistics(this.Unit, this.CurrentBusiness); stat.Begin();//单位工程计算 }
public override void FastCalculate() { if (this.Current.NeedCalculate) { var statistics = new _Project_Statistics(this.Current as _UnitProject, this); statistics.CalculateWithouSubsegment(); this.Current.NeedCalculate = false; } }
/// <summary> /// 计算汇总当前项目数据 /// </summary> public void CalculateForXml() { //合并数据项目结构数据 //this.Current.StructSource.MergeData(); //计算数据 this.BeginData(); this.ProjDataBase.MyTran = this.DBTran as System.Data.OleDb.OleDbTransaction; _Project_Statistics sta = null; //循环项目结构表进行计算 this.BeginData(); foreach (_UnitProject info in this.ObjectList.Values) { if (info.Deep == 2) { info.JJJC = APP.JJJC; this.LoadForXml(info); this.ProjDataBase.MyTran = this.DBTran as System.Data.OleDb.OleDbTransaction; sta = new _Project_Statistics(info, this); //计算,合并新的数据集合 sta.Calculate(); this.ProjDataBase.Save(info, this.ProjDataBase.MyTran); } } //foreach (DataRow row in this.Current.StructSource.ModelProject.Rows) //{ // if (row["DEEP"].Equals(2)) // { // info = new _UnitProject(); // info.JJJC = APP.JJJC; // _ObjectSource.GetObject(info, row); // //还原单位工程并且计算 // this.LoadForXml(info); // this.BeginData(); // this.ProjDataBase.MyTran = this.DBTran as System.Data.OleDb.OleDbTransaction; // sta = new _Project_Statistics(info, this); // //计算,合并新的数据集合 // sta.Calculate(); // //row["UnitProject"] = info; // this.ProjDataBase.Save(info, this.ProjDataBase.MyTran); // } //} this.EndData(); this.ProjDataBase.MyTran = null; //参数累加计算 //this.Current.StructSource.Statistics(); //保存数据 //this.Save(); //重新读取当前项目数据 //this.Load(); }
/// <summary> /// 计算汇总当前项目数据 /// </summary> public override void Calculate() { //计算数据 _Project_Statistics sta = null; //循环计算 { // if (this.Current.IsCalculated) { sta = new _Project_Statistics(this.Current as _UnitProject, this); //计算,合并新的数据集合 sta.Calculate(); } } }
/// <summary> /// 替换当前选项卡 /// </summary> /// <param name="p_Parent"></param> /// <param name="p_UnitProject"></param> public void Replace(CWellComeProject p_Parent, _UnitProject p_UnitProject, int OldId) { //1.如果选项卡是当前打开的选项卡 重新添加页面数据 //2.如果当前选项卡存在列表中 重新添加数据 XtraTabPageEx xtp = this.Find(p_UnitProject, OldId); if (xtp == null) { return; } //APP.Methods.Init(p_UnitProject); //xtp.XtraTabType = "单位工程"; //xtp.Dock = DockStyle.Fill;//设置样式是否填充整个PANEL GLODSOFT.QDJJ.BUSINESS._Project_Statistics statistics = new GLODSOFT.QDJJ.BUSINESS._Project_Statistics(p_UnitProject, p_Parent.CurrentBusiness); statistics.Calculate(); //创建新的应用窗体 xtp.GetProjectForm = new ProjectForm(); xtp.UnitProject = p_UnitProject; //同步当前业务对象 xtp.GetProjectForm.CurrentBusiness = p_Parent.CurrentBusiness; p_UnitProject.NeedCalculate = true; //活动的单位工程 xtp.GetProjectForm.Activitie = p_UnitProject; //设置父类容器 xtp.GetProjectForm.Parent_Projects = p_Parent; xtp.GetProjectForm.FormBorderStyle = FormBorderStyle.None; xtp.GetProjectForm.Dock = DockStyle.Fill;//设置样式是否填充整个PANEL //设置为非顶级控件 xtp.GetProjectForm.TopLevel = false; //显示窗体 xtp.GetProjectForm.Visible = true; xtp.Text = p_UnitProject.Name; xtp.GetProjectForm.dp_Function.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; //当前存在的重新加载数据 //删除原来的Project对象 xtp.Controls.Remove(xtp.Controls[0]); //添加新的Project对象 xtp.Controls.Add(xtp.GetProjectForm); }
public override void Begin(List <int> session) { if (session != null) { if (session.Contains(Current.ID)) { return; } else { session.Add(Current.ID); } } this.Unit.IsCalculated = true; _SubSegment_Statistics sta = new _SubSegment_Statistics(this.Current, this.Unit); sta.DataSource = this.GetDataSource; sta.Begin(); _Project_Statistics stat = new _Project_Statistics(this.Unit, this.CurrentBusiness); stat.Begin();//单位工程计算 }
/// <summary> /// 计算汇总当前项目数据 /// </summary> public override void Calculate() { //合并数据项目结构数据 this.Current.StructSource.MergeData(); //计算数据 _Project_Statistics sta = null; //循环计算 foreach (_UnitProject info in this.ObjectList.Values) { var projectStatistics = new _Project_Statistics(info, this); //计算,合并新的数据集合 projectStatistics.Calculate(); //删除当前单位工程下数据 //this.Current.StructSource.ProjClearCalculate(info); DataTable table = null; //分部分项表 table = info.StructSource.ModelSubSegments.GetChanges(); if (table != null) { this.Current.StructSource.ModelSubSegments.MergeData(table); } //措施项目表 table = info.StructSource.ModelMeasures.GetChanges(); if (table != null) { this.Current.StructSource.ModelMeasures.MergeData(table); } //其他项目表 table = info.StructSource.ModelOtherProject.GetChanges(); if (table != null) { this.Current.StructSource.ModelOtherProject.MergeData(table); } //工料机 table = info.StructSource.ModelQuantity.GetChanges(); if (table != null) { this.Current.StructSource.ModelQuantity.MergeData(table); } //计算结果表 table = info.StructSource.ModelProjVariable.GetChanges(); if (table != null) { this.Current.StructSource.ModelProjVariable.MergeData(table); } //汇总分析表 table = info.StructSource.ModelMetaanalysis.GetChanges(); if (table != null) { this.Current.StructSource.ModelMetaanalysis.MergeData(table); } } //参数累加计算 this.Current.StructSource.Statistics(); //保存数据 //this.Save(); //重新读取当前项目数据 //this.Load(); }
public override void FastCalculate() { try { //合并数据项目结构数据 this.Current.StructSource.MergeData(); //计算数据 _Project_Statistics sta = null; //循环计算 foreach (_UnitProject info in this.ObjectList.Values) { if (info.NeedCalculate) { sta = new _Project_Statistics(info, this); sta.CalculateWithouSubsegment(); //删除当前单位工程下数据 DataTable table = null; //分部分项表 table = info.StructSource.ModelSubSegments; if (table != null) { this.Current.StructSource.ModelSubSegments.MergeData(table); } //措施项目表 table = info.StructSource.ModelMeasures; if (table != null) { this.Current.StructSource.ModelMeasures.MergeData(table); } //其他项目表 table = info.StructSource.ModelOtherProject; if (table != null) { this.Current.StructSource.ModelOtherProject.MergeData(table); } //工料机 table = info.StructSource.ModelQuantity; if (table != null) { this.Current.StructSource.ModelQuantity.MergeData(table); } //汇总分析表 table = info.StructSource.ModelMetaanalysis; if (table != null) { this.Current.StructSource.ModelMetaanalysis.MergeData(table); } //计算结果表 table = info.StructSource.ModelProjVariable; if (table != null) { this.Current.StructSource.ModelProjVariable.MergeData(table); } info.NeedCalculate = false; } } //参数累加计算 this.Current.StructSource.Statistics(); //保存数据 //this.Save(); //重新读取当前项目数据 //this.Load(); } catch (Exception e) { throw e; } }