摘要:
重点是红色标记区域的代码,设置本次执行的是存储过程,如果不设置,默认操作的是sql语句 private void LoadData() { string constr = @"database=ItcastCater;server=LAPTOP-2FGC7ARC\Wangjin;user=sa;pw 阅读全文
摘要:
步骤1. 2.添加Column1,并且为其命名 填入对应的数据: 并且在界面加载的界面加入以下代码,目的是显示自动增加列: //是否自动添加列 this.dataGridView1.AutoGenerateColumns = false; 阅读全文
摘要:
实现步骤: 1. 新建两张对应表的类 例如: 第一张表对应的类 { class ManagerInfo { public Table1 group { get; set; } //重点 需要内连接的字段,随便起名便可 public int Mid { get; set; } public strin 阅读全文
摘要:
C#创建记事本方法一://创建对象 FileStream stream = new FileStream(@"d:\aa.txt",FileMode.Create);//fileMode指定是读取还是写入 StreamWriter writer = new StreamWriter(stream); 阅读全文