摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Reflection;using Microsoft.Practices 阅读全文
posted @ 2010-08-23 17:24 xpwilson 阅读(140) 评论(0) 推荐(0) 编辑
摘要: function sortCol(cId) { return function compareTRs(tr1, tr2) { var value1 = tr1.cells[cId].firstChild.nodeValue; var value2 = tr2.cells[cId].firstChild.nodeValue; return value1.localeCompare(value2); ... 阅读全文
posted @ 2010-08-13 16:58 xpwilson 阅读(175) 评论(0) 推荐(0) 编辑
摘要: T-SQL对字符串的处理能力比较弱,比如我要循环遍历象1,2,3,4,5这样的字符串,如果用数组的话,遍历很简单,但是T-SQL不支持数组,所以处理下来比较麻烦。下边的函数,实现了象数组一样去处理字符串。一,用临时表作为数组。createfunctionf_split(@cvarchar(2000),@splitvarchar(2))returns@ttable(colvarchar(20))as... 阅读全文
posted @ 2010-07-16 09:59 xpwilson 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->publicpartialclassImagePanel:UserControl{privateconstfloatREGION_BORDER_SIZE=1.0f;privateImagem_image;privatefloatm_zoomRate;PointFm_displayLocation;privateboolm_isInMoving;privatePointFm_mouseDown 阅读全文
posted @ 2010-03-31 18:30 xpwilson 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 最近在领导的要求下做了一下项目的优化,总结如下: 1. 使用存储过程, (如果在程序里用exec 存储过程 参数,这样执行似乎并没有快多少) 在数据库里是预编译的,也不需要在字符串传输上花费大量时间。 防sql注入攻击。 2. 尽量优化数据库语句,使逻辑尽量简单。 @ 还有就是在使用函数时 charindex >like > padindex 效率依次递减。 @查询字段是否包含在以,... 阅读全文
posted @ 2010-03-10 14:48 xpwilson 阅读(143) 评论(0) 推荐(0) 编辑
摘要: <Columns> <asp:TemplateField HeaderText="" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="center"> <ItemTemplate> <a href="#" onclick="EditRow(this)" style="text-decoration: non... 阅读全文
posted @ 2010-03-02 11:18 xpwilson 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->//Intheajaxpage,overridetheRendermethod,afterbind,itcanResponsethehtmlbacktothepageprotectedoverridevoidRender(HtmlTextWriterwriter){HtmlTextWriterhtmlWriter=newHtmlTextWriter(newSystem.IO.StringWr 阅读全文
posted @ 2010-01-29 18:11 xpwilson 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--protectedvoidexport_Click(objectsender,EventArgse){BusinessLayerbl=newBusinessLayer();DataTabledt=bl... 阅读全文
posted @ 2010-01-26 16:08 xpwilson 阅读(171) 评论(1) 推荐(0) 编辑
摘要: public static string DataTableToJson(string jsonName, DataTable dt) { StringBuilder Json = new StringBuilder(); Json.Append("{\"" + jsonName + "\":["); if (dt.Rows.Count > 0) { for (int i = 0; i &l... 阅读全文
posted @ 2009-12-30 17:01 xpwilson 阅读(312) 评论(0) 推荐(0) 编辑
摘要: Views in SQL Server 2000 Author: Kristofer GafvertFirst Published: September 12, 2003Last Updated: September 12, 2003Last Reviewed: December 16, 2003PDF: Views.pdf Table of Contents Table of ContentsI... 阅读全文
posted @ 2009-12-18 11:02 xpwilson 阅读(441) 评论(0) 推荐(0) 编辑