03 2012 档案
Winform 下载文件进度条设计
摘要:后台load事件 DownloadFile("http://localhost:2484/123.rar", @"C:\123.rar", progressBar1, label1); /// /// c#,.net 下载文件 ... 阅读全文
posted @ 2012-03-31 17:18 swarb 阅读(154) 评论(0) 推荐(0)
DOS下打开F盘某个程序
摘要:1. 进入DOS环境 2. F:回车 3. cd 文件夹名(EXE文件所在文件夹名,进入后可以dir命令显示文件夹中的文件) 4. 文件名.exe 回车 阅读全文
posted @ 2012-03-30 13:05 swarb 阅读(296) 评论(0) 推荐(0)
C# 获取字符串中的数字
摘要:string s = "-112315-125-56()5555";第一种方法 MatchCollection results = Regex.Matches(s, @"[0-9]+", RegexOptions.Igno... 阅读全文
posted @ 2012-03-29 13:04 swarb 阅读(197) 评论(0) 推荐(0)
修改EXCEL并保存
摘要:private void button1_Click(object sender, EventArgs e) { OpenFileDialog fileDialog = new OpenFileDialog(); ... 阅读全文
posted @ 2012-03-28 17:03 swarb 阅读(257) 评论(0) 推荐(0)
字符串分割多个空格
摘要:字符串分割多个空格有的时候待分割的字符串不标准,中间的空格数不固定,需要按照单个空格分割,使用正则表达式的方法是:data.split("\\s{1,}"); 阅读全文
posted @ 2012-03-28 14:40 swarb 阅读(332) 评论(0) 推荐(0)
DataTable中查询符合条件的数据
摘要:Dim rows As DataRow() = datatable.Select("客户='" & custom & "' and 持卡人身份证号码='" & taskrow("持卡人身份证号码").ToString & "'"... 阅读全文
posted @ 2012-03-22 13:59 swarb 阅读(759) 评论(0) 推荐(0)
C# Page.ClientScript.RegisterStartupScript(this.GetType(), "",...
摘要:C# 从后台执行前台代码时失效Page.ClientScript.RegisterStartupScript(this.GetType(), "",js)不执行;原因一:前台页缺少标签 加上即可原因二:如果一个页面 顺序执行多个Page.ClientScript.R... 阅读全文
posted @ 2012-03-16 15:21 swarb 阅读(248) 评论(0) 推荐(0)
DataReader调用
摘要:调用方法:using (IDataReader dr = DbHelper.ExecuteReader(strSql)) { while (dr.Read()) ... 阅读全文
posted @ 2012-03-12 16:07 swarb 阅读(100) 评论(0) 推荐(0)
比较多层架构查询功能的泛型接口(IList)和普通(dataset)实现
摘要:泛型接口普通表现层 string strWhere = "1=1 order by ID desc"; InfoMgr mgr = new InfoMgr(new InfoEntity()); IList result =... 阅读全文
posted @ 2012-03-09 11:37 swarb 阅读(177) 评论(0) 推荐(0)
C#——DataGridView分页功能的实现
摘要:最近做了一个DataGridView的分页显示Demo。也是看见网络上很多人询问关于DataGridView如何做分页。根据我的认识,Visual Sutido 2005里的DataGridView控件是没有带分页属性的,因此咱们必须通过写代码去实现分页功能。 ... 阅读全文
posted @ 2012-03-02 09:31 swarb 阅读(397) 评论(0) 推荐(0)