//显示资产数据
    private void BindData(string danwei)
    {
        int totalRow = 0;
        int curpage  = 1;

        if (ViewState["curpage"] != null)
        {
            curpage = (int)ViewState["curpage"];
        }

        U_ZCBU             Zc1   = new U_ZCBU();
        List <SearchField> list1 = new List <SearchField>();

        if (danwei != null)
        {
            list1.Add(new SearchField("danwei", danwei, SearchOperator.包含));
        }

        list1.Add(new SearchField("zeren", User.Identity.Name, SearchOperator.等于));
        DataSet ds1 = Zc1.GetZcUserkingList(list1, curpage, -1, out totalRow);

        this.GridView1.DataSource = ds1;
        this.GridView1.DataBind();
        ds1.Dispose();
        Zc1.Close();

        this.PageNavigator1.TotalRows   = totalRow;
        this.PageNavigator1.CurrentPage = curpage;
    }
Example #2
0
    void AdvanceSearch1_OnMySearchClick(object sender, EventArgs e)
    {
        ZcMng1_AdvanceSearch search1 = sender as ZcMng1_AdvanceSearch;

        if (search1 != null)
        {
            int totalRow = 0;
            int curpage  = 1;

            List <SearchField> list1 = search1.SearchConditon;

            U_ZCBU  Zc1 = new U_ZCBU();
            DataSet ds1 = Zc1.GetZcUserkingList(list1, curpage, -1, out totalRow);
            this.GridView1.DataSource = ds1;
            this.GridView1.DataBind();
            ds1.Dispose();
            Zc1.Close();

            this.PageNavigator1.TotalRows   = totalRow;
            this.PageNavigator1.CurrentPage = curpage;
        }
    }