1、学生成绩管理系统报告书Abstract: Subject Achievement Management Information System is very useful in a school,if there is a Subject Achievement Management Information System which has a lot of functions will always reduce the workload of the teachers,because a school has a lot of students. Each time , after the
2、 examination ,the teachers need to statistics and analyse the results of students achievements,and do a series of additions , deletion and modify operations, after that both teaches and students are very difficult to inquire about the achievement , but if write a program of it by computer ,it will b
3、e different . As long as the teachers or the administrators login on the system ,they can do some addition , deleting and modifying to the achievement of the students. And when the students login on the system ,they can inquire about their achievement easier and they also can inquire about general t
4、est situation of the class . In this design of the course ,l have this rare opportunity to work with my classmates trying to do the subject Achievement Management Information System ,using what we have learned in c# , .NET , SQL knowledge . I do the operations of the addition and deletion.Keyword: U
5、seful reduce the workload statistics analyse add delete Modify inquire c# .NET SQL Contents(目录)1 Topic overview12 Analytical system12.1 Design the modify operation13 Design system.23.1 Describe calculation23.2 Detailed flowchart 34 Write the procedure.44.1the operation of add44.2the operation of del
6、ete115 Circulate and test. .135.1 circulate and test the addition operation 135.2 circulate and test the deletion operation156 Conclusion.167 Compliments.178 Reference.181 Topic overview In the Subject Achievement Management Information System , it needs to extract relevant information from a large
7、number of day-to-day teaching activities ,to reflect the teaching situation. If using the traditional manual way , it may easy to loss the data , has statistical error , labor-intensive and slow. If we use computers , it will be high-speed , quick completion of the work . When we link the Internet ,
8、the data can transmission in Internet , so we can share the resources in Internet , avoid work repeatedly and standard the management, thereby raise the efficiency and level of the management . Subject Achievement Management Information System takes the computer as tool, through managing the informa
9、tion which be needed by education management, tapting out of the manager from the dealing with the trivial details of data in order to make them more energy to engage in implementing the management policies , carrying out the teaching program and supervising and inspecting the quality of teaching ,
10、thereby improving the quality and make it easier to students to query their achievement on line.To build the Subject Achievement Management Information System , use the computer to manage the students achievement , then improve the effectiveness of the school and the level of the modernize . To help
11、 the majority of teachers to improve the quality of working and to achieve student performance of a systematic work flow, standardization and automation .2 Analytical system2.1 Design the modify operation The operations of addition and deletion are according to the the teachers loading interface.Onl
12、y the teachers can add and delete the achievements of the students,the students only query the achievement ,print statement and help and so on. The diagram show the function : 图2.1The teachers are requested to add and delete the achievement of the students. In this mold , we use the ADO.NET to add a
13、nd delete the data in the database . In order to improve the efficiency of the circulate . We use the DAO to manage the operations unify, it is convenience and logical arrangement. 3 Design system3.1 Describe calculationLoad the relevant data of the students into the DataSet .Use the tool of DataGri
14、dView to show the result of the achievements which are used by the addition and deletion operations.private void Form2_Load(object sender , EventArgs e)this.dataGridView1.DataSource = studentDao.queryAll();public DataTable queryAll()SqlCommand com = new SqlCommand (select * from StudentClassMark, co
15、n);SqlDataAdapter sda = new SqlDataAdapter ();sda.SelectCommand = com;DataSet ds = new DataSet ();Sda.Fill(ds);DataTable dt = ds.Tables0;return dt; 3.2 Detailed flowchart 图3.24 Write the procedure4.1 the operation of add In this mold , we first use the function of SqlConnection to link the database.
16、Then we use the DataAdapter to fill the information of the students into the DataSet ,then update the database to show the data after adding the new data ./fill the students achievement,click the ok buttonprivate void btnOK_Click(object sender, EventArgs e) if (this.txtID.Enabled != false) StudentCl
17、assMark scm = new StudentClassMark(); scm.StuID = Convert.ToInt32(this.txtID.Text.ToString().Trim(); scm.Chinese= Convert.ToInt32(this.txtChinese.Text.ToString().Trim(); scm.Math = Convert.ToInt32(this.txtMath.Text.ToString().Trim(); scm.English= Convert.ToInt32(this.txtEnglish.Text.ToString().Trim(
18、); scm.Chemistry= Convert.ToInt32(this.txtChemistry.Text.ToString().Trim(); scm.Physics= Convert.ToInt32(this.txtphysics.Text.ToString().Trim(); this.IsPass=studentDAO.IsExistStudent(scm.StuID)& !studentDAO.IsNotExistStudentClassMark(scm.StuID); if (this.IsPass ) studentDAO.insert(scm); else Message
19、Box.Show(没有此学生或此学生成绩记录已存在, 消息, MessageBoxButtons.OK, MessageBoxIcon.Information); else StudentClassMark scm2 = new StudentClassMark(); scm2.StuID = scm.StuID; scm2.Chinese= Convert.ToInt32(this.txtChinese.Text.ToString().Trim(); scm2.Math= Convert.ToInt32(this.txtMath.Text.ToString().Trim(); scm2.En
20、glish= Convert.ToInt32(this.txtEnglish.Text.ToString().Trim(); scm2.Chemistry= Convert.ToInt32(this.txtChemistry.Text.ToString().Trim(); scm2.Physics= Convert.ToInt32(this.txtphysics.Text.ToString().Trim(); studentDAO.update(scm2); public partial class StudentForm : Form private StudentClassMark scm
21、 = null; private bool IsPass=false; public bool getIsPass() return this. IsPass; IStudentDAO studentDAO = StudentInfo.get(); public StudentForm(StudentClassMark scm) : this() this.scm = scm; this.txtID.Text = studentDAO.queryName(scm.StuID); this.txtChinese.Text = scm.Chinese.ToString(); this.txtMat
22、h.Text = scm.Math.ToString(); this.txtEnglish.Text = scm.English.ToString(); this.txtChemistry.Text = scm.Chemistry.ToString(); this.txtphysics.Text = scm.Physics.ToString(); public StudentForm() InitializeComponent(); private void button2_Click(object sender, EventArgs e) this.Close(); private void
23、 btnOK_Click(object sender, EventArgs e) if (this.txtID.Enabled != false) StudentClassMark scm = new StudentClassMark(); scm.StuID = Convert.ToInt32(this.txtID.Text.ToString().Trim(); scm.Chinese = Convert.ToInt32(this.txtChinese.Text.ToString().Trim(); scm.Math = Convert.ToInt32(this.txtMath.Text.T
24、oString().Trim(); scm.English = Convert.ToInt32(this.txtEnglish.Text.ToString().Trim(); scm.Chemistry= Convert.ToInt32(this.txtChemistry.Text.ToString().Trim(); scm.Physics = Convert.ToInt32(this.txtphysics.Text.ToString().Trim(); this.IsPass=studentDAO.IsExistStudent(scm.StuID)& !studentDAO.IsNotEx
25、istStudentClassMark(scm.StuID); if (this.IsPass ) studentDAO.insert(scm); else MessageBox.Show(没有此学生或此学生成绩记录已存在, 消息, MessageBoxButtons.OK, MessageBoxIcon.Information); else StudentClassMark scm2 = new StudentClassMark(); scm2.StuID = scm.StuID; scm2.Chinese= Convert.ToInt32(this.txtChinese.Text.ToSt
26、ring().Trim(); scm2.Math = Convert.ToInt32(this.txtMath.Text.ToString().Trim(); scm2.English = Convert.ToInt32(this.txtEnglish.Text.ToString().Trim(); scm2.Chemistry= Convert.ToInt32(this.txtChemistry.Text.ToString().Trim(); scm2.Physics = Convert.ToInt32(this.txtphysics.Text.ToString().Trim(); stud
27、entDAO.update(scm2); /judge the student is or not existpublic bool IsExistStudent(int StuID) SqlCommand com=new SqlCommand (select * from Student where StuID=StuID); com.Connection =con; if (con.State = ConnectionState.Closed) con.Open(); SqlParameter p1 = new SqlParameter(StuID, SqlDbType.Int); p1.
28、Value = StuID; com.Parameters.Add(p1); SqlDataReader reader = com.ExecuteReader(); bool b = reader.Read(); reader.Close(); con.Close(); return b;/judge the achievement of student is or not existpublic bool IsNotExistStudentClassMark(int StuID) SqlCommand com = new SqlCommand(select * from StudentCla
29、ssMark where StuID=StuID); com.Connection = con; if (con.State = ConnectionState.Closed) con.Open(); SqlParameter p1 = new SqlParameter(StuID, SqlDbType.Int); p1.Value = StuID; com.Parameters.Add(p1); SqlDataReader reader = com.ExecuteReader(); bool b = reader.Read(); reader.Close(); con.Close(); return b;/click the ok buttonprivate void btnInsert_Click(object sender, EventArgs e) StudentForm form = new StudentForm(); form.label1.Text = 学生学号; if (form.ShowDialog() = DialogResult.OK) bool b = form.getIsPass(); if (b) MessageBox.Show(添加成功
copyright@ 2008-2023 冰点文库 网站版权所有
经营许可证编号:鄂ICP备19020893号-2