/// <summary> /// 显示动态费用明细 /// </summary> private void LoadDataGrid(bool IsScreenToTable) { try { string StartY = ""; string EndY = ""; if (this.ucCostBudgetSelectMonth.ShowMonth) { StartY = this.ucCostBudgetSelectMonth.MonthStart; EndY = this.ucCostBudgetSelectMonth.MonthEnd; } ViewState["StartY"] = StartY; ViewState["EndY"] = EndY; BLL.CostBudgetGroupDynamic dyn = new RmsPM.BLL.CostBudgetGroupDynamic(this.txtProjectCode.Value, this.txtGroupCode.Value, this.txtCostBudgetBackupCode.Value); dyn.StartY = StartY; dyn.EndY = EndY; dyn.ShowContractAccountMoney = base.ShowContractAccountMoney; dyn.Generate(); //目标费用按版本号展开 string html_title_target_money1 = ""; string html_title_target_money2 = ""; // BLL.CostBudgetPageRule.GenerateCostBudgetMoneyTitleHtml(dyn.tbHtml, "BudgetMoney", "已批预算", "当前", ref html_title_target_money1, ref html_title_target_money2, this.IsShowTargetMoneyHis); ViewState["html_title_target_money1"] = html_title_target_money1; ViewState["html_title_target_money2"] = html_title_target_money2; //预算计划按年度展开 string html_title1 = ""; string html_title2 = ""; BLL.CostBudgetPageRule.GenerateCostBudgetPlanTitleHtml(dyn.tb, dyn.iStartY, dyn.iEndY, ref html_title1, ref html_title2); ViewState["html_title1"] = html_title1; ViewState["html_title2"] = html_title2; //暂存明细表 // m_dyn = dyn; BindDataGrid(dyn, IsScreenToTable); } catch (Exception ex) { ApplicationLog.WriteLog(this.ToString(), ex, ""); Response.Write(Rms.Web.JavaScript.Alert(true, "显示动态费用明细出错:" + ex.Message)); } }
/// <summary> /// 按类别生成所有的预算表 /// </summary> /// <param name="m_DataTable"></param> private void GenerateGroupDyn(DataTable m_DataTable, bool IsForce) { try { if ((Session["CostBudgetTreeGroupDyn"] == null) || (IsForce)) { ArrayList al = new ArrayList(); foreach (DataRow dr in m_DataTable.Rows) { string GroupCode = BLL.ConvertRule.ToString(dr["GroupCode"]); if ((GroupCode != "") && (al.IndexOf(GroupCode) < 0)) { al.Add(GroupCode); } } BLL.CostBudgetGroupDynamic[] arrGroup = new RmsPM.BLL.CostBudgetGroupDynamic[al.Count]; int rowIndex = -1; foreach (string GroupCode in al) { rowIndex++; BLL.CostBudgetGroupDynamic dyn = new BLL.CostBudgetGroupDynamic(m_ProjectCode, GroupCode, m_CostBudgetBackupCode); dyn.AutoRefreshHtml = false; dyn.ShowContractAccountMoney = base.ShowContractAccountMoney; dyn.Generate(); arrGroup[rowIndex] = dyn; } Session["CostBudgetTreeGroupDyn"] = arrGroup; } } catch (Exception ex) { throw ex; } }