コード例 #1
0
    private DataTable GetPayname(DataTable dtnew)
    {
        string YearMonth = CurrentYear + "-" + cmbmon.SelectedItem.Text;

        System.Data.DataView dv = dtnew.DefaultView;
        string filter           = string.Format("Qtime='{0}' and DepID={1}", YearMonth + "-01", cmbdept.SelectedItem.Value);

        dv.RowFilter = filter;
        DataTable dt = dv.ToTable(true);

        if (dt.Rows.Count > 0)
        {
            dt.Columns.Add("PayPrjName");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                int piid = common.IntSafeConvert(dt.Rows[i]["PIID"].ToString());
                dt.Rows[i]["PayPrjName"] = BG_PayIncomeManager.GetBG_PayIncomeByPIID(piid).PIEcoSubName;
            }
            return(dt);
        }
        else
        {
            X.Msg.Alert("提示", "数据为空").Show();
            return(dt);
        }
    }
コード例 #2
0
    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);
    }
コード例 #3
0
    private void ApplyAlterDataBind()
    {
        DataTable dt = BGApplyReimburManager.GetApplyReimbur(arid); //BGPayIncomeManager.GetPayIncomeListByPIID(arid)

        if (dt.Rows.Count > 0)
        {
            //string PiName = dt.Rows[0]["PIEcoSubName"].ToString();
            //txtPro.Text = PiName;
            //ddlDepart.Text = dt.Rows[0]["DepID"].ToString();
            //txtARReiSinNum.Text = dt.Rows[0]["ARReiSinNum"].ToString();
            //ddlARExpType.Text = dt.Rows[0]["ARExpType"].ToString();
            //ddlARExpPro.SelectedItem.Value = dt.Rows[0]["ARExpPro"].ToString();
            txtBITime.Text     = dt.Rows[0]["ARTime"].ToString();
            txtARRepDep.Text   = dt.Rows[0]["ARRepDep"].ToString();
            txtARAgent.Text    = dt.Rows[0]["ARAgent"].ToString();
            txtARMon.Text      = Convert.ToDecimal(dt.Rows[0]["ARMon"]).ToString("f8").TrimEnd('0').TrimEnd('.');
            txtARExcu.Text     = dt.Rows[0]["ARExcu"].ToString();
            txtreason.Text     = dt.Rows[0]["ARReason"].ToString();
            txtreason.ReadOnly = true;
            string name = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dt.Rows[0]["PPID"].ToString())).PIEcoSubName;
            ddlARExpSub.SelectedItem.Text = name;
            Session["PIID"] = common.IntSafeConvert(dt.Rows[0]["PPID"].ToString());

            DataTable dt1    = BGReimDocumentsManager.GetReimDocuments(arid);
            string    RDType = string.Empty;
            if (dt1.Rows.Count > 0)
            {
                RDType        = dt1.Rows[0]["RDType"].ToString();
                lbRDType.Text = RDType;
            }

            //if (RDType == "")
            //{
            //    Response.Redirect("SearchTravelCost.aspx?arid=" + arid, true);
            //}
            //else if (RDType == "")
            //{
            //    Response.Redirect("SearchMediCost.aspx?arid=" + arid, true);
            //}
            //else if (RDType == "")
            //{
            //    Response.Redirect("SearchOtherCost.aspx?arid=" + arid, true);
            //}
        }
    }
コード例 #4
0
    private void AddDataBind()
    {
        int       year  = Convert.ToInt32(HidYear.Value);
        int       depid = Convert.ToInt32(HidDepid.Value);
        DataTable dt    = BG_BudItemsLogic.GetBEA(depid, year);

        dt.Columns.Add("Name");
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                int          piid = (int)dt.Rows[i]["PIID"];
                BG_PayIncome pi   = BG_PayIncomeManager.GetBG_PayIncomeByPIID(piid);
                dt.Rows[i]["Name"] = pi.PIEcoSubName;
            }
        }
        Store2.DataSource = dt;
        Store2.DataBind();
    }
コード例 #5
0
    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);
    }
コード例 #6
0
    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);
            }
        }
    }
コード例 #7
0
    protected void submit_DirectClick(object sender, DirectEventArgs e)
    {
        txtshow.Text = "";
        int           depid   = common.IntSafeConvert(cmbDep.SelectedItem.Value);
        List <object> strlist = new List <object>();
        string        depname = "";
        string        name    = "";
        decimal       mon     = 0;

        if (depid == 0 && cmbPPA.SelectedItem.Value == "全部")
        {
            DataTable dt = BG_EstimatesAllocationLogic.GetALLEAMon(common.IntSafeConvert(CurrentYear));
            //for (int i = 0; i < dt.Rows.Count; i++)
            //{
            //    depname = BG_DepartmentManager.GetBG_DepartmentByDepID(common.IntSafeConvert(dt.Rows[i]["depid"])).DepName;
            //    name = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dt.Rows[i]["PIID"])).PIEcoSubName;
            //    strlist.Add(new { depname = depname, name = name, mon = mon });
            //}
            if (dt.Rows.Count <= 0)
            {
                strlist.Clear();
                string message = "没有查询到数据";
                txtshow.Text = message;
            }
            else
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    depname = BG_DepartmentManager.GetBG_DepartmentByDepID(common.IntSafeConvert(dt.Rows[i]["DepID"])).DepName;
                    name    = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dt.Rows[i]["PIID"])).PIEcoSubName;
                    mon     = ParToDecimal.ParToDel(dt.Rows[i]["BEAMon"].ToString());
                    strlist.Add(new { depname = depname, name = name, mon = mon });
                }
            }
        }
        else if (depid == 0 && cmbPPA.SelectedItem.Value != "全部")
        {
            name = cmbPPA.SelectedItem.Value;
            string    bgpi  = BG_BudItemsLogic.GetBG_PayIncomeByname(name);
            string[]  slist = bgpi.Split(',');
            DataTable dt1   = new DataTable();
            for (int i = 0; i < slist.Count(); i++)
            {
                int piid = common.IntSafeConvert(slist[i]);
                dt1 = BG_EstimatesAllocationLogic.GetEAMonDTbyPIID(common.IntSafeConvert(CurrentYear), piid);
                if (dt1.Rows.Count > 0)
                {
                    for (int j = 0; j < dt1.Rows.Count; j++)
                    {
                        depname = BG_DepartmentManager.GetBG_DepartmentByDepID(common.IntSafeConvert(dt1.Rows[j]["DepID"])).DepName;
                        mon    += ParToDecimal.ParToDel(dt1.Rows[j]["BEAMon"].ToString());
                        strlist.Add(new { depname = depname, name = name, mon = mon });
                    }
                }
            }
            if (strlist.Count <= 0)
            {
                strlist.Clear();
                string message = "没有查询到数据";
                txtshow.Text = message;
            }
        }
        else if (depid != 0 && cmbPPA.SelectedItem.Value == "全部")
        {
            depname = cmbDep.SelectedItem.Text;
            DataTable dt = BG_EstimatesAllocationLogic.GetEAMonDTbyDepID(common.IntSafeConvert(CurrentYear), common.IntSafeConvert(cmbDep.SelectedItem.Value));
            if (dt.Rows.Count <= 0)
            {
                strlist.Clear();
                string message = "没有查询到数据";
                txtshow.Text = message;
            }
            else
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    name = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dt.Rows[i]["PIID"])).PIEcoSubName;
                    mon  = ParToDecimal.ParToDel(dt.Rows[i]["BEAMon"].ToString());
                    strlist.Add(new { depname = depname, name = name, mon = mon });
                }
            }
        }
        else
        {
            name = cmbPPA.SelectedItem.Value;
            string    bgpi  = BG_BudItemsLogic.GetBG_PayIncomeByname(name);
            string[]  slist = bgpi.Split(',');
            DataTable dt1   = new DataTable();
            for (int i = 0; i < slist.Count(); i++)
            {
                int piid = common.IntSafeConvert(slist[i]);
                mon += BG_EstimatesAllocationLogic.GetEAMon(depid, piid, common.IntSafeConvert(CurrentYear));
            }
            if (mon <= 0)
            {
                strlist.Clear();
                string message = "没有查询到数据";
                txtshow.Text = message;
            }
            else
            {
                depname = cmbDep.SelectedItem.Text;
                strlist.Add(new { depname = depname, name = name, mon = mon });
            }
        }
        DivideStore.DataSource = strlist;
        DivideStore.DataBind();
    }
コード例 #8
0
    private int SingleNode(string NodeID)
    {
        int    t = 0;
        string tem;

        if (common.IntSafeConvert(NodeID) == 0)
        {
            if (NodeID == "PA")
            {
                if (Listallocationstr.Contains("财政拨款") && !Listallocationstr.Contains("其他资金"))
                {
                    t = 2;
                }
                else if (Listallocationstr.Contains("其他资金") && !Listallocationstr.Contains("财政拨款"))
                {
                    t = 1;
                }
                else
                {
                    t = 3;
                }
            }
            if (NodeID == "nodeF")
            {
                if (Listallocationstr.Contains("基本支出") && !Listallocationstr.Contains("项目支出"))
                {
                    t = 21;
                }
                else if (Listallocationstr.Contains("项目支出") && !Listallocationstr.Contains("基本支出"))
                {
                    t = 22;
                }
                else
                {
                    t = 23;
                }
            }
            if (NodeID == "nodeO")
            {
                if (Listallocationstr.Contains("基本支出") && !Listallocationstr.Contains("项目支出"))
                {
                    t = 11;
                }
                else if (Listallocationstr.Contains("项目支出") && !Listallocationstr.Contains("基本支出"))
                {
                    t = 12;
                }
                else
                {
                    t = 13;
                }
            }
        }
        else
        {
            string name = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(NodeID)).PIEcoSubName;
            if (Listallocationstr.Contains(name))
            {
                t = 1000;
            }
        }
        return(t);
    }
コード例 #9
0
    private List <object> GetListStr()
    {
        txtshow.Text = "";
        int           depid    = common.IntSafeConvert(cmbDep.SelectedItem.Value);
        List <object> strlist  = new List <object>();
        int           piidflag = 0;
        string        depname  = "";
        string        name     = "";
        decimal       mon      = 0;
        decimal       supp     = 0;

        if (depid == 0 && DropDownFieldDv.Text.ToString() == "全部")
        {
            DataTable dt = BG_BudgetAllocationLogic.GetALLAAMon(common.IntSafeConvert(CurrentYear));
            //for (int i = 0; i < dt.Rows.Count; i++)
            //{
            //    depname = BG_DepartmentManager.GetBG_DepartmentByDepID(common.IntSafeConvert(dt.Rows[i]["depid"])).DepName;
            //    name = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dt.Rows[i]["PIID"])).PIEcoSubName;
            //    strlist.Add(new { depname = depname, name = name, mon = mon });
            //}
            if (dt.Rows.Count <= 0)
            {
                strlist.Clear();
                string message = "没有查询到数据";
                txtshow.Text = message;
            }
            else
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    piidflag = common.IntSafeConvert(dt.Rows[i]["PIID"]);
                    depname  = BG_DepartmentManager.GetBG_DepartmentByDepID(common.IntSafeConvert(dt.Rows[i]["DepID"])).DepName;
                    name     = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dt.Rows[i]["PIID"])).PIEcoSubName;
                    mon      = ParToDecimal.ParToDel(dt.Rows[i]["BAAMon"].ToString());
                    supp     = ParToDecimal.ParToDel(dt.Rows[i]["SuppMon"].ToString());
                    strlist.Add(new { piidflag = piidflag, depname = depname, name = name, mon = mon, supp = supp });
                }
            }
        }
        else if (depid == 0 && DropDownFieldDv.Text.ToString() != "全部")
        {
            name = DropDownFieldDv.Text.ToString();
            DataTable dt   = BGDepartmentManager.GetDepByfadepid(AreaDepID);
            string    bgpi = BG_BudItemsLogic.GetBG_PayIncomeByname(name);
            if (name == "工资福利支出" || name == "商品和服务支出" || name == "对个人和家庭补助支出" || name == "其他资本性支出")
            {
                DataTable dta = BG_BudgetAllocationLogic.GetALLAAMon(common.IntSafeConvert(CurrentYear));
                //for (int i = 0; i < dta.Rows.Count; i++)
                //{
                //    depname = BG_DepartmentManager.GetBG_DepartmentByDepID(common.IntSafeConvert(dta.Rows[i]["depid"])).DepName;
                //    name = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dta.Rows[i]["PIID"])).PIEcoSubName;
                //    strlist.Add(new { depname = depname, name = name, mon = mon });
                //}
                if (dta.Rows.Count <= 0)
                {
                    strlist.Clear();
                    string message = "没有查询到数据";
                    txtshow.Text = message;
                }
                else
                {
                    for (int i = 0; i < dta.Rows.Count; i++)
                    {
                        piidflag = common.IntSafeConvert(dta.Rows[i]["PIID"]);
                        depname  = BG_DepartmentManager.GetBG_DepartmentByDepID(common.IntSafeConvert(dta.Rows[i]["DepID"])).DepName;
                        name     = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dta.Rows[i]["PIID"])).PIEcoSubName;
                        mon      = ParToDecimal.ParToDel(dta.Rows[i]["BAAMon"].ToString());
                        supp     = ParToDecimal.ParToDel(dta.Rows[i]["SuppMon"].ToString());
                        strlist.Add(new { piidflag = piidflag, depname = depname, name = name, mon = mon, supp = supp });
                    }
                }
            }

            string[]  slist = bgpi.Split(',');
            DataTable dt1   = new DataTable();
            for (int i = 0; i < slist.Count(); i++)
            {
                int piid = common.IntSafeConvert(slist[i]);
                dt1 = BG_BudgetAllocationLogic.GetAAMonDTbyPIID(common.IntSafeConvert(CurrentYear), piid);
                if (dt1.Rows.Count > 0)
                {
                    for (int j = 0; j < dt1.Rows.Count; j++)
                    {
                        depname = BG_DepartmentManager.GetBG_DepartmentByDepID(common.IntSafeConvert(dt1.Rows[j]["DepID"])).DepName;
                        mon    += ParToDecimal.ParToDel(dt1.Rows[j]["BAAMon"].ToString());
                        supp   += ParToDecimal.ParToDel(dt1.Rows[j]["SuppMon"].ToString());
                        strlist.Add(new { piidflag = piid, depname = depname, name = name, mon = mon, supp = supp });
                    }
                }
            }
            if (strlist.Count <= 0)
            {
                strlist.Clear();
                string message = "没有查询到数据";
                txtshow.Text = message;
            }
        }
        else if (depid != 0 && DropDownFieldDv.Text.ToString() == "全部")
        {
            depname = cmbDep.SelectedItem.Text;
            DataTable dt = BG_BudgetAllocationLogic.GetAAMonDTbyDepID(common.IntSafeConvert(CurrentYear), common.IntSafeConvert(cmbDep.SelectedItem.Value));
            if (dt.Rows.Count <= 0)
            {
                strlist.Clear();
                string message = "没有查询到数据";
                txtshow.Text = message;
            }
            else
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    piidflag = common.IntSafeConvert(dt.Rows[i]["PIID"]);
                    name     = BG_PayIncomeManager.GetBG_PayIncomeByPIID(piidflag).PIEcoSubName;
                    mon      = ParToDecimal.ParToDel(dt.Rows[i]["BAAMon"].ToString());
                    supp     = ParToDecimal.ParToDel(dt.Rows[i]["SuppMon"].ToString());
                    strlist.Add(new { piidflag = piidflag, depname = depname, name = name, mon = mon, supp = supp });
                }
            }
        }
        else
        {
            name = DropDownFieldDv.Text.ToString();
            if (name == "工资福利支出" || name == "商品和服务支出" || name == "对个人和家庭补助支出" || name == "其他资本性支出")
            {
                depname = cmbDep.SelectedItem.Text;
                DataTable dta = BG_BudgetAllocationLogic.GetAAMonDTbyDepID(common.IntSafeConvert(CurrentYear), common.IntSafeConvert(cmbDep.SelectedItem.Value));
                if (dta.Rows.Count <= 0)
                {
                    strlist.Clear();
                    string message = "没有查询到数据";
                    txtshow.Text = message;
                }
                else
                {
                    for (int i = 0; i < dta.Rows.Count; i++)
                    {
                        piidflag = common.IntSafeConvert(dta.Rows[i]["PIID"]);
                        name     = BG_PayIncomeManager.GetBG_PayIncomeByPIID(piidflag).PIEcoSubName;
                        mon      = ParToDecimal.ParToDel(dta.Rows[i]["BAAMon"].ToString());
                        supp     = ParToDecimal.ParToDel(dta.Rows[i]["SuppMon"].ToString());
                        strlist.Add(new { piidflag = piidflag, depname = depname, name = name, mon = mon, supp = supp });
                    }
                }
            }
            string    bgpi  = BG_BudItemsLogic.GetBG_PayIncomeByname(name);
            string[]  slist = bgpi.Split(',');
            DataTable dt    = new DataTable();
            for (int i = 0; i < slist.Count(); i++)
            {
                int piid = common.IntSafeConvert(slist[i]);
                dt = BG_BudgetAllocationLogic.GetAAMon(depid, piid, common.IntSafeConvert(CurrentYear));
                if (dt.Rows.Count > 0)
                {
                    mon  += ParToDecimal.ParToDel(dt.Rows[0]["BAAMon"].ToString());
                    supp += ParToDecimal.ParToDel(dt.Rows[0]["SuppMon"].ToString());
                }
                mon  += 0;
                supp += 0;
            }

            if (dt.Rows.Count <= 0)
            {
                strlist.Clear();
                string message = "没有查询到数据";
                txtshow.Text = message;
            }
            else
            {
                depname = cmbDep.SelectedItem.Text;
                strlist.Add(new { piidflag = common.IntSafeConvert(slist[0]), depname = depname, name = name, mon = mon, supp = supp });
            }
        }
        string  str     = "";
        decimal summon  = 0;
        decimal sumsupp = 0;

        for (int i = 0; i < strlist.Count; i++)
        {
            str      = strlist[i].ToString();
            summon  += Getmon(str, "mon");
            sumsupp += Getmon(str, "supp");
        }
        strlist.Add(new { piidflag = 0, depname = "总计", name = "", mon = summon, supp = sumsupp });
        return(strlist);
    }
コード例 #10
0
    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);
    }