Beispiel #1
0
    protected void Gridview_Kucun_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView theGrid      = sender as GridView; // refer to the GridView
        int      newPageIndex = 0;

        if (-2 == e.NewPageIndex)
        {
            TextBox     txtNewPageIndex = null;
            GridViewRow pagerRow        = Gridview_Kucun.BottomPagerRow;


            if (null != pagerRow)
            {
                txtNewPageIndex = (TextBox)pagerRow.FindControl("textbox");   // refer to the TextBox with the NewPageIndex value
            }

            if (null != txtNewPageIndex && txtNewPageIndex.Text != "")
            {
                newPageIndex = int.Parse(txtNewPageIndex.Text) - 1; // get the NewPageIndex
            }
        }
        else
        {
            newPageIndex = e.NewPageIndex;
        }

        BindKucun();
        newPageIndex             = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex             = newPageIndex >= Gridview_Kucun.PageCount ? Gridview_Kucun.PageCount - 1 : newPageIndex;
        Gridview_Kucun.PageIndex = newPageIndex;
        Gridview_Kucun.DataBind();
    }
Beispiel #2
0
    //绑定库存详细表
    protected void BindKucunD()
    {
        string temp;

        temp  = " and a.IMIM_ID like'%" + label27.Text.ToString() + "%'";
        temp += " and d.IMS_StoreID like'%" + label8.Text.ToString() + "%'";
        Gridview_Kucun.DataSource = outs.Select_IMInventoryDetail(temp);
        Gridview_Kucun.DataBind();
        UpdatePanel_KucunD.Update();
    }
Beispiel #3
0
 //绑定库存表
 protected void BindKucun()
 {
     Gridview_Kucun.DataSource = or.Select_Kucun(label11.Text.ToString().Trim());
     Gridview_Kucun.DataBind();
     UpdatePanel_Kucun.Update();
 }