/******************表行变色*************************/
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);
}
玩技术,要学会忍受寂寞--