《数据库认证》大作业 - 软件测试结果(14)

2021-02-21 07:47

cmd.Parameters["@TBName"].Value = strTBName; try {

using(SqlDataAdapter ad = new SqlDataAdapter(cmd)) {

DataSet ds = new DataSet(); ad.Fill(ds);

dg.DataSource = ds.Tables[0].DefaultView; dg.DataBind(); } }

catch(Exception Error) {

string strError = Error.ToString(); } finally {

if( con != null || con.State == ConnectionState.Open ) { con.Close(); } }

lblPaging.Text = GetlblPagingBind(Request.QueryString["Page"],parameterPageCount.Value.ToString()); }

public string GetlblPagingBind(string strParameter,string strPageCount) {

string strPage = string.Empty;

if( strParameter == null ) { strPage = "1"; } else

{ strPage = strParameter; }

//设置页码

string strPageBar="";

if (dg.AllowPaging.ToString() == "False" ) {

strPageBar+="<nobr>\n";

strPageBar+="[当前页]:"+(int.Parse(strPage)).ToString()+"/"+strPageCount+"&nbsp;\n";

if (strPage == "1") {

14 / 19


《数据库认证》大作业 - 软件测试结果(14).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:【K12】安徽省长丰县高中物理第七章机械能守恒定律7.9验证机械能

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: