private void AnalyDataBind() { DataTable dtEcoInc = BG_EcoIncomeLogic.GetEcoIncomeDt(); DataTable dt1 = AllotEIDt(dtEcoInc, "999", "1022"); DataTable dt2 = AllotEIDt(dtEcoInc, "1021", "1032"); DataTable dtPayInc = BG_PayIncomeLogic.DtDeal(); DataTable dt3 = AllotPIDt(dtPayInc, "999", "1022"); DataTable dt4 = AllotPIDt(dtPayInc, "1021", "1102"); Store Store2 = this.GridPanel2.GetStore(); Store2.DataSource = dt1; Store2.DataBind(); Store Store3 = this.GridPanel3.GetStore(); Store3.DataSource = dt2; Store3.DataBind(); Store Store4 = this.GridPanel4.GetStore(); Store4.DataSource = dt3; Store4.DataBind(); Store Store5 = this.GridPanel5.GetStore(); Store5.DataSource = dt4; Store5.DataBind(); }
private void cmbPPAData() { DataTable dt = BG_PayIncomeLogic.GetAllBG_PayIncome(); cmbPPAstore.DataSource = getnewpi(dt); cmbPPAstore.DataBind(); }
private void cmbData() { DataTable dt = BG_PayIncomeLogic.GetAllBG_PayIncome(); cmbName.DataSource = dt; cmbName.DataBind(); }
private void ARExpSubDataBind() { DataTable dt = BG_PayIncomeLogic.GetAllBG_PayIncome(); ddlARExpSub.DataTextField = "PIEcoSubName"; ddlARExpSub.DataValueField = "PIEcoSubName"; ddlARExpSub.DataSource = dt; ddlARExpSub.DataBind(); }
private void SetNode(int tem, string ftype, string incomeinfo, NodeCollection node) { NodeCollection nodes = new NodeCollection(); DataTable dt = BG_PayIncomeLogic.GetDtPayIncome(incomeinfo, ftype, tem); if (dt.Rows.Count > 0) { for (int j = 0; j < dt.Rows.Count; j++) { int piid = common.IntSafeConvert(dt.Rows[j]["PIID"].ToString()); Node nodeN = new Node(); nodeN.NodeID = piid.ToString(); nodeN.Text = dt.Rows[j]["PIEcoSubName"].ToString(); if (!BG_PayIncomeLogic.GetBoolPayIncome(incomeinfo, ftype, piid)) { nodeN.Icon = Icon.Anchor; node.Add(nodeN); nodeN.Leaf = true; //Session["slist"] = listpiid; //node.CustomAttributes.Add(new ConfigItem("BAAMon", CountBaamon.ToString(), ParameterMode.Value)); //node.CustomAttributes.Add(new ConfigItem("SuppMon", CountSuppmon.ToString(), ParameterMode.Value)); //nodeN.Checked = false; } else { if (SingleNode(piid.ToString()) == 0) { break; } else if (BG_PayIncomeLogic.ISSign(piid)) { nodeN.Leaf = true; nodeN.Icon = Icon.Anchor; node.Add(nodeN); //Session["slist"] = listpiid; } else { nodeN.Icon = Icon.Folder; node.Add(nodeN); } //11 //nodeN.Expanded = true; //nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", CountBaamon.ToString(), ParameterMode.Value)); //nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", CountSuppmon.ToString(), ParameterMode.Value)); //CountBaamon = 0; //CountSuppmon = 0; } //SetNode(piid, ftype, incomeinfo, nodeN); //node.Children.Add(nodeN); //SetNode(piid, ftype, incomeinfo, nodeN); } } }
private static List <object> GetLeafList(List <object> strlist, int piid) { List <object> getleaf = new List <object>(); for (int i = 0; i < strlist.Count - 1; i++) { int piidtmpp = common.IntSafeConvert(strlist[i].ToString().Split(',')[0].Substring(12).Replace(" ", "")); DataTable dttmp = BG_PayIncomeLogic.GetBG_PayIncomeByname(strlist[i].ToString().Split(',')[2].Substring(7).Replace(" ", "")); BG_PayIncome pi = new BG_PayIncome(); if (dttmp.Rows.Count > 4) { pi = BG_PayIncomeManager.GetBG_PayIncomeByPIID(piidtmpp); } else { pi = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dttmp.Rows[0]["PIID"])); } int psubtmp = pi.PIEcoSubParID; if (psubtmp == piid) { getleaf.Add(strlist[i]); } } //DataTable dt = new DataTable(); //dt.Columns.Add("name"); //dt.Columns.Add("mon"); //dt.Columns.Add("supp"); List <object> listTmp = new List <object>(); if (getleaf == null || getleaf.Count < 1) { return(listTmp); } DataTable dt = ListToDataTable <object>(getleaf); var query = from t in dt.AsEnumerable() group t by new { t1 = t.Field <string>("name") } into m select new { name = m.Key.t1, mon = m.Sum(n => n.Field <decimal>("mon")), supp = m.Sum(n => n.Field <decimal>("supp")) }; if (query.ToList().Count > 0) { query.ToList().ForEach(q => { listTmp.Add(new { piidflag = 0, depname = "", name = q.name, mon = q.mon, supp = q.supp }); }); } return(listTmp); }
private void StoreSelectIncomeBind() { string an = "财政拨款"; string pe = "基本支出"; DataTable dt = BG_PayIncomeLogic.GetDtPayIncome(pe, an, 1); for (int i = 0; i < dt.Rows.Count; i++) { dt.Rows[i]["ISSign"] = dt.Rows[i]["ISSign"] == DBNull.Value ? 0 : (int)dt.Rows[i]["ISSign"]; dt.Rows[i]["ISSign"] = 0; } StoreSelectIncome.DataSource = dt; StoreSelectIncome.DataBind(); }
protected void btnAudit_Click(object sender, EventArgs e) { int Subcoding = 0; string artype = ""; if (rdBase.Checked == true) { artype = "基本支出"; } else { artype = "项目支出"; } if (ddlType.SelectedItem.Value == "财政拨款") { if (artype == "基本支出") { Subcoding = 50010101; } else { Subcoding = 50010102; } } else if (ddlType.SelectedItem.Value == "其他资金") { if (artype == "基本支出") { Subcoding = 50010201; } else { Subcoding = 50010202; } } string ARExpSub = ddlARExpSub.SelectedItem.Text.ToString(); int PIID = BG_PayIncomeLogic.GetPIIDbycoding(Subcoding, ARExpSub); if (BGApplyReimburManager.UpdApplicationStatus1(PIID, "审核通过", artype, arid)) { Response.Redirect("ReimApproval.aspx", true); } else { } }
//public void SetValue(string AppValue) //{ // System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument(); // SiteMapPath path = new SiteMapPath(); // xDoc.Load(Server.MapPath("~/Settings/") + "Settings.xml"); // System.Xml.XmlNode xNode; // System.Xml.XmlElement xElem1; // System.Xml.XmlElement xElem2; // xNode = xDoc.SelectSingleNode("//appSettings"); // xElem1 = (System.Xml.XmlElement)xNode.SelectSingleNode("//add[@key='" + "Setting']"); // if (xElem1 != null) // { // xElem1.SetAttribute("value", AppValue); // } // else // { // xElem2 = xDoc.CreateElement("add"); // xElem2.SetAttribute("key", "Setting"); // xElem2.SetAttribute("value", AppValue); // xNode.AppendChild(xElem2); // } // xDoc.Save(Server.MapPath("~/Settings/") + "Settings.xml"); // //XmlDocument doc = new XmlDocument(); // //doc.Load(Server.MapPath("~/Settings/") + "Settings.xml"); // //System.Xml.XmlElement xElem1; // //XmlNode tmp = doc.SelectSingleNode("Root/appSettings"); // 查找节点 Root是根 // //xElem1 = (System.Xml.XmlElement)tmp.SelectSingleNode("//add[@key='" + AppKey + "']"); // //if (tmp != null) // //{ // // tmp.InnerText = AppValue; // //} // //doc.Save(Server.MapPath("~/Settings/") + "Settings.xml"); //} public void StoreSelectIncome_ReadData(object sender, StoreReadDataEventArgs e) { int tem = 1; //string an = cmballocation.SelectedItem.Value; //string pe = cmbpayincome.SelectedItem.Value; //string an = "财政拨款,其他资金"; //string pe = "基本支出,项目支出"; //DataTable dt = BG_PayIncomeLogic.GetDtPayIncome(pe, an, tem); DataTable dt = BG_PayIncomeLogic.GetDtPayIncome(); for (int i = 0; i < dt.Rows.Count; i++) { dt.Rows[i]["ISSign"] = dt.Rows[i]["ISSign"] == DBNull.Value ? 0 : (int)dt.Rows[i]["ISSign"]; } StoreSelectIncome.DataSource = dt; StoreSelectIncome.DataBind(); }
///// <summary> ///// 绑定经济科目 ///// </summary> ///// <param name="PPID"></param> //private void ddlIncomeBind() //{ // DataTable dt = BGPayIncomeManager.GetPayIncomeByPPID(common.IntSafeConvert(ddlPayProType.SelectedValue));//yj // if (dt.Rows.Count > 0) // { // ddlIncome.DataSource = dt; // ddlIncome.DataTextField = "PIEcoSubName"; // ddlIncome.DataValueField = "PIID"; // ddlIncome.DataBind(); // } //} private void ddlIncomeBind() { //DataTable dt = BGPayIncomeManager.GetPayIncomeByPPID(common.IntSafeConvert(ddlPayProType.SelectedValue));//yj //if (dt.Rows.Count > 0) //{ // ddlIncome.DataSource = dt; // ddlIncome.DataTextField = "PIEcoSubName"; // ddlIncome.DataValueField = "PIEcoSubName"; // ddlIncome.DataBind(); //} DataTable dt = BG_PayIncomeLogic.GetAllBG_PayIncome(); ddlIncome.DataSource = dt; ddlIncome.DataTextField = "PIEcoSubName"; ddlIncome.DataValueField = "PIEcoSubName"; ddlIncome.DataBind(); }
private bool ISNode(string NodeID) { bool valid = false; string PIEcoSubName = ""; if (common.IntSafeConvert(NodeID) == 0) { valid = true; } else { if (BG_PayIncomeLogic.GetLeverByPIID(2)) { return(true); } //if (BG_PayIncomeLogic.GetBoolByPiid(common.IntSafeConvert(NodeID))) //{ // return true; //} PIEcoSubName = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(NodeID)).PIEcoSubName; string va = ""; string temstr = Listallocationstr; string[] liststr = temstr.Split('*'); for (int i = 0; i < liststr.Length; i++) { string[] temtt = liststr[i].Split(','); for (int j = 0; j < temtt.Length; j++) { va = temtt[j]; if (PIEcoSubName == va.Trim()) { valid = true; } } } } return(valid); }
public void insertSign(string piid, string issign) { string pname = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(piid)).PIEcoSubName; DataTable dtpiid = BG_PayIncomeLogic.GetBG_PayIncomeByname(pname); int tempiid = 0; for (int i = 0; i < dtpiid.Rows.Count; i++) { tempiid = common.IntSafeConvert(dtpiid.Rows[i]["PIID"]); if (issign == "1") { BG_PayIncome ba = BG_PayIncomeManager.GetBG_PayIncomeByPIID(tempiid); ba.ISSign = 0; BG_PayIncomeManager.ModifyBG_PayIncome(ba); } else { BG_PayIncome ba = BG_PayIncomeManager.GetBG_PayIncomeByPIID(tempiid); ba.ISSign = 1; BG_PayIncomeManager.ModifyBG_PayIncome(ba); } } }
protected void btnSure_Click(object sender, EventArgs e) { BG_BudItems bi = new BG_BudItems(); bi.BIAppConMon = 0;// decimal.Parse(txtBudConNumber.Text.Trim());审批控制金额,应该是预算控制数 bi.BIAppReaCon = txtBIAppReaCon1.Text.Trim(); bi.BIAttr = ddlProProper1.SelectedValue; bi.BIBudSta = "等下对接"; //Session[Constant.UserName].ToString(); bi.BICause = ""; //退回原因 bi.BICharger = txtBICharger1.Text.Trim(); bi.BICode = txtItemNumber1.Text.Trim(); //项目编号 bi.BIEndTime = DateTime.Parse(txtBIEndTime1.Text.Trim()); bi.BIExpGistExp = txtBIExpGistExp1.Text.Trim(); bi.BIFinAllo = 0; // decimal.Parse(txtBudConNumber.Text.Trim());财政拨款 bi.BIFunSub = ddlFunSub1.Text.Trim(); bi.BILastYearCarry = 0; // decimal.Parse(txtBudConNumber.Text.Trim());上年结账 bi.BILongGoal = txtBILongGoal1.Text.Trim(); bi.BIMon = common.IntSafeConvert(HidMonTotal.Value); //GetBIMon(coll.GetValues("txt4")); bi.BIMonSou = ""; //资金来源 bi.BIOthExpProb = txtBIOthExpProb1.Text.Trim(); bi.BIOthFun = 0; // decimal.Parse(txtBudConNumber.Text.Trim());其他资金 bi.BIPlanHz = ddlBIPlanHz1.SelectedValue; //项目频度 bi.BIProType = ddlPayProType1.SelectedItem.Text; bi.BIStaTime = DateTime.Parse(txtBIStaTime1.Text.Trim()); bi.BIYearGoal = txtBIYearGoal1.Text.Trim(); bi.PPID = common.IntSafeConvert(ddlPayProType1.SelectedValue); // bi.BudSta = "未提交"; // bi.PIID = BG_PayProjectManager.GetBG_PayProjectByPPID(bi.PPID).PIID; //common.IntSafeConvert(ddlFunSub.SelectedValue);//yj bi.BIProName = txtProName1.Text.Trim(); bi.BIReportTime = ParseUtil.ToDateTime(txtBITime1.Text.Trim(), DateTime.Now); bi.BIConNum = 0;//预算控制数 bi.BIProDescrip = txtProDesc1.Text.Trim(); bi.DepID = common.IntSafeConvert(Hiddepid.Value); bi.BIProCategory = ddlProType1.SelectedItem.Text; bi.BIYear = common.IntSafeConvert(txtyear.Text); int buid = BG_BudItemsManager.AddBG_BudItems(bi).BudID;//yj if (buid > 0) { BG_BudItemHis hisbi = new BG_BudItemHis(); hisbi.BudID = buid; hisbi.BIAppConMon = 0;// decimal.Parse(txtBudConNumber.Text.Trim());审批控制金额,应该是预算控制数 hisbi.BIAppReaCon = txtBIAppReaCon.Text.Trim(); hisbi.BIAttr = ddlProProper.SelectedValue; hisbi.BIBudSta = "等下对接"; //Session[Constant.UserName].ToString(); hisbi.BICause = ""; //退回原因 hisbi.BICharger = txtBICharger.Text.Trim(); hisbi.BICode = txtItemNumber.Text.Trim(); //项目编号 hisbi.BIEndTime = DateTime.Parse(txtBIEndTime.Text.Trim()); hisbi.BIExpGistExp = txtBIExpGistExp.Text.Trim(); hisbi.BIFinAllo = 0; // decimal.Parse(txtBudConNumber.Text.Trim());财政拨款 hisbi.BIFunSub = ddlFunSub.Text.Trim(); hisbi.BILastYearCarry = 0; // decimal.Parse(txtBudConNumber.Text.Trim());上年结账 hisbi.BILongGoal = txtBILongGoal.Text.Trim(); hisbi.BIMon = common.IntSafeConvert(HidMonTotal.Value); //GetBIMon(coll.GetValues("txt4")); hisbi.BIMonSou = ""; //资金来源 hisbi.BIOthExpProb = txtBIOthExpProb.Text.Trim(); hisbi.BIOthFun = 0; // decimal.Parse(txtBudConNumber.Text.Trim());其他资金 hisbi.BIPlanHz = ddlBIPlanHz.SelectedValue; //项目频度 hisbi.BIProType = ddlPayProType.SelectedItem.Text; hisbi.BIStaTime = DateTime.Parse(txtBIStaTime.Text.Trim()); hisbi.BIYearGoal = txtBIYearGoal.Text.Trim(); hisbi.PPID = common.IntSafeConvert(ddlPayProType.SelectedValue); // hisbi.BudSta = "未提交"; // hisbi.PIID = BG_PayProjectManager.GetBG_PayProjectByPPID(bi.PPID).PIID; //common.IntSafeConvert(ddlFunSub.SelectedValue);//yj hisbi.BIProName = txtProName.Text.Trim(); hisbi.BIReportTime = ParseUtil.ToDateTime(txtBITime.Text.Trim(), DateTime.Now); hisbi.BIConNum = 0;//预算控制数 hisbi.BIProDescrip = txtProDesc.Text.Trim(); hisbi.DepID = common.IntSafeConvert(Hiddepid.Value); hisbi.BIProCategory = ddlProType.SelectedItem.Text; hisbi.BIYear = common.IntSafeConvert(txtyear.Text); int flaid = BG_BudItemHisManager.AddBG_BudItemHis(hisbi).BudHisID; NameValueCollection coll = Request.Form; string[] txt1 = coll.GetValues("txt1"); //行号 string[] txt2 = coll.GetValues("txt2"); //当前年度 string[] txt3 = coll.GetValues("ddlIncome"); //经济科目 string[] txt4 = coll.GetValues("txt4"); //总计 string[] txt5 = coll.GetValues("txt5"); //小计(财政拨款) string[] txt6 = coll.GetValues("txt6"); //小计(经费) string[] txt7 = coll.GetValues("txt7"); //内部开支(经费) string[] txt8 = coll.GetValues("txt8"); //外部拨款(经费) int rowCount = common.IntSafeConvert(HidRowCount.Value); bool flag = false; if (rowCount > 0 && flaid > 0) { for (int j = 0; j < rowCount; j++) { BG_BudCostPro bcp = new BG_BudCostPro(); bcp.BudID = buid; bcp.BCPCurrYear = common.IntSafeConvert(txt2[j]); bcp.BCPRemark = ""; DataTable dtpiid = BG_PayIncomeLogic.GetBG_PayIncomeByname(txt3[j]); int piid = common.IntSafeConvert(dtpiid.Rows[0]["PIID"]); bcp.PIID = piid; bcp.BCPTotal = ParseUtil.ToDecimal(txt4[j], 0); bcp.BCPSubtFinAllo = ParseUtil.ToDecimal(txt5[j], 0); bcp.BCPSubtExp = ParseUtil.ToDecimal(txt6[j], 0); bcp.BCInExpenses = ParseUtil.ToDecimal(txt7[j], 0); bcp.BCOutFunding = ParseUtil.ToDecimal(txt8[j], 0); flag = BGBudCostProManager.AddBGBudCostPro(bcp);//yj } } if (flag) { lblShowResult.Text = "添加成功"; BGBudItemHisManage.InsertBudItemHis(bi); string PostUrl = "BudgetEditList.aspx?depid=" + Hiddepid.Value; Response.Write("<script language='javascript'>if(confirm('是否继续添加?')){window.location.reload();}else{window.location.href='" + PostUrl + "';}</script>"); } else { lblShowResult.Text = "操作失败、请检查数据后重试"; } } else { lblShowResult.Text = "操作失败、请检查数据后重试"; } }
private void SetNode(int tem, NodeCollection node) { NodeCollection nodes = new NodeCollection(); DataTable dt = BG_PayIncomeLogic.GetDtPayIncomeByPIID(tem); int year = common.IntSafeConvert(CurrentYear); int depid = common.IntSafeConvert(HidDepid.Value); DataTable dti = BG_BudItemsLogic.GetBAA(depid, year); if (dt.Rows.Count > 0) { for (int j = 0; j < dt.Rows.Count; j++) { int piid = common.IntSafeConvert(dt.Rows[j]["PIID"].ToString()); Node nodeN = new Node(); nodeN.NodeID = piid.ToString(); nodeN.Text = dt.Rows[j]["PIEcoSubName"].ToString(); string sql = string.Format("PIID='{0}'", piid); DataRow[] dr = dti.Select(sql); decimal Baamon = 0; decimal Suppmon = 0; if (dr.Length > 0) { for (int i = 0; i < dr.Length; i++) { Baamon += ParToDecimal.ParToDel(dr[i]["BAAMon"].ToString()); Suppmon += ParToDecimal.ParToDel(dr[i]["SuppMon"].ToString()); } } if (BG_PayIncomeLogic.GetBoolPayIncomeByPIID(tem)) { if (!BG_PayIncomeLogic.GetBoolPayIncomeByPIID(common.IntSafeConvert(piid))) { nodeN.Icon = Icon.Anchor; node.Add(nodeN); nodeN.Leaf = true; nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", Baamon.ToString(), ParameterMode.Value)); nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", Suppmon.ToString(), ParameterMode.Value)); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); } else { if (BG_PayIncomeLogic.GetLever(3)) { nodeN.Icon = Icon.Anchor; node.Add(nodeN); nodeN.Leaf = true; nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", Baamon.ToString(), ParameterMode.Value)); nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", Suppmon.ToString(), ParameterMode.Value)); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); } else { nodeN.Icon = Icon.Folder; node.Add(nodeN); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); } } // Session["slist"] = listpiid; //node.CustomAttributes.Add(new ConfigItem("BAAMon", CountBaamon.ToString(), ParameterMode.Value)); //node.CustomAttributes.Add(new ConfigItem("SuppMon", CountSuppmon.ToString(), ParameterMode.Value)); //nodeN.Checked = false; } else { if (SingleNode(piid.ToString()) == 0) { break; } else if (BG_PayIncomeLogic.ISSign(piid)) { nodeN.Leaf = true; nodeN.Icon = Icon.Anchor; node.Add(nodeN); nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", Baamon.ToString(), ParameterMode.Value)); nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", Suppmon.ToString(), ParameterMode.Value)); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); //Session["slist"] = listpiid; } else { nodeN.Icon = Icon.Folder; node.Add(nodeN); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); } //nodeN.Expanded = true; //nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", CountBaamon.ToString(), ParameterMode.Value)); //nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", CountSuppmon.ToString(), ParameterMode.Value)); //CountBaamon = 0; //CountSuppmon = 0; } //SetNode(piid, ftype, incomeinfo, nodeN); //node.Children.Add(nodeN); //SetNode(piid, ftype, incomeinfo, nodeN); } } }
private string getMon(int Depid, int Piedobid) { string str = BG_PayIncomeLogic.gettotalMon(Depid, Piedobid, common.IntSafeConvert(CurrentYear)); return(str); }
private object GetNewList(List <object> strlist, int piid) { List <object> Listtmp = new List <object>(); int psub = 0; decimal t1 = 0, t2 = 0, t3 = 0, t4 = 0; decimal s1 = 0, s2 = 0, s3 = 0, s4 = 0; for (int i = 0; i < strlist.Count - 1; i++) { DataTable dttmp = BG_PayIncomeLogic.GetBG_PayIncomeByname(strlist[i].ToString().Split(',')[2].Substring(7).Replace(" ", "")); BG_PayIncome pi = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dttmp.Rows[0]["PIID"])); psub = pi.PIEcoSubParID; if (psub == 0) { if (strlist[i].ToString().Split(',')[2].Substring(7).Contains("工资福利支出")) { t1 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[3].Substring(6)); s1 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[4].Substring(7).Replace("}", "")); //Listtmp.Add(new { depname = "", name = "工资福利支出", mon = t1, supp = s1 }); } else if (strlist[i].ToString().Split(',')[2].Substring(7).Contains("商品和服务支出")) { t2 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[3].Substring(6)); s2 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[4].Substring(7).Replace("}", "")); //Listtmp.Add(new { depname = "", name = "商品和服务支出", mon = t2, supp = s2 }); } else if (strlist[i].ToString().Split(',')[2].Substring(7).Contains("对个人和家庭补助支出")) { t3 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[3].Substring(6)); s3 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[4].Substring(7).Replace("}", "")); //Listtmp.Add(new { depname = "", name = "对个人和家庭补助支出", mon = t3, supp = s3 }); } else if (strlist[i].ToString().Split(',')[2].Substring(7).Contains("其他资本性支出")) { t4 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[3].Substring(6)); s4 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[4].Substring(7).Replace("}", "")); //Listtmp.Add(new { depname = "", name = "其他资本性支出", mon = t4, supp = s4 }); } } else { if (psub == 1000 || psub == 1015 || psub == 1051 || psub == 1065) { if (psub == 1000) { t1 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[3].Substring(6)); s1 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[4].Substring(7).Replace("}", "")); } if (psub == 1015) { t2 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[3].Substring(6)); s2 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[4].Substring(7).Replace("}", "")); } if (psub == 1051) { t3 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[3].Substring(6)); s3 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[4].Substring(7).Replace("}", "")); } if (psub == 1065) { t4 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[3].Substring(6)); s4 += ParToDecimal.ParToDel(strlist[i].ToString().Split(',')[4].Substring(7).Replace("}", "")); } } } } if (DropDownFieldDv.Text.ToString() != "全部") { if (DropDownFieldDv.Value.ToString() == "1000") { Listtmp.Add(new { piidflag = DropDownFieldDv.Value.ToString(), depname = "", name = DropDownFieldDv.Text.ToString(), mon = t1, supp = s1 }); } else if (DropDownFieldDv.Value.ToString() == "1015") { Listtmp.Add(new { piidflag = DropDownFieldDv.Value.ToString(), depname = "", name = DropDownFieldDv.Text.ToString(), mon = t2, supp = s2 }); } else if (DropDownFieldDv.Value.ToString() == "1051") { Listtmp.Add(new { piidflag = DropDownFieldDv.Value.ToString(), depname = "", name = DropDownFieldDv.Text.ToString(), mon = t3, supp = s3 }); } else { Listtmp.Add(new { piidflag = DropDownFieldDv.Value.ToString(), depname = "", name = DropDownFieldDv.Text.ToString(), mon = t4, supp = s4 }); } } else { Listtmp.Add(new { piidflag = 1000, depname = "", name = "工资福利支出", mon = t1, supp = s1 }); Listtmp.Add(new { piidflag = 1015, depname = "", name = "商品和服务支出", mon = t2, supp = s2 }); Listtmp.Add(new { piidflag = 1051, depname = "", name = "对个人和家庭补助支出", mon = t3, supp = s3 }); Listtmp.Add(new { piidflag = 1065, depname = "", name = "其他资本性支出", mon = t4, supp = s4 }); //Listtmp.Add(strlist[strlist.Count - 1]); } List <object> getleaf = GetLeafList(strlist, piid); if (piid == 1000) { for (int i = 0; i < getleaf.Count; i++) { Listtmp.Insert(1 + i, getleaf[i]); } } if (piid == 1015) { for (int i = 0; i < getleaf.Count; i++) { Listtmp.Insert(2 + i, getleaf[i]); } } if (piid == 1051) { for (int i = 0; i < getleaf.Count; i++) { Listtmp.Insert(3 + i, getleaf[i]); } } if (piid == 1065) { for (int i = 0; i < getleaf.Count; i++) { Listtmp.Insert(4 + i, getleaf[i]); } } if (DropDownFieldDv.Text.ToString() == "全部") { Listtmp.Add(strlist[strlist.Count - 1]); } return(Listtmp); }