程序设计实习报告-学生信息管理系统.doc

上传人:哈尼dd 文档编号:5026423 上传时间:2020-01-29 格式:DOC 页数:17 大小:87KB
返回 下载 相关 举报
程序设计实习报告-学生信息管理系统.doc_第1页
第1页 / 共17页
程序设计实习报告-学生信息管理系统.doc_第2页
第2页 / 共17页
程序设计实习报告-学生信息管理系统.doc_第3页
第3页 / 共17页
程序设计实习报告-学生信息管理系统.doc_第4页
第4页 / 共17页
程序设计实习报告-学生信息管理系统.doc_第5页
第5页 / 共17页
点击查看更多>>
资源描述

《程序设计实习报告-学生信息管理系统.doc》由会员分享,可在线阅读,更多相关《程序设计实习报告-学生信息管理系统.doc(17页珍藏版)》请在三一文库上搜索。

1、程序设计实习报告选题名称: 学生信息管理系统 程序设计实习报告 一、需求分析主要阐述程序设计的任务,强调的是程序要做什么?即程序所达到的功能主要有哪些?本系统主要任务是在较短时间内搭建学生管理系统,完成学生信息、课程信息、成绩信息的录入和查询。二、概要设计说明本程序中用到的所有抽象数据类型的定义、主程序的流程以及各程序模块之间的层次(调用)关系。抽象数据类型:Form1、Form2、Form3、Form4、Form5、Form6、Form7、Form8主程序的流程:在主程序中选择相应的信息,弹出相应的窗口,进行相关信息的操作层次关系:在主程序Form1中调用Form2、Form3、Form4、

2、Form5、Form6、Form7、Form8三、详细设计实现概要设计中定义的所有数据类型,对每个操作只需写出伪代码算法,对主程序和其他模块函数也都需要写出伪代码算法,画出函数和过程的调用关系图。Form1 classPublic Form1();Private关于ToolStripMenuItem_Click()Private 推出系统ToolStripMenuItem_Click()Private录入学生信息ToolStripMenuItem_Click()Private录入课程信息ToolStripMenuItem_Click()Private录入成绩信息ToolStripMenuIte

3、m_Click()Private浏览学生信息ToolStripMenuItem_Click()Private浏览课程信息ToolStripMenuItem_Click()Private浏览成绩信息ToolStripMenuItem_Click()Form2 class() public Form2()Form3 class() public Form3() addStudentInfo();showStudentInfo();Form4 class() public Form4() addCourseInfo();showCourseInfo();Form5 class() public Fo

4、rm5() addScoreInfo();showScoreInfo();Form6 class() public Form6() StudentInfoShow();Form7 class() public Form7() CourseInfoShow();Form8 class() public Form8() ScoreInfoShow();调用关系图:Form1()Form2()Form3()Form4()Form5()Form6()Form7()Form8()四、设计与调试分析调试过程中遇到的问题是如何解决的以及对设计与实现的回顾讨论和分析。在调试过程中,主要出现的问题是数据库的连接

5、。一开始不知道如何把数据库中的数据连接到每个相对应的文本框内,在代码上不知道如何实现。后来是建立数据组DataRow加以解决。但在过程中又出现个小问题,当初建立数据库的时候,把姓名、学号这些信息设置成中文的,导致一直连不上数据库。后来将原来的数据库删除,重新建立一个英文版的数据库,就连接上了。五、 用户手册说明如何使用你编写的程序,详细列出每一步的操作步骤。首先,登陆系统。(该功能尚未实现)进入系统后,若要进行学生信息的查询,则点击菜单栏中的学生信息管理,选择浏览学生信息;若要进行学生信息的录入,则点击录入学生信息。若要进行课程信息的查询,则点击菜单栏中的课程信息管理,选择浏览课程信息;若要进

6、行课程信息的录入,则点击录入课程信息。若要进行成绩信息的查询,则点击菜单栏中的成绩信息管理,选择浏览成绩信息;若要进行成绩信息的录入,则点击录入成绩信息。操作完毕,退出系统。六、测试成果列出你的测试结果,包括输入和输出,测试的数据应该完整和严格。输入:何以琛 男 915070201 2009 1990-1-1 法律系输出:七、 附录(源程序清单)给出带注释的源程序。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;usi

7、ng System.Text;using System.Windows.Forms;namespace Student_Information_Management_System public partial class Form1 : Form public Form1() InitializeComponent(); private void 关于ToolStripMenuItem_Click(object sender, EventArgs e) Form2 frm = new Form2(); frm.ShowDialog(); private void 退出系统ToolStripMe

8、nuItem_Click(object sender, EventArgs e) this.Close(); private void 录入学生信息ToolStripMenuItem_Click(object sender, EventArgs e) Form3 frm = new Form3(); frm.ShowDialog(); private void 录入课程信息ToolStripMenuItem_Click(object sender, EventArgs e) Form4 frm = new Form4(); frm.ShowDialog(); private void 录入成绩

9、信息ToolStripMenuItem_Click(object sender, EventArgs e) Form5 frm = new Form5(); frm.ShowDialog(); private void 浏览学生信息ToolStripMenuItem_Click(object sender, EventArgs e) Form6 frm = new Form6(); frm.ShowDialog(); private void 浏览课程信息ToolStripMenuItem1_Click(object sender, EventArgs e) Form7 frm = new F

10、orm7(); frm.ShowDialog(); private void 浏览成绩信息ToolStripMenuItem_Click(object sender, EventArgs e) Form8 frm = new Form8(); frm.ShowDialog(); using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;na

11、mespace Student_Information_Management_System public partial class Form2 : Form public Form2() InitializeComponent(); using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.OleDb;

12、namespace Student_Information_Management_System public partial class Form3 : Form public Form3() InitializeComponent(); private void button1_Click(object sender, EventArgs e) OleDbConnection myconn = new OleDbConnection(); myconn.ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0;Data Source = .Stu

13、dentDb.mdb; myconn.Open(); string query = SELECT * from Student_info; DataSet objDataSet = new DataSet(); OleDbDataAdapter objOleAdapter = new OleDbDataAdapter(); objOleAdapter.SelectCommand = new OleDbCommand(query, myconn); objOleAdapter.Fill(objDataSet, Student_info); try objOleAdapter.InsertComm

14、and = myconn.CreateCommand(); objOleAdapter.InsertCommand.CommandText = INSERT INTO Student_info values( + this.textBox2.Text + , + this.textBox1.Text + , + this.textBox4.Text + , + this.textBox5.Text + , + this.textBox3.Text + , + this.textBox6.Text + ); DataTable mytable = new DataTable(); objData

15、Set.Tables.Add(mytable); DataRow row = objDataSet.Tables0.NewRow(); rowname = this.textBox1.Text; rowno = this.textBox2.Text; rowbirth = this.textBox3.Text; rowsex = this.textBox4.Text; rowgrade = this.textBox5.Text; rowmajor = this.textBox6.Text; objDataSet.Tables0.Rows.Add(row); objOleAdapter.Upda

16、te(objDataSet, Student_info); catch myconn.Close(); private void button2_Click(object sender, EventArgs e) OleDbConnection myconn = new OleDbConnection(); myconn.ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0;Data Source = .StudentDb.mdb; myconn.Open(); string query = SELECT * from Student_info

17、; DataSet objDataSet = new DataSet(); OleDbDataAdapter objOleAdapter = new OleDbDataAdapter(); objOleAdapter.SelectCommand = new OleDbCommand(query, myconn); objOleAdapter.Fill(objDataSet, Student_info); dataGridView1.DataSource = objDataSet.TablesStudent_info; myconn.Close(); using System;using Sys

18、tem.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.OleDb;namespace Student_Information_Management_System public partial class Form4 : Form public Form4() InitializeComponent(); private void button1

19、_Click(object sender, EventArgs e) OleDbConnection myconn = new OleDbConnection(); myconn.ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0;Data Source = .StudentDb.mdb; myconn.Open(); string query = SELECT * from Student_course; DataSet objDataSet = new DataSet(); OleDbDataAdapter objOleAdapter =

20、 new OleDbDataAdapter(); objOleAdapter.SelectCommand = new OleDbCommand(query, myconn); objOleAdapter.Fill(objDataSet, Student_course); try objOleAdapter.InsertCommand = myconn.CreateCommand(); objOleAdapter.InsertCommand.CommandText = INSERT INTO Student_course values( + this.textBox2.Text + , + th

21、is.textBox1.Text + , + this.textBox4.Text + , + this.textBox5.Text + , + this.textBox3.Text + , + this.textBox6.Text + ); DataTable mytable = new DataTable(); objDataSet.Tables.Add(mytable); DataRow row = objDataSet.Tables0.NewRow(); rowname = this.textBox1.Text; rowno = this.textBox2.Text; rowmajor

22、02 = this.textBox3.Text; rowterm = this.textBox4.Text; rowmajor01 = this.textBox5.Text; rowpublic01 = this.textBox6.Text; objDataSet.Tables0.Rows.Add(row); objOleAdapter.Update(objDataSet, Student_course); catch myconn.Close(); private void button2_Click(object sender, EventArgs e) OleDbConnection m

23、yconn = new OleDbConnection(); myconn.ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0;Data Source = .StudentDb.mdb; myconn.Open(); string query = SELECT * from Student_course; DataSet objDataSet = new DataSet(); OleDbDataAdapter objOleAdapter = new OleDbDataAdapter(); objOleAdapter.SelectCommand

24、 = new OleDbCommand(query, myconn); objOleAdapter.Fill(objDataSet, Student_course); dataGridView1.DataSource = objDataSet.TablesStudent_course; myconn.Close(); using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using Sys

25、tem.Windows.Forms;using System.Data.OleDb;namespace Student_Information_Management_System public partial class Form5 : Form public Form5() InitializeComponent(); private void Form5_Load(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e) OleDbConnection myconn = new Ol

26、eDbConnection(); myconn.ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0;Data Source = .StudentDb.mdb; myconn.Open(); string query = SELECT * from Student_score; DataSet objDataSet = new DataSet(); OleDbDataAdapter objOleAdapter = new OleDbDataAdapter(); objOleAdapter.SelectCommand = new OleDbCom

27、mand(query, myconn); objOleAdapter.Fill(objDataSet, Student_score); try objOleAdapter.InsertCommand = myconn.CreateCommand(); objOleAdapter.InsertCommand.CommandText = INSERT INTO Student_score values( + this.textBox2.Text + , + this.textBox1.Text + , + this.textBox4.Text + , + this.textBox5.Text +

28、, + this.textBox3.Text + , + this.textBox6.Text + ); DataTable mytable = new DataTable(); objDataSet.Tables.Add(mytable); DataRow row = objDataSet.Tables0.NewRow(); rowname = this.textBox1.Text; rowno = this.textBox2.Text; rowm2Score = this.textBox3.Text; rowterm = this.textBox4.Text; rowm1Score = t

29、his.textBox5.Text; rowP1Score = this.textBox6.Text; objDataSet.Tables0.Rows.Add(row); objOleAdapter.Update(objDataSet, Student_score); catch myconn.Close(); private void button2_Click(object sender, EventArgs e) OleDbConnection myconn = new OleDbConnection(); myconn.ConnectionString = Provider=Micro

30、soft.Jet.OLEDB.4.0;Data Source = .StudentDb.mdb; myconn.Open(); string query = SELECT * from Student_score; DataSet objDataSet = new DataSet(); OleDbDataAdapter objOleAdapter = new OleDbDataAdapter(); objOleAdapter.SelectCommand = new OleDbCommand(query, myconn); objOleAdapter.Fill(objDataSet, Stude

31、nt_score); dataGridView1.DataSource = objDataSet.TablesStudent_score; myconn.Close(); using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Student_Information_Management_System public p

32、artial class Form6 : Form public Form6() InitializeComponent(); private void Form6_Load(object sender, EventArgs e) this.studentDbDataSet1.Clear(); this.oleDbDataAdapter1.Fill(studentDbDataSet1, Student_info); private void button1_Click(object sender, EventArgs e) this.BindingContextstudentDbDataSet

33、1, Student_info.Position = 0; private void button2_Click(object sender, EventArgs e) this.BindingContextstudentDbDataSet1, Student_info.Position -= 1; private void button3_Click(object sender, EventArgs e) this.BindingContextstudentDbDataSet1, Student_info.Position += 1; private void button4_Click(o

34、bject sender, EventArgs e) this.BindingContextstudentDbDataSet1, Student_info.Position = this.BindingContextstudentDbDataSet1, Student_info.Count - 1; using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windo

35、ws.Forms;namespace Student_Information_Management_System public partial class Form7 : Form public Form7() InitializeComponent(); private void Form7_Load(object sender, EventArgs e) this.studentDbDataSet1.Clear(); this.oleDbDataAdapter1.Fill(studentDbDataSet1, Student_course); private void button1_Cl

36、ick(object sender, EventArgs e) this.BindingContextstudentDbDataSet1, Student_course.Position = 0; private void button2_Click(object sender, EventArgs e) this.BindingContextstudentDbDataSet1, Student_course.Position -= 1; private void button3_Click(object sender, EventArgs e) this.BindingContextstudentDbDataSet1, Student_course.Position += 1; private void button4_Click(object sender, EventArgs e) this

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 研究报告 > 商业贸易


经营许可证编号:宁ICP备18001539号-1