摘要:
/// <summary> /// 将Datatable转换为泛型列表对象 /// </summary> /// <typeparam name="T">泛型T的数据类型</typeparam> /// <param name="dataTable">待转换的DataTable对象</param> /// <returns>目标泛型列表对象</returns> protected List<T> DataTableToList<T>(D 阅读全文
摘要:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OptionAjax.aspx.cs" Inherits="OptionAjax" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htm 阅读全文
摘要:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LoginByAjax.aspx.cs" Inherits="LoginByAjax" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><h 阅读全文
摘要:
proc up_GetPagedData@pi int,--页码@ps int, --页容量@rc float output, --总行数@pc float output--总页数asbegin select @rc=COUNT(cid) from Classes where CIsDel=0--查出总行数select @pc=CEILING(@rc/@ps) -- 算出总页数 CEILING(1.1)=2 floor(1.1)=1select * from (select ROW_NUMBER() over(order by cid) as RNum,* from Classes where 阅读全文
摘要:
using System;using System.Text;using System.Data;using System.Data.SqlClient;using System.Configuration;namespace DAL{ /// <summary> /// 数据库操作类 /// </summary> public class SqlHelper { //从配置文件获得连接字符串 private static string connStr = ConfigurationManager.ConnectionStrings["connStr" 阅读全文