Ejemplo n.º 1
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();
    }
Ejemplo n.º 2
0
    private void repBind(int year, int month)
    {
        DataTable dt = BG_IncomeAnaLogic.GetAnalyIncCkDataMonth(year, month);

        dt.Columns.Add("TQiackmon");
        dt.Columns.Add("TQiRatio");
        DataTable dtAfter = BG_IncomeAnaLogic.GetAnalyIncCkDataMonth(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 iackmon = ToDec(dt.Rows[i]["IACkMon"].ToString());
                for (int j = 0; j < dtAfter.Rows.Count; j++)
                {
                    if (dt.Rows[i]["EICoding"].ToString() == dtAfter.Rows[j]["EICoding"].ToString())
                    {
                        dt.Rows[i]["TQiackmon"] = dtAfter.Rows[j]["IACkMon"];
                        decimal iackmonAfter = ToDec(dtAfter.Rows[j]["IACkMon"].ToString());
                        dt.Rows[i]["TQiRatio"] = DealVal(iackmon, iackmonAfter);
                    }
                }
            }
        }
        Store1.DataSource = dt;
        Store1.DataBind();
    }