コード例 #1
0
    //资产包详细信息
    private void BindZcInfo()
    {
        U_ZCBAOBU zcb1 = new U_ZCBAOBU();
        string    ids  = zcb1.GetZCIDByBID(Request["ID"].ToString());
        U_ZCBU    zc1  = new U_ZCBU();
        DataSet   ds1  = zc1.GetZCInfoByID(ids);

        this.Repeater1.DataSource = ds1;
        this.Repeater1.DataBind();
        zcb1.Close();

        //统计总和
        for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
        {
            DataRow dr = ds1.Tables[0].Rows[i];
            if (dr["bj"] != DBNull.Value)
            {
                this.sum1 = this.sum1 + double.Parse(dr["bj"].ToString());
            }
            if (dr["lxhj"] != DBNull.Value)
            {
                this.sum2 = this.sum2 + double.Parse(dr["lxhj"].ToString());
            }
        }
    }
コード例 #2
0
ファイル: EditZcBao.aspx.cs プロジェクト: sinyuewh/CJZC2007
    private void Bind()
    {
        if (Request["ID"] != null)
        {
            U_ZCBAOBU zcb1 = new U_ZCBAOBU();
            DataSet   ds   = zcb1.GetZCBAOInfoByID(Request["ID"].ToString());
            this.Bname.Text   = ds.Tables[0].Rows[0]["Bname"].ToString();
            this.Bjsf.Text    = ds.Tables[0].Rows[0]["Bjsf"].ToString();
            this.Bzeren.Text  = ds.Tables[0].Rows[0]["Bzeren"].ToString();
            this.Bzeren1.Text = ds.Tables[0].Rows[0]["bzeren1"].ToString();

            this.Bremark.Text  = ds.Tables[0].Rows[0]["Bremark"].ToString();
            ViewState["Bname"] = ds.Tables[0].Rows[0]["Bname"].ToString();
            string  ids = zcb1.GetZCIDByBID(Request["ID"].ToString());
            U_ZCBU  zc1 = new U_ZCBU();
            DataSet ds1 = zc1.GetZCInfoByID(ids);
            this.Repeater1.DataSource = ds1;
            this.Repeater1.DataBind();
            zcb1.Close();
        }
    }