上一页 1 ··· 3 4 5 6 7
摘要: 所在命名空间:using System.Windows.Forms;语法: MESSAGEBOX(提示信息[,对话框的标题,对话框上的按钮,对话框上的图标,对话框上的默认按钮])参数描述: 提示信息:对话框中所用到的提示文字。对话框标题:就是对话框上的标题 对话框上的按钮:MessageBoxButtons.OKCancel等,通过输入MessageBoxButtons就会有相应的提示,也就不写... 阅读全文
posted @ 2008-07-06 10:23 朝阳 阅读(1322) 评论(0) 推荐(0)
摘要: 使用正则表达式可以用来规范输入 所在命名空间 System.Text.RegularExpressions; 定义 Regex rx = new Regex(@"^-?\d+(\.\d{2})?$"); 在c#中,定义正则表达式时需要在表达式前加@然后就是所需要的模式字符串 其语法如下: 字符 描述 ... 阅读全文
posted @ 2008-07-06 09:20 朝阳 阅读(385) 评论(0) 推荐(0)
摘要: 最常见的数据绑定: string sqlStr=数据库查询语句; DataManager db = new DataManager(); DataSet ds = db.ExcuteSelectCmd(sqlStr); DataGridView.DataSource = ds.Tables[0]; 对DataG... 阅读全文
posted @ 2008-07-01 16:48 朝阳 阅读(2707) 评论(2) 推荐(0)
摘要: combobox的数据源绑定 string conn = "Server=SHA-RICKIE-01;Database=northwind;uid=user;pwd=user"; SqlConnection mySqlConnection = new SqlConnection(conn); string mySql="Select * from Customers"; SqlDataAdap... 阅读全文
posted @ 2008-06-29 09:42 朝阳 阅读(1622) 评论(2) 推荐(0)
上一页 1 ··· 3 4 5 6 7