noteswiki

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  C#

C# Study Notes
摘要:验证字符串格式 1)判断字符串是否是常见数据类型,decimal,foalt,double,datetime,int等等 2)验证字符串符合特定规则 (1)邮箱地址,IP地址 (2)纯数字,纯字母(大写字母/小写字母),数字与字母 (3)电话号码,手机号码,出生日期 电子邮件格式、固定电话号码和手机 阅读全文
posted @ 2016-11-23 22:46 noteswiki 阅读(6592) 评论(0) 推荐(1)

摘要:var query = (from x in a.AsEnumerable() join y in b.AsEnumerable() on x.Field("col1") equals y.Field("col1") select new { col1= y.Field("col1"), col2=x.Field("col2") }).To... 阅读全文
posted @ 2016-10-30 22:03 noteswiki 阅读(541) 评论(0) 推荐(0)

摘要:DateTime ConvertDate = DateTime.ParseExact("20140504", "yyyyMMdd", null, System.Globalization.DateTimeStyles.AllowWhiteSpaces).ToString("yyyy-MM-dd"); DateTime.ParseExact("18/05/2014", "dd/MM/yyyy"... 阅读全文
posted @ 2016-10-30 21:58 noteswiki 阅读(1002) 评论(0) 推荐(0)

摘要:class A { public int id { get; set; } public string name { get; set; } } class B { public int id { get; set; } public int age { ge... 阅读全文
posted @ 2016-10-30 21:56 noteswiki 阅读(1799) 评论(0) 推荐(0)

摘要:private static void DataTableToSQLServer( DataTable dt) { string connectionString = GetConnectionString(); using (SqlConnection destinationConnection =new Sql... 阅读全文
posted @ 2016-10-30 21:50 noteswiki 阅读(142) 评论(0) 推荐(0)

摘要:SqlBulkcopy Loop Insert 阅读全文
posted @ 2016-10-30 17:04 noteswiki 阅读(851) 评论(0) 推荐(0)

摘要:自定义IniFile操作类 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System 阅读全文
posted @ 2016-09-20 00:33 noteswiki 阅读(3445) 评论(0) 推荐(0)

摘要:窗体起始位置为顶部中间,WinForm居中显示: 其他注意点: 通过指定窗体Locaiton来,设定窗体位置 创建窗体时, 设置宽度和高度 获取屏幕大小(using System.Drawing) 阅读全文
posted @ 2016-09-18 23:58 noteswiki 阅读(14092) 评论(0) 推荐(1)

摘要:通过List<String>动态传递参数 调用 动态 传递给sqlparamter <略> 阅读全文
posted @ 2016-09-08 00:08 noteswiki 阅读(1844) 评论(0) 推荐(0)

摘要:private void bindTreeView1() { string sql = "select * from dm_category"; DataTable dt = db.ExecuteDataTable(sql, CommandType.Text, null); DataRow[] dr 阅读全文
posted @ 2016-09-06 20:33 noteswiki 阅读(250) 评论(0) 推荐(0)

摘要:Datagridview 列绑定 阅读全文
posted @ 2016-09-04 23:49 noteswiki 阅读(442) 评论(0) 推荐(0)

摘要:Solution1://In Fill DataGridViewEvent : // In Button Event put these codes: datagridview 中的checkbox列是否被选中 反选 阅读全文
posted @ 2016-09-04 22:31 noteswiki 阅读(12490) 评论(0) 推荐(2)

摘要:1.数据库连接(常用连接方法,示例) 1 string dbPath = Environment.CurrentDirectory + "/test.db";/*指定数据库路径 */ 2 using(SQLiteConnection conn = new SQLiteConnection("Data 阅读全文
posted @ 2016-08-09 22:18 noteswiki 阅读(1939) 评论(0) 推荐(0)

摘要:1.SQLLite如何集成在C#中 2.相关C#与SQLLite资源,及说明 3.简单示例 阅读全文
posted @ 2016-08-09 22:15 noteswiki 阅读(432) 评论(0) 推荐(0)