Пример #1
0
    private void repBind(int year, int month)
    {
        DataTable dt = BG_OutlayAnaLogic.GetvAnalyOutCkMonth(year, month);

        dt.Columns.Add("TQoackmon");
        dt.Columns.Add("TQoRatio");
        DataTable dtAfter = BG_OutlayAnaLogic.GetvAnalyOutCkMonth(year - 1, month);

        lashow.Text = "";
        if (dt.Rows.Count < 1)
        {
            lashow.Text = "没查询到数据,请先添加后再查询。";
        }
        else if (dt.Rows.Count > 0 && dtAfter.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                decimal oackmon = decimal.Parse(dt.Rows[i]["OACkMon"].ToString());
                for (int j = 0; j < dtAfter.Rows.Count; j++)
                {
                    if (dt.Rows[i]["PIEcoSubCoding"].ToString() == dtAfter.Rows[j]["PIEcoSubCoding"].ToString())
                    {
                        dt.Rows[i]["TQoackmon"] = dtAfter.Rows[j]["OACkMon"];
                        decimal oackmonAfter = ToDec(dtAfter.Rows[j]["OACkMon"].ToString());
                        dt.Rows[i]["TQoRatio"] = DealVal(oackmon, oackmonAfter);
                    }
                }
            }
        }
        Store1.DataSource = dt;
        Store1.DataBind();
    }
Пример #2
0
    //年度收支情况
    private void ShowDtBind(string yearStr)
    {
        DataTable dt = GetMiddleChangeDt();
        //List<string> eiList = Session["EICodingList"] as List<string>;
        //List<string> piList = Session["PICodingList"] as List<string>;
        DataTable dtIncome = new DataTable();

        //if ((piList == null && eiList == null) || eiList.Count>0)
        //{
        if ((hid1Str.Length <= 0 && hid2Str.Length <= 0) || hid1Str.Length > 0)
        {
            dtIncome = BG_IncomeAnaLogic.GetIncomeDtByYeat(Int32.Parse(yearStr), hid1Str, 100);
        }
        //}
        DataTable dtOutlay = new DataTable();

        //if ((piList == null && eiList == null) || piList.Count > 0)
        //{
        if ((hid1Str.Length <= 0 && hid2Str.Length <= 0) || hid2Str.Length > 0)
        {
            dtOutlay = BG_OutlayAnaLogic.GetOutDtByYeat(Int32.Parse(yearStr), hid2Str, 100);
        }
        //}
        dt = BG_IncomeAnaLogic.IncFilterDt(dt, dtIncome);
        dt = BG_OutlayAnaLogic.OutlayFilterDt(dt, dtOutlay);
        this.Store1.DataSource = dt;
        this.Store1.DataBind();
    }
    private void repBind(int year)
    {
        DataTable dt = BG_OutlayAnaLogic.GetAnalyseOutDataByYear(year);

        dt.Columns.Add("TQoackmon");
        dt.Columns.Add("oabmRatio");
        dt.Columns.Add("oaamRatio");
        DataTable dtAfter = BG_OutlayAnaLogic.GetAnalyseOutDataByYear(year - 1);

        lashow.Text = "";
        if (dt.Rows.Count < 1)
        {
            lashow.Text = "没查询到数据,请先添加后再查询。";
        }
        else if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                decimal oackmon  = ToDec(dt.Rows[i]["OACkMon"].ToString());
                decimal oabudmon = ToDec(dt.Rows[i]["OABudMon"].ToString());
                decimal oaaudmon = ToDec(dt.Rows[i]["OAAudMon"].ToString());
                dt.Rows[i]["oabmRatio"] = DealVal(oackmon, oabudmon);
                dt.Rows[i]["oaamRatio"] = DealVal(oackmon, oaaudmon);
                for (int j = 0; j < dtAfter.Rows.Count; j++)
                {
                    if (dt.Rows[i]["PIEcoSubCoding"].ToString() == dtAfter.Rows[j]["PIEcoSubCoding"].ToString())
                    {
                        dt.Rows[i]["TQoackmon"] = dtAfter.Rows[j]["OACkMon"];
                    }
                }
            }
        }
        Store1.DataSource = dt;
        Store1.DataBind();
    }