摘要: <%@ WebHandler Language="C#" Class="ValidateCode" Debug="true" %>using System;using System.Web;using System.Drawing;using System.Drawing.Imaging;using System.Web.SessionState;//一般处理程序中如果要使用Session必须实现此命名空间里的接口/// <summary>/// 验证码/// </summary>public cl 阅读全文
posted @ 2011-07-29 21:09 _best 阅读(218) 评论(1) 推荐(0) 编辑
摘要: /// <summary> /// 根据商品ID查询出单个商品 /// </summary> /// <param name="productId">商品ID</param> /// <returns></returns> public Entity_B2CSM.Products GetProduct(int productId) { Products product = null; string selectSql = string.Format(@"SELECT [Id] ,[Produc 阅读全文
posted @ 2011-07-29 20:30 _best 阅读(1287) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 将Datatable转换为泛型列表对象 /// </summary> /// <typeparam name="T">泛型T的数据类型</typeparam> /// <param name="dataTable">待转换的DataTable对象</param> /// <returns>目标泛型列表对象</returns> protected List<T> DataTableToList<T>(D 阅读全文
posted @ 2011-07-29 20:27 _best 阅读(423) 评论(0) 推荐(0) 编辑
摘要: <%@ 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 阅读全文
posted @ 2011-07-29 20:24 _best 阅读(714) 评论(0) 推荐(0) 编辑
摘要: <%@ 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 阅读全文
posted @ 2011-07-29 20:21 _best 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2011-07-29 20:17 _best 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 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" 阅读全文
posted @ 2011-07-29 20:14 _best 阅读(273) 评论(0) 推荐(0) 编辑