会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
精通 IOS,Android,Java,Php,Net,前端,等各种尖端科技, 熟知军事战略,大国博弈,生命演化,宇宙尽头,别问为什么,AI会等于我会,AI不会我也不会。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
8
9
10
11
12
13
14
15
16
···
44
下一页
2024年6月14日
DataSet 数据集的使用
摘要: 语法: public static DataTable ExecuteTable(string sql) { using (SqlConnection conn = new SqlConnection(connStr)) { conn.Open(); SqlCommand cmd = new Sql
阅读全文
posted @ 2024-06-14 09:34 龙卷风吹毁停车场
阅读(43)
评论(0)
推荐(0)
2024年6月13日
c# 获取年,月,日,时,分,秒,星期几
摘要: this.nian.Text = DateTime.Now.Year.ToString(); //获取年 this.yue.Text = DateTime.Now.Month.ToString(); //获取月 this.ri.Text = DateTime.Now.Day.ToString();
阅读全文
posted @ 2024-06-13 23:13 龙卷风吹毁停车场
阅读(88)
评论(0)
推荐(0)
Timer控件的使用
摘要: 1. 给Timer控件的name取一个名字2. 将 Enabled 设置为true3.双击Tick事件 /// <summary> /// 每个一秒获取一次时间 /// </summary> /// <param name="sender"></param> /// <param name="e">
阅读全文
posted @ 2024-06-13 23:05 龙卷风吹毁停车场
阅读(85)
评论(0)
推荐(0)
使用sql语句获取平均值,使用sql语句获取数据总条数, not in 筛选语句的使用
摘要: 1. 查询平均值语法 select avg(要计算的值) as 别名 from 表名 select 别名=avg(要计算的值) from 表名 2.获取数据总条数 select count(*) as 别名 from 表名 select 别名=count(*) from 表名 以下是举例: publ
阅读全文
posted @ 2024-06-13 17:56 龙卷风吹毁停车场
阅读(523)
评论(0)
推荐(0)
将 Visual Studio .net 代码注释 英文转为中文
摘要: 转化之前: 转换之后 1. 官方文档有详细讲解 https://learn.microsoft.com/zh-cn/dotnet/core/install/localized-intellisense 2. 汉化包下载: https://dotnet.microsoft.com/zh-cn/down
阅读全文
posted @ 2024-06-13 14:12 龙卷风吹毁停车场
阅读(525)
评论(0)
推荐(0)
dataGridView控件和contextMenuStrip控件的结合使用
摘要: 效果展示: 0. 在dataGridView 控件中绑定 contextMenuStrip 控件, 设置 ContextMenuStrip1. 设置 dataGridView 选中类型为整行选中: SelectionMode: FullRowSelect不允许 dataGridView 一次能选择多
阅读全文
posted @ 2024-06-13 13:02 龙卷风吹毁停车场
阅读(206)
评论(0)
推荐(0)
winform中关闭子窗体后,在父窗体中调用方法(一般修改详情数据后,父窗体显示修改后的数据)
摘要: 1.第一步,在子窗体关闭的时候返回一个 DialogResult 注意: 只对 ShowDialog() 方式有效 MessageBox.Show("修改学生信息成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Question); this.Dialo
阅读全文
posted @ 2024-06-13 11:08 龙卷风吹毁停车场
阅读(132)
评论(0)
推荐(0)
获取 dataGridView 控件某一行的值
摘要: 1. 将dataGridView 的选中方式设置为整行选中将 SelectionMode 属性设置为 FullRowSelect2. 判断当前是否有选中 this.dataGridView1.RowCount == 0 //没有选中 3. 获取当前选中行的id值 string studentId =
阅读全文
posted @ 2024-06-13 09:52 龙卷风吹毁停车场
阅读(223)
评论(0)
推荐(0)
2024年6月12日
winform 设置子窗体的父窗体
摘要: 1. 在父窗体中,将 IsMdiContainer 的属性设置为true2. 再 new 子窗体的地方,指定子窗体的的父级窗体举例: 父窗体为 FrmMain.cs子窗体为 FrmAddStudent.cs FrmMain.cs文件 //没有创建窗体,则new 创建窗体 FrmAddStudent
阅读全文
posted @ 2024-06-12 21:24 龙卷风吹毁停车场
阅读(134)
评论(0)
推荐(0)
禁止 dataGridView 控件创建没有定义的列
摘要: 没有禁止之前, 控件把我没有在控件上定义的属性全都显示出来了 我们不想要控件将我们没有定义的属性显示出来, //定义sql string sql = "select * from Students sd inner join StudentClass sc on sd.ClassId = sc.Cl
阅读全文
posted @ 2024-06-12 19:53 龙卷风吹毁停车场
阅读(30)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
13
14
15
16
···
44
下一页
公告