上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 44 下一页
摘要: 效果展示: 0. 在dataGridView 控件中绑定 contextMenuStrip 控件, 设置 ContextMenuStrip1. 设置 dataGridView 选中类型为整行选中: SelectionMode: FullRowSelect不允许 dataGridView 一次能选择多 阅读全文
posted @ 2024-06-13 13:02 龙卷风吹毁停车场 阅读(170) 评论(0) 推荐(0)
摘要: 1.第一步,在子窗体关闭的时候返回一个 DialogResult 注意: 只对 ShowDialog() 方式有效 MessageBox.Show("修改学生信息成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Question); this.Dialo 阅读全文
posted @ 2024-06-13 11:08 龙卷风吹毁停车场 阅读(113) 评论(0) 推荐(0)
摘要: 1. 将dataGridView 的选中方式设置为整行选中将 SelectionMode 属性设置为 FullRowSelect2. 判断当前是否有选中 this.dataGridView1.RowCount == 0 //没有选中 3. 获取当前选中行的id值 string studentId = 阅读全文
posted @ 2024-06-13 09:52 龙卷风吹毁停车场 阅读(205) 评论(0) 推荐(0)
摘要: 1. 在父窗体中,将 IsMdiContainer 的属性设置为true2. 再 new 子窗体的地方,指定子窗体的的父级窗体举例: 父窗体为 FrmMain.cs子窗体为 FrmAddStudent.cs FrmMain.cs文件 //没有创建窗体,则new 创建窗体 FrmAddStudent 阅读全文
posted @ 2024-06-12 21:24 龙卷风吹毁停车场 阅读(112) 评论(0) 推荐(0)
摘要: 没有禁止之前, 控件把我没有在控件上定义的属性全都显示出来了 我们不想要控件将我们没有定义的属性显示出来, //定义sql string sql = "select * from Students sd inner join StudentClass sc on sd.ClassId = sc.Cl 阅读全文
posted @ 2024-06-12 19:53 龙卷风吹毁停车场 阅读(17) 评论(0) 推荐(0)
摘要: 常用属性: 1.CustomFormat: 格式化在控件中的日期显示格式 2.Format : 确定日期和时间是用标准格式显示还是用自定义格式显示 常用方法: 获取选择的时间: Convert.ToDateTime( this.dateTimePicker1.value)获取年: Convert.T 阅读全文
posted @ 2024-06-12 16:53 龙卷风吹毁停车场 阅读(80) 评论(0) 推荐(0)
摘要: private void FrmAddStudent_Load(object sender, EventArgs e) { StudentClassServer studentClassServer = new StudentClassServer(); List<StudentClass> stu 阅读全文
posted @ 2024-06-12 09:36 龙卷风吹毁停车场 阅读(228) 评论(0) 推荐(0)
摘要: /// <summary> /// 获取多个结果集 /// </summary> /// <param name="sql"></param> /// <returns></returns> /// <exception cref="Exception"></exception> public st 阅读全文
posted @ 2024-06-12 09:28 龙卷风吹毁停车场 阅读(30) 评论(0) 推荐(0)
摘要: public static class Verify { /// <summary> /// 验证手机号码 /// </summary> /// <param name="str_handset"></param> /// <returns></returns> public static bool 阅读全文
posted @ 2024-06-11 19:44 龙卷风吹毁停车场 阅读(99) 评论(0) 推荐(0)
摘要: 需要使用到窗体的 FormClosing 事件 private void FrmMain_FormClosing(object sender, FormClosingEventArgs e) { DialogResult dialogResult = MessageBox.Show("是否确认关闭窗 阅读全文
posted @ 2024-06-11 19:15 龙卷风吹毁停车场 阅读(129) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 44 下一页