执行一个存储过程得到记录结果集, 在dataGrid中asp程序如何将其分页显示呢? 25
privatevoidGetList(intpageIndex){try{string[]strNames=newstring[]{"@qixir","@cunqi"};...
private void GetList(int pageIndex)
{
try
{
string[] strNames = new string[] { "@qixir", "@cunqi" };
Enum[] str = new Enum[] { SqlDbType.VarChar, SqlDbType.Int };
string[] strValues = new string[] { strdate, strqx };
gvdatalist.DataSource = DBHelper.ExecuteSP("mp_b_tyckqxjg2", strNames, str, strValues);
gvdatalist.DataBind();
}
catch (ZDS.BFP.ApplicationException err)
{
throw err;
}
}
protected void AspNetPager_PageChanged(object src, Wuqi.Webdiyer.PageChangedEventArgs e)
{
if (AspNetPager.CurrentPageIndex != e.NewPageIndex)
{
this.AspNetPager.CurrentPageIndex = e.NewPageIndex;
this.GetList(e.NewPageIndex);
}
} 展开
{
try
{
string[] strNames = new string[] { "@qixir", "@cunqi" };
Enum[] str = new Enum[] { SqlDbType.VarChar, SqlDbType.Int };
string[] strValues = new string[] { strdate, strqx };
gvdatalist.DataSource = DBHelper.ExecuteSP("mp_b_tyckqxjg2", strNames, str, strValues);
gvdatalist.DataBind();
}
catch (ZDS.BFP.ApplicationException err)
{
throw err;
}
}
protected void AspNetPager_PageChanged(object src, Wuqi.Webdiyer.PageChangedEventArgs e)
{
if (AspNetPager.CurrentPageIndex != e.NewPageIndex)
{
this.AspNetPager.CurrentPageIndex = e.NewPageIndex;
this.GetList(e.NewPageIndex);
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询