摘要: 一个取名字的方法,user_col_comments 保存本系统所有列的注释,大家新入手一个系统时,最好遵照该系统定义列明的规则,我们定义列明时,先去系统里查一下,有没有类似的列明 select COLUMN_NAME ,comments,count(*) from user_col_comment 阅读全文
posted @ 2019-03-11 20:52 hanje 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 有时候使用DataGridView难免会在最后插入一条数据,如果插入的数据超过滚动条显示的行数,那么默认情况下不会显示到最后一行。增加以下代码一直将滚动条拉倒最低。this.dataGridView1.FirstDisplayedScrollingRowIndex = this.dataGridVi 阅读全文
posted @ 2019-02-12 13:50 hanje 阅读(1465) 评论(0) 推荐(0) 编辑
摘要: DataGridView默认情况下会显示所绑定对象的属性,如绑定一个List<User>,User的Name、Age、Gender等属性会作为Column的内容显示出来. 当数据源是一个字符串集合时,string的属性只有Length,因此显示的也就只有长度。 解决方案: 1.添加一个类,将stri 阅读全文
posted @ 2019-01-06 23:00 hanje 阅读(3160) 评论(0) 推荐(0) 编辑
摘要: C# DataGridView控件绑定数据后清空数据 在清除DataGridview的数据时: 1.DataSource为NULL(DataGridView.DataSource= null;)这样会将DataGridView的列也删掉。 2.使用Datatable.Clear()方法请空控件数据( 阅读全文
posted @ 2018-12-29 10:25 hanje 阅读(13863) 评论(0) 推荐(0) 编辑
摘要: 其中大小写含义不同,不能混用 年:yyyy 月:MM 日:dd(1-31) DD(0-365) 时:hh:12小时制 HH:24小时制 分:mm 秒:ss 另Oracle中的年月日时分秒的表示也略有不同 阅读全文
posted @ 2018-12-28 13:21 hanje 阅读(2192) 评论(0) 推荐(0) 编辑
摘要: 使用BindingSource进行间接绑定 Dictionary<string ,string> dic=new Dictionary<string,string>(); BindingSource bs = new BindingSource(); //声明BindingSource dic.Ad 阅读全文
posted @ 2018-12-27 14:18 hanje 阅读(469) 评论(0) 推荐(0) 编辑
摘要: select nvl(max(test_item_id),0) from t_test_item_connection 阅读全文
posted @ 2018-12-26 20:13 hanje 阅读(8871) 评论(0) 推荐(0) 编辑
摘要: SELECT CASE WHEN 性别列的列名=0 THEN '男' WHEN 性别列的列名=1 THEN '女' END as sex, age_colname as ageFROM 你要查找的表名WHERE 条件子句 阅读全文
posted @ 2018-12-26 20:12 hanje 阅读(1008) 评论(0) 推荐(0) 编辑
摘要: void PrintCtrlName(Control parent) { foreach(Contrl ctrl in parent.Controls) { Print(ctrl.Name); if(ctrl.Controls.Count >0) { PrintCtrlName(ctrl); } } 阅读全文
posted @ 2018-12-24 22:04 hanje 阅读(1204) 评论(0) 推荐(1) 编辑
摘要: [转]https://www.cnblogs.com/liushenglin/p/5350641.html 一、C#中弹出窗口位置 加入命名空间using System.Drawing和using System.Windows.Forms假定窗口名为form1,则 form1.StartPositi 阅读全文
posted @ 2018-12-24 20:55 hanje 阅读(2568) 评论(0) 推荐(0) 编辑