摘要: dgv分页显示 #region 分页显示 static int rowsall = 0;//总行数 static int pageall = 0;//总页数 static int page = 0;//第几页 static int count =20;//返回5行 static int start = 0;//从第start行开始返回 public string selectsql, tablename; public void upPageX(string sqlstr, strin... 阅读全文
posted @ 2013-03-22 17:30 萧萧路人 阅读(304) 评论(0) 推荐(0) 编辑
摘要: View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Data;public class SQlHelper{public static string connecting ="Data Source= ;User ID= ;PWD= ;Initial Catalog= ";////将自己的数据库填好 public static int ExcuteNonQuery 阅读全文
posted @ 2013-03-21 09:21 萧萧路人 阅读(194) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2013-03-20 10:44 萧萧路人 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2013-03-19 14:52 萧萧路人 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 首先简单的需要初始化分页显示的参数,我所需要的就是总页数,当前页,总行数,返回行数(此为绑定dgv中显示的行数),从第几行开始返回。1.申明变量:申明变量1 #region 初始化分页显示的参数2 static int rowsall = 0;//总行数 3 static int pageall = 0;//总页数4 static int page = 0;//第几页5 static int count = 5;//返回5行6 static int start = 0;//从第start行开始返回7 ... 阅读全文
posted @ 2013-03-18 17:34 萧萧路人 阅读(609) 评论(0) 推荐(0) 编辑
摘要: 大家都知道正则表达式的用处,不用的时候,没有什么用途,可是,仔细想想,在大的项目中都会有用的。 以下是我花了不少时间从各处参考整理的C#的正则表达式,我会不断补充的,提供大家参考,评价。符号解释: \ 将下一个字符标记为一个特殊字符、或一个原义字符、或一个 向后引用、或一个八进制转义符。例如,’n’ 匹配字符 "n"。’\n’ 匹配一个换行符。序列 ’\\’ 匹配 "\" 而 "\(" 则匹配 "("。 ^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的 Multiline 属性,^ 也匹配 ’\n’ 阅读全文
posted @ 2013-03-18 10:31 萧萧路人 阅读(135) 评论(0) 推荐(0) 编辑