基于c的新昌中学学生档案管理系统设计与实现47页内容摘要:

ataAdapter(sqlstring, connstring)。 DataSet ds = new DataSet()。 (ds, StudentInfo)。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 cm = (CurrencyManager)[ds, StudentInfo]。 = 0。 } private void button1_Click(object sender, EventArgs e) { if ( == 0) { (已经是第一条记录了, 信息提示, , )。 return。 } else = 0。 } private void button2_Click(object sender, EventArgs e) {。 } private void button3_Click(object sender, EventArgs e) { if ( == 1) { (已经是最后一条记录, 信息提示, , )。 return。 } else ++。 } private void button4_Click(object sender, EventArgs e) { = 1。 } private void button6_Click(object sender, EventArgs e) { ()。 } }} 档案添加子模块图44 注册学生档案代码如下:namespace 学生学籍管理系统{ public partial class AddStuInfo : Form { public AddStuInfo() { InitializeComponent()。 } private void AddStuInfo_Load(object sender, EventArgs e) { ()。 ()。 OleDbDataAdapter adp = new OleDbDataAdapter(select SpeName from SpecialyInfo, )。 DataSet ds = new DataSet()。 (ds, specialty)。 = SpeName。 = SpeName。 = [specialty].DefaultView。 } private void button2_Click(object sender, EventArgs e) { ()。 ()。 } private void button1_Click(object sender, EventArgs e) { if (() == || () == || () == || () == || () == || () == || () == || () == ) { (你填写的信息不完整,请继续填写完整。 , 错误提示)。 } else { OleDbCommand cmd = new OleDbCommand(, )。 string sql。 sql = select * from StudentInfo where Num=39。 + () + 39。 = sql。 if (() != null) { (你输入的学号已经存在,请重新输入。 , 错误提示)。 } else { sql = insert into StudentInfo values(39。 + () + 39。 ,39。 + () + 39。 ,39。 + () + 39。 ,39。 + () + 39。 ,39。 + () + 39。 ,39。 + () + 39。 ,39。 + () + 39。 ,39。 + () + 39。 )。 = sql。 ()。 (学生学籍信息注册成功。 , 成功信息)。 } } } 档案处理子模块该模块主要完成学生基本信息的删除 、更新等功能。 图45 学生档案处理代码如下:namespace 学生学籍管理系统{ public partial class UpdateStuInfo : Form { public UpdateStuInfo() { InitializeComponent()。 } private void studentInfoBindingNavigatorSaveItem_Click(object sender, EventArgs e) { ()。 ()。 ()。 } private void UpdateStuInfo_Load(object sender, EventArgs e) { // TODO: 这行代码将数据加载到表“”中。 您可以根据需要移动或移除它。 ()。 } private void button2_Click(object sender, EventArgs e) { ()。 ()。 string connstring = Provider=。 Data Source=。 OleDbConnection sqlconn = new OleDbConnection(connstring)。 ()。 string sqlstring = delete from StudentInfo where CourseName=39。 + () + 39。 OleDbCommand sqlm = new OleDbCommand(sqlstring, sqlconn)。 ()。 (删除成功。 , 提示, , )。 ()。 ()。 } private void button1_Click(object sender, EventArgs e) { //if (()) //{ DialogResult r = (真的修改吗。 , 提示, , )。 if (r == ) { ()。 .EndEdit()。 .Update()。 } //} } private void button3_Click(object sender, EventArgs e) { ()。 } } } 学生成绩子模块图46 成绩表查询代码如下 :using System。 using。 using。 using。 using。 using。 using。 using。 namespace 学生学籍管理系统{ public partial class ApdateStuInfo: Form { CurrencyManager cm。 public ApdateStuInfo() { InitializeComponent()。 } private void DealStuInfo_Load(object sender, EventArgs e){ string connstring = Provider=。 Data Source=。 string sqlstring = select * from StudentInfo。 OleDbConnection oldconn = new OleDbConnection(connstring)。 ()。 OleDbDataAdapter oda = new OleDbDataAdapter(sqlstring, connstring)。 DataSet ds = new DataSet()。 (ds, StudentInfo)。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 (Text, ds, )。 cm = (CurrencyManager)[ds, StudentInfo]。 = 0。 } private void button1_Click(object sender, EventArgs e) { if ( == 0) { (已经是第一条记录了, 信息提示, , )。 return。 } else = 0。 } private void button2_Click(object sender, EventArgs e) {。 } private void button3_Click(object sender, EventArgs e) { if ( == 1) { (已经是最后一。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。