02 2010 档案

Progressbar
摘要:private void ButLogin_Click(object sender, EventArgs e) { #region If name and pass equal Empty if (this.txtname.Text.Trim().ToString() == string.Empty) { this.toolTip1.Show("用户名不能为空", this.txtname, 1500); return; } ... 阅读全文

posted @ 2010-02-26 15:33 SonyXbox 阅读(206) 评论(0) 推荐(0)

get; set ; 害的我搞了一天
摘要://大家都知道VS2008中(.netFramework3.5)支持如下Propertyprivate int uid;public int Uid{get;set;}// 我不太建议这样写,因为我在写一个三层的Demo的时候就是这样写的,绑定后的数据不显示详细的内容,郁闷了我一天的时间,后来发现,中Model类里的Property写的有问题,报着try的心里Try againprivate int uid;public int Uid //修改为这样{get{return uid;}set{uid = value;}}//真还就成功了,哎,真不知道说get;set;这种方法是好还是不好呀,. 阅读全文

posted @ 2010-02-03 10:54 SonyXbox 阅读(206) 评论(0) 推荐(0)

WinForm编程中 Enter自动登录设置
摘要://Form窗体中的 KeyPreview = ture;AcceptButton = ButLogin; // ButLogin== Enter控件ID名//ok了 阅读全文

posted @ 2010-02-02 14:34 SonyXbox 阅读(182) 评论(0) 推荐(0)

WinForm中给DataGridView添加 自动编号
摘要://实现功能 DataGridView 添加 自动编号 DataTable table = DataTable();DataColumn column = DataColumn();Column.AutoIncrement = true; //AutoIncrement 获取或设置一个值,该值指示对于添加到该表中的新行,列是否将列的值自动递增column.ColumnName = "自动编号";column.AutoIncrementSeed = 1;column.AutoIncrementStep = 1;table.Colnmns.Add(column);table.M 阅读全文

posted @ 2010-02-02 10:29 SonyXbox 阅读(354) 评论(0) 推荐(0)

导航