예제 #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
    private void BindData()
    {
        U_ZCBAOBU zcb1 = new U_ZCBAOBU();
        string    ids  = zcb1.GetZCIDByBID(Request["id"].ToString());

        zcb1.Close();
        List <SearchField> list1 = new List <SearchField>();

        list1.Add(new SearchField("id", ids, SearchOperator.集合, SearchFieldType.数值型));
        list1.Add(new SearchField("zeren", User.Identity.Name, SearchFieldType.字符型));
        U_ZCBU  zc1 = new U_ZCBU();
        DataSet ds  = zc1.GetSearchResult(list1);

        this.GridView1.DataSource = ds;
        this.GridView1.DataBind();
        ds.Dispose();
        zc1.Close();
    }
예제 #3
0
    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();
        }
    }