Exemple #1
0
    protected void submit_DirectClick(object sender, DirectEventArgs e)
    {
        List <object> strlist = GetListStr();

        // DivideStore.DataSource = strlist;
        DivideStore.DataSource = GetNewList(strlist);
        DivideStore.DataBind();
    }
Exemple #2
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();
    }
Exemple #3
0
    public void GetRowexpand(string pisub)
    {
        //DataTable dttmp = BG_PayIncomeLogic.GetBG_PayIncomeByname(pisubName.Replace(" ", ""));
        int psub = common.IntSafeConvert(pisub);

        if (psub == 1000 || psub == 1015 || psub == 1051 || psub == 1065)
        {
            if (psub == 1000)
            {
                if (common.IntSafeConvert(Session["1000"]) == 1)
                {
                    Session["1000"] = 0;
                }
                else
                {
                    Session["1000"] = 1;
                }
            }
            if (psub == 1015)
            {
                if (common.IntSafeConvert(Session["1015"]) == 1)
                {
                    Session["1015"] = 0;
                }
                else
                {
                    Session["1015"] = 1;
                }
            }
            if (psub == 1051)
            {
                if (common.IntSafeConvert(Session["1051"]) == 1)
                {
                    Session["1051"] = 0;
                }
                else
                {
                    Session["1051"] = 1;
                }
            }
            if (psub == 1065)
            {
                if (common.IntSafeConvert(Session["1065"]) == 1)
                {
                    Session["1065"] = 0;
                }
                else
                {
                    Session["1065"] = 1;
                }
            }

            if (common.IntSafeConvert(Session[pisub]) == 0)
            {
                List <object> strlist = GetListStr();
                DivideStore.DataSource = GetNewList(strlist);
                DivideStore.DataBind();
            }
            else
            {
                List <object> strlist = GetListStr();

                if (!ISNode("1000"))
                {
                    DivideStore.DataSource = GetNewList(strlist, psub);
                }
                else if (!ISNode("1015"))
                {
                    DivideStore.DataSource = GetNewList(strlist, psub);
                }
                else if (!ISNode("1051"))
                {
                    DivideStore.DataSource = GetNewList(strlist, psub);
                }
                else if (!ISNode("1065"))
                {
                    DivideStore.DataSource = GetNewList(strlist, psub);
                }
                DivideStore.DataSource = GetNewList(strlist, psub);
                DivideStore.DataBind();
            }
        }
        else
        {
            return;
        }
    }