上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 44 下一页
摘要: 1. 给Timer控件的name取一个名字2. 将 Enabled 设置为true3.双击Tick事件 /// <summary> /// 每个一秒获取一次时间 /// </summary> /// <param name="sender"></param> /// <param name="e"> 阅读全文
posted @ 2024-06-13 23:05 龙卷风吹毁停车场 阅读(78) 评论(0) 推荐(0)
摘要: 1. 查询平均值语法 select avg(要计算的值) as 别名 from 表名 select 别名=avg(要计算的值) from 表名 2.获取数据总条数 select count(*) as 别名 from 表名 select 别名=count(*) from 表名 以下是举例: publ 阅读全文
posted @ 2024-06-13 17:56 龙卷风吹毁停车场 阅读(512) 评论(0) 推荐(0)
摘要: 转化之前: 转换之后 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 龙卷风吹毁停车场 阅读(460) 评论(0) 推荐(0)
摘要: 效果展示: 0. 在dataGridView 控件中绑定 contextMenuStrip 控件, 设置 ContextMenuStrip1. 设置 dataGridView 选中类型为整行选中: SelectionMode: FullRowSelect不允许 dataGridView 一次能选择多 阅读全文
posted @ 2024-06-13 13:02 龙卷风吹毁停车场 阅读(187) 评论(0) 推荐(0)
摘要: 1.第一步,在子窗体关闭的时候返回一个 DialogResult 注意: 只对 ShowDialog() 方式有效 MessageBox.Show("修改学生信息成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Question); this.Dialo 阅读全文
posted @ 2024-06-13 11:08 龙卷风吹毁停车场 阅读(121) 评论(0) 推荐(0)
摘要: 1. 将dataGridView 的选中方式设置为整行选中将 SelectionMode 属性设置为 FullRowSelect2. 判断当前是否有选中 this.dataGridView1.RowCount == 0 //没有选中 3. 获取当前选中行的id值 string studentId = 阅读全文
posted @ 2024-06-13 09:52 龙卷风吹毁停车场 阅读(218) 评论(0) 推荐(0)
摘要: 1. 在父窗体中,将 IsMdiContainer 的属性设置为true2. 再 new 子窗体的地方,指定子窗体的的父级窗体举例: 父窗体为 FrmMain.cs子窗体为 FrmAddStudent.cs FrmMain.cs文件 //没有创建窗体,则new 创建窗体 FrmAddStudent 阅读全文
posted @ 2024-06-12 21:24 龙卷风吹毁停车场 阅读(125) 评论(0) 推荐(0)
摘要: 没有禁止之前, 控件把我没有在控件上定义的属性全都显示出来了 我们不想要控件将我们没有定义的属性显示出来, //定义sql string sql = "select * from Students sd inner join StudentClass sc on sd.ClassId = sc.Cl 阅读全文
posted @ 2024-06-12 19:53 龙卷风吹毁停车场 阅读(23) 评论(0) 推荐(0)
摘要: 常用属性: 1.CustomFormat: 格式化在控件中的日期显示格式 2.Format : 确定日期和时间是用标准格式显示还是用自定义格式显示 常用方法: 获取选择的时间: Convert.ToDateTime( this.dateTimePicker1.value)获取年: Convert.T 阅读全文
posted @ 2024-06-12 16:53 龙卷风吹毁停车场 阅读(92) 评论(0) 推荐(0)
摘要: private void FrmAddStudent_Load(object sender, EventArgs e) { StudentClassServer studentClassServer = new StudentClassServer(); List<StudentClass> stu 阅读全文
posted @ 2024-06-12 09:36 龙卷风吹毁停车场 阅读(251) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 44 下一页