摘要: > ... 阅读全文
posted @ 2015-08-12 09:44 Neal Caffrey 阅读(458) 评论(0) 推荐(0)
摘要: //将IEnumerable类型的集合转换为DataTable类型 1111 public static DataTable LINQToDataTable(IEnumerable varlist) { //定义要返回的DataTable对象 D... 阅读全文
posted @ 2015-07-14 16:42 Neal Caffrey 阅读(233) 评论(0) 推荐(0)
摘要: --方法0:动态SQL法declare @s varchar(100),@sql varchar(1000)set @s='1,2,3,4,5,6,7,8,9,10'set @sql='select col='''+ replace(@s,',',''' union all select ''')+... 阅读全文
posted @ 2015-05-11 17:50 Neal Caffrey 阅读(402) 评论(0) 推荐(0)
摘要: 1.根据单个分隔字符用split截取例如string st="GT123_1";string[] sArray=st.split("_");即可得到sArray[0]="GT123",sArray[1]="1";2.利用多个字符来分隔字符串例如string str = "GTAZB_JiangjBe... 阅读全文
posted @ 2015-04-28 16:42 Neal Caffrey 阅读(272) 评论(0) 推荐(0)
摘要: /// /// Excel文档 /// /// /// private void dataTableToCsv(DataTable table, string file) { stri... 阅读全文
posted @ 2015-04-24 15:35 Neal Caffrey 阅读(353) 评论(0) 推荐(0)
摘要: .divtt { position: relative; width: 150px; he... 阅读全文
posted @ 2015-04-23 15:12 Neal Caffrey 阅读(278) 评论(0) 推荐(0)
摘要: 单引号 \'双引号 \"反斜杠 \\空 \0警告 \a退格 \b换页 \f换行 \n回车 \r水平制表符 \t垂直制表符 \v 阅读全文
posted @ 2015-03-26 16:11 Neal Caffrey 阅读(265) 评论(0) 推荐(0)
摘要: public string GetUserIdByName(string UserName, string pwd) { string sql = @"select Namess from testlogin where UserName=@name and PWD=@PWD"; MySqlConn... 阅读全文
posted @ 2015-02-13 13:48 Neal Caffrey 阅读(208) 评论(0) 推荐(0)
摘要: 手动给DataTable添加数据DataTable tab = new DataTable();tab.Columns.Add("id", typeof(int));//添加列名tab.Columns.Add("name", typeof(string));//添加列名//tab.Rows.Add(... 阅读全文
posted @ 2015-01-08 09:32 Neal Caffrey 阅读(286) 评论(0) 推荐(0)
摘要: l GridView无代码分页排序l GridView选中,编辑,取消,删除l GridView正反双向排序l GridView和下拉菜单DropDownList结合l GridView和CheckBox结合l 鼠标移到... 阅读全文
posted @ 2014-12-08 14:49 Neal Caffrey 阅读(458) 评论(0) 推荐(0)