06 2012 档案

简单易用的分页存储过程(只按唯一性字段排序)
摘要:USE [test]GO/****** 对象: StoredProcedure [dbo].[PublicSplitPage_sp] 脚本日期: 06/29/2012 16:00:35 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[PublicSplitPage_sp]@TableName varchar(8000), --表名@SqlStr varchar(8000)=null, --查询语句@Condition varchar(8000), ... 阅读全文

posted @ 2012-06-29 16:24 ~~小麦 阅读(193) 评论(0) 推荐(0)

实用强大的分页存储过程 支持多字段排序(保证唯一性)
摘要://此存储过程存在缺陷:排序字段不具备唯一性时、按名称排序时 排序结果不正确。Create PROC P_viewPage /* nzperfect [no_mIss] 高效通用分页存储过程(双向检索) 2007.5.7 QQ:34813284 敬告:适用于单一主键或存在唯一值列的表或视图 ps:Sql语句为8000字节,调用时请注意传入参数及sql总长度不要超过指定范围 */ @TableName VARCHAR(200), --... 阅读全文

posted @ 2012-06-29 15:03 ~~小麦 阅读(304) 评论(0) 推荐(0)

完美分页存储过程(有缺陷,无法加入条件)
摘要:使用分页存储过程 Create PROCEDURE ListPage( @tblName nvarchar(200), ----要显示的表或多个表的连接 @fldName nvarchar(200) = '*', ----要显示的字段列表 @pageSize int = 10, ----每页显示的记录个数 @page int = 1, ----要显示那一页的记录 @pageCount int = 1 output, ... 阅读全文

posted @ 2012-06-29 11:45 ~~小麦 阅读(191) 评论(0) 推荐(0)

Winform保留最近用户登录信息
摘要:在这里我只保留了用户账号://登录时加载private void Login_Load(object sender, EventArgs e) { if (File.Exists("http://www.cnblogs.com/nearuser.txt")) { StreamReader sr = new StreamReader("http://www.cnblogs.com/nearuser.txt", System.Text.Encoding.UTF8); txtUser... 阅读全文

posted @ 2012-06-27 10:16 ~~小麦 阅读(200) 评论(0) 推荐(0)

Winform 删除当前行
摘要:删除当前行: gvCarList.Rows.RemoveAt(gvCarList.CurrentRow.Index); 阅读全文

posted @ 2012-06-21 10:28 ~~小麦 阅读(142) 评论(0) 推荐(0)

jquery获取当前请求页面URL
摘要:$.ajax({ type:"post", url:"../Common/txtAjax.ashx", data:{action:"SavePrice",proid:theid,scprice:thesc,b2cprice:theb2c,xjprice:thexj,xbprice:thexb,kaprice:theka,pfprice:thepf}, success:function(data){ if(data==1) { ... 阅读全文

posted @ 2012-06-19 15:13 ~~小麦 阅读(878) 评论(0) 推荐(0)

jquery取小数点后两拉
摘要:var price=$("#<%=btn.ClientID %>").val()*(1+0.03); alert(price.toFixed(2)); 阅读全文

posted @ 2012-06-14 15:53 ~~小麦 阅读(189) 评论(0) 推荐(0)

Winform日期格式验证(xxxx-xx-xx)
摘要:/// <summary> /// 日期格式判断 /// </summary> /// <param name="InputStr"></param> /// <returns></returns> public static bool ValidateDataTime(string InputStr) { if (InputStr != "") { if (Regex.IsMatch(InputStr.Trim(), @"^((((1[... 阅读全文

posted @ 2012-06-13 11:34 ~~小麦 阅读(351) 评论(1) 推荐(0)

missing } after property list 错误
摘要:Joson 符号编译问题:<option value=\"" + dr["ID"] + "\">" + dr["Name"] + "</option> 改成 <option value=\\\"" + dr["ID"] + "\\\">" + dr["Name"] + "</option> 就好了! 阅读全文

posted @ 2012-06-11 20:46 ~~小麦 阅读(357) 评论(0) 推荐(0)

Asp.net清除Cookie值(已验证有效)
摘要:HttpCookie cook = Request.Cookies["username"];cook.Expires = DateTime.Now.AddDays(-1);cook.Values.Clear();System.Web.HttpContext.Current.Response.Cookies.Set(cook); 阅读全文

posted @ 2012-06-03 22:17 ~~小麦 阅读(155) 评论(0) 推荐(0)

导航