2010年8月9日

摘要: 代码代码代码 阅读全文
posted @ 2010-08-09 12:58 NewSunshineLife 阅读(522) 评论(3) 推荐(0) 编辑

2010年8月7日

摘要: 引用:http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.templatefield.templatefield.aspx在某些情况下,我们不知道绑定到GridView中的数据会有多少列。例如,用户需要输入产品不同颜色和尺码的需求数量,而不同的产品会有不同的尺码。如下图所示。于是,需要为GridView动态增加模板列,... 阅读全文
posted @ 2010-08-07 16:43 NewSunshineLife 阅读(886) 评论(0) 推荐(0) 编辑

2010年7月22日

摘要: 转自http://msdn.microsoft.com/zh-cn/library/ms175972(SQL.100).aspx指定临时命名的结果集,这些结果集称为公用表表达式 (CTE)。语法:[ WITH <common_table_expression> [ ,...n ] ]<common_table_expression>::=expression_name[ (... 阅读全文
posted @ 2010-07-22 14:42 NewSunshineLife 阅读(390) 评论(0) 推荐(0) 编辑

2010年7月7日

摘要: 用来创建独一无二的,只能有一个实例的对象。Ensure a class has only one instance and provide a global point of access to it.有些对象我们只需要一个实例,例如线程池、缓存、处理偏好设置和注册表对象、日志对象、充当打印机、显卡等设备的驱动程序对象。如果制造出多个实例,就会导致许多问题产生,例如:程序的行为异常、资源使用过量,... 阅读全文
posted @ 2010-07-07 13:14 NewSunshineLife 阅读(179) 评论(0) 推荐(0) 编辑

2010年5月24日

摘要: 转自http://sqlblog.com/blogs/peter_debetta/archive/2007/03/09/t-sql-convert-hex-string-to-varbinary.aspxSQL Server 2005中有一个没有文档说明的函数sys.fn_varbintohexstr,函数可把十六进制数转换为字符串表示的十六进制数(例如0x3a转换为'0x3a'),但是并没有函数... 阅读全文
posted @ 2010-05-24 14:01 NewSunshineLife 阅读(650) 评论(0) 推荐(1) 编辑

2010年5月22日

摘要: 使用RIGHT ( character_expression , integer_expression ) 返回字符串中从右边开始指定个数的字符。例如:SELECT RIGHT('FirstName', 5) AS 'First Name' --- tNameselect RIGHT ('000000' + cast ( 1 as varchar(6) ), 6)--- 000001select ... 阅读全文
posted @ 2010-05-22 16:14 NewSunshineLife 阅读(501) 评论(0) 推荐(0) 编辑

2010年5月18日

摘要: 数字类:n位小数的正实数 表达式 ^[0-9]+(.[0-9]{n})?$非0的正整数 表达式 ^\+?[1-9][0-9]*$ 阅读全文
posted @ 2010-05-18 15:03 NewSunshineLife 阅读(210) 评论(0) 推荐(1) 编辑
摘要: 日期格式:yyyy:显示年的四位数表示yy:显示年的两位数表示MM:月dd:日HH:小时的24小时显示格式hh:小时的12小时显示格式mm:分钟ss:秒例如:当前时间为2010-05-01 14:20:30String.Format("{0:yyyy/MM/dd}", DateTime.Now) 显示为2010/05/01String.Format("{0:HH:mm:ss}", DateTime... 阅读全文
posted @ 2010-05-18 09:23 NewSunshineLife 阅读(185) 评论(0) 推荐(0) 编辑

2010年5月13日

摘要: Excel中行转列,或者列转行。1. 选择要转置的数据区域,例如:1112131415212223242531323334352. Copy3. Paste - Transpose(转置),效果如下:112131122232132333142434152535 阅读全文
posted @ 2010-05-13 11:26 NewSunshineLife 阅读(187) 评论(0) 推荐(0) 编辑

2010年5月11日

摘要: SELECT * FROM sys.sysobjects WHERE xType = 'U' ORDER BY name ASCxType类型AF = Aggregate function (CLR)C = CHECK constraintD = DEFAULT (constraint or stand-alone)F = FOREIGN KEY constraintFN = SQL scalar... 阅读全文
posted @ 2010-05-11 11:58 NewSunshineLife 阅读(178) 评论(0) 推荐(0) 编辑

导航