黑夜的狼

沮丧吗,那就是一种无病呻吟!留恋它就是一种高度近视!目光应该放得更远一点! 别不想飞,只是要一步跨过太平洋!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
/******************表行变色*************************/
function ShowRowColor(id) {
var tbl = $(id)[0];
if (tbl) {
for (var i = 1; i < tbl.rows.length; i++) {
tbl.rows[i].onmouseover
= function () {
for (var j = 0; j < this.cells.length; j++) {
this.cells[j].style.backgroundColor = "#EDF1E8";
}
}
tbl.rows[i].onmouseout
= function () {
for (var j = 0; j < this.cells.length; j++) {
this.cells[j].style.backgroundColor = "#FFFFFF";
}
}
}
}
}
/******************表行变色*************************/

这个是行变色,是在弹出框页面中调用

/// <summary>
/// 获取分页数据
/// </summary>
/// <param name="tableName"></param>
/// <param name="colName"></param>
/// <param name="pageSize"></param>
/// <param name="currentPage"></param>
/// <param name="orderStr"></param>
/// <param name="whereStr"></param>
/// <param name="recordCount"></param>
/// <param name="returnDT"></param>
public static void GetPagedData(string tableName, string colName, int pageSize, int currentPage,
string orderStr, string whereStr, out int recordCount,ref DataTable returnDT)
{
SqlParameter paramCount
= new SqlParameter("@recordCount", SqlDbType.Int);
paramCount.Direction
= ParameterDirection.Output;
SqlParameter[] paramArray
= {
new SqlParameter("@tableName", tableName),
new SqlParameter("@colName", colName),
new SqlParameter("@pageSize", pageSize),
new SqlParameter("@currentPage", currentPage),
new SqlParameter("@orderStr", orderStr),
new SqlParameter("@whereStr", whereStr),
paramCount
};
returnDT
= DbHelper.DbHelperSQL.RunProcedureForList("usp_pagination", paramArray);
recordCount
= int.Parse(paramCount.Value.ToString());
}
public static void GetPagedData(string tableName, int currentPage,
string orderStr, out int recordCount,ref DataTable returnDT)
{
int pageSize = 10;
string whereStr = string.Empty;
string colName = "*";
GetPagedData(tableName, colName, pageSize, currentPage,
orderStr, whereStr,
out recordCount,ref returnDT);
}
这是弹出框显示列表数据时调用的分页代码
posted on 2011-03-11 05:43  anncesky  阅读(146)  评论(0编辑  收藏  举报