VC++.net课程设计学生成绩管理系统设计说明书

上传人:仙*** 文档编号:28716349 上传时间:2021-09-08 格式:DOC 页数:43 大小:930.50KB
返回 下载 相关 举报
VC++.net课程设计学生成绩管理系统设计说明书_第1页
第1页 / 共43页
VC++.net课程设计学生成绩管理系统设计说明书_第2页
第2页 / 共43页
VC++.net课程设计学生成绩管理系统设计说明书_第3页
第3页 / 共43页
点击查看更多>>
资源描述
广西工学院 VC+.net课程设计学生管理系统设计说明书学校: 广西工学院 系别: 计算机 工程系 班别: 计y052班 姓名: 学号: 目录一、课程设计项目3二、 学生管理系统需求分析31. 学生管理系统功能需求31.1信息操作功能31.2查询功能31.3统计功能31.4分析功能32. 学生管理系统性能需求42.1时间相应42.2容错能力4三. 学生管理系统设计41. 学生管理系统模块设计41.1主模块41.2信息插入模块51.3信息删除模块51.4信息修改模块51.5信息查询模块62. 学生管理系统数据库设计62.1学生表62.2班级信息表62.3课程表72.4成绩表73.内部类设计73.1学生类73.2班级类83.3课程类83.4成绩类9四、 学生管理系统代码实现91. 学生管理系统模块代码实现91.1主模块91.2信息插入模块121.2信息删除模块151.3信息修改模块191.4信息查询模块232. 内部类代码实现252.1学生类252.2班级类282.3课程类312.4成绩类34五、学生管理系统功能测试371插入信息测试372删除信息测试383修改信息测试404查询信息测试41六 课程设计总结和感想42一、课程设计项目学生管理系统。2、 学生管理系统需求分析1. 学生管理系统功能需求本次.net课程设计实习所涉及的学生信息管理系统是一个简单的管理系统,用于为某个院系按专业管理学生的基本信息、课程信息和学生成绩信息以及班级信息。系统功能主要分为:信息操作功能、查询功能、统计功能和分析功能。1.1信息操作功能1) 学生基本信息的增加、删除、修改。学生信息包括:学号,姓名,性别,出生日期,籍贯和家庭住址。2) 学生成绩信息的添加、删除、修改。学生成绩信息包括:学号、课程号和成绩。3) 班级信息添加、删除、修改。班级信息包括:班号、所在院系、专业名称、学制和入学时间。4) 课程信息的添加、删除、修改。课程信息包括:课程号、课程名称、课程类型、开课学期、课时数和学分。1.2查询功能1) 查询学生基本信息。(通过学号、姓名、系别、籍贯等)2) 查询成绩基本信息。(通过学号、课程号、等)3) 查询课程基本信息。(通过课程号、课程名等)4) 查询班级基本信息。(通过班级号、班级名、所在院系等)1.3统计功能1) 统计某个学生的在所有学期课程总平均分,并且在状态栏上显示。1.4分析功能1) 对某个班级某一门课程的成绩分布进行分析,并且以直方图的形式显示出来。2. 学生管理系统性能需求2.1时间相应1) 在用户可以忍受的范围内,相应用户的操作。2.2容错能力1) 能够有一定的容错提示,数据库连接出错时或者查询出错时候给出错误提示。3. 学生管理系统设计1. 学生管理系统模块设计1.1主模块1.2信息插入模块1.3信息删除模块1.4信息修改模块1.5信息查询模块2. 学生管理系统数据库设计2.1学生表2.2班级信息表2.3课程表2.4成绩表3.内部类设计我单独分别设计了4个类,来完成对数据库中的表进行操作。这些类把用户界面和数据库操作分离开来,实现了用户界面层和数据操作层的分离,更加清晰的把整个软件架构表达出来。3.1学生类class Student public String strCon; public OleDbConnection conn; public OleDbCommand cmd; public Student(); public void insert(string studentno, string studentname, string studentsex, string studentbirth, stringstudentnative, string studentaddress); public void delete(string studentno); public DataSet select(string selectype,string item); public DataSet selectAll(); public void update(string studentno, string studentname, string studentsex, string studentbirth, string studentnative, string studentaddress);3.2班级类class Classinfo public String strCon; public OleDbConnection conn; public OleDbCommand cmd; public Classinfo(); public void insert(string classno, string classdepart, string special, string studyyears, string entertime); public void delete(string classno); public DataSet select(string selectype,string item); public DataSet selectAll(); public void update(string classno, string classdepart, string special, string studyyears, string entertime);3.3课程类class Coursepublic String strCon;public OleDbConnection conn;public OleDbCommand cmd;public Course(); public void insert(string courseno, string coursename, string coursetype, string courseopenteam, string coursehours, string coursecredi); public void delete(string courseno); public DataSet select(string selectype,string item); public DataSet selectAll(); public void update(string courseno, string coursename, string coursetype, string courseopenteam, string coursehours, string coursecredi); 3.4成绩类class Score public String strCon; public OleDbConnection conn; public OleDbCommand cmd; public Score() ; public void insert(string studentno, string courseno, string coursescore); public void delete(string studnetno,string courseno); public DataSet select(string type, string studentno, string courseno); public DataSet selectAll(); public void update(string studentno, string courseno, string coursescore);4、 学生管理系统代码实现1. 学生管理系统模块代码实现1.1主模块namespace StudentManagerSys public partial class Form1 : Form public Form1() InitializeComponent(); private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) switch (e.Node.Text) case 学生信息: shouwStudentInfo(); break; case 班级信息: shouwClassInfo(); break; case 课程信息: shouwCoureinfo(); break; case 成绩信息: shouwScoreInfo(); break; private void shouwStudentInfo() Student stu = new Student(); DataSet stuInfo; stuInfo = stu.selectAll(); dataGridView1.DataSource = stuInfo; dataGridView1.DataMember = infom; private void shouwClassInfo() Classinfo cla = new Classinfo(); DataSet claInfo; claInfo = cla.selectAll(); dataGridView1.DataSource = claInfo; dataGridView1.DataMember = infom; private void shouwCoureinfo() Course cou = new Course(); DataSet couInfo; couInfo = cou.selectAll(); dataGridView1.DataSource = couInfo; dataGridView1.DataMember = infom; private void shouwScoreInfo() Score sco = new Score(); DataSet scoInfo; scoInfo = sco.selectAll(); dataGridView1.DataSource = scoInfo; dataGridView1.DataMember = infom; private void 插入数据ToolStripMenuItem_Click(object sender, EventArgs e) InsertFrom from = new InsertFrom(); from.Show(); private void 删除数据ToolStripMenuItem_Click(object sender, EventArgs e) DeleteForm from = new DeleteForm(); from.Show(); private void 修改数据ToolStripMenuItem_Click(object sender, EventArgs e) ModifyForm from = new ModifyForm(); from.Show(); private void 查询数据ToolStripMenuItem_Click(object sender, EventArgs e) SearchForm from = new SearchForm(); from.Show(); private void 关于这个软件ToolStripMenuItem_Click(object sender, EventArgs e) MessageBox.Show(作者信息:计Y052班 罗鑫 200502001071n); 1.2信息插入模块namespace StudentManagerSys public partial class InsertFrom : Form /插入学生信息用到的数据 public string studnetno; public string studentname; public string sex; public string ative; public string address; public string birth; /插入班级信息用到的数据 public string classno; public string depart; public string specical; public string studyears; public string entertime; /插入课程信息用到的数据 public string courseno; public string coursename; public string coursetype; public string openterm; public string ccoursehours; public string credit; /插入成绩信息需要的数据 public string score; public InsertFrom() InitializeComponent(); /插入学生信息,确认按钮消息相应函数 private void button1_makesure_Click(object sender, EventArgs e) studnetno = textBox1.Text; studentname = textBox2.Text; if (comboBox1.Text = 男) sex = 0; else sex = 1; ative = textBox3.Text; address = textBox4.Text; birth = dateTimePicker1.Value.ToString(yyyy-MM-dd); Student stu = new Student(); stu.insert(studnetno, studentname, sex, birth, ative, address); this.Close(); /插入学生信息,重置按钮消息相应函数 private void button1_reset_Click(object sender, EventArgs e) textBox1.Text = ; textBox2.Text = ; textBox3.Text = ; textBox4.Text = ; dateTimePicker1.Text = ; comboBox1.Text = 男; /插入班级信息,确认按钮消息相应函数 private void button1_Click(object sender, EventArgs e) classno = textBox5.Text; depart = textBox8.Text; specical = textBox9.Text; studyears = textBox6.Text; entertime = dateTimePicker2.Value.ToString(yyyy-MM-dd); Classinfo cla = new Classinfo(); cla.insert(classno, depart, specical, studyears, entertime); this.Close(); /插入班级信息,重置按钮消息相应函数 private void button2_Click(object sender, EventArgs e) textBox5.Text = ; textBox8.Text = ; textBox9.Text = ; textBox6.Text = ; dateTimePicker2.Text = ; /插入课程信息,确认按钮消息相应函数 private void button4_Click(object sender, EventArgs e) courseno = textBox10.Text; coursename = textBox11.Text; coursetype = textBox12.Text; openterm = textBox13.Text; ccoursehours = textBox14.Text; credit = textBox15.Text; Course cou = new Course(); cou.insert(courseno, coursename, coursetype, openterm, ccoursehours, credit); this.Close(); /插入课程信息,重置按钮消息相应函数 private void button3_Click(object sender, EventArgs e) textBox10.Text = ; textBox11.Text = ; textBox12.Text = ; textBox13.Text = ; textBox14.Text = ; textBox15.Text = ; /插入成绩信息,确认按钮消息相应函数 private void button6_Click(object sender, EventArgs e) courseno = textBox16.Text; studnetno = textBox17.Text; score = textBox18.Text; Score sco = new Score(); sco.insert(studnetno, courseno, score); this.Close(); /插入成绩信息,取消按钮消息相应函数 private void button5_Click(object sender, EventArgs e) textBox16.Text = ; textBox17.Text = ; textBox18.Text = ; 1.2信息删除模块namespace StudentManagerSys public partial class DeleteForm : Form public string delStudentNo = ; public string delClassNo = ; public string delCourseNo = ; public string delScoreid = ; public DeleteForm() InitializeComponent(); /显示所有相应表格的数据 public void ShowAllData(string type) DataSet set; if (type = 学生) Student stu = new Student(); set = stu.selectAll(); dataGridView1.DataSource = set; dataGridView1.DataMember = infom; else if (type = 班级) Classinfo cla = new Classinfo(); set = cla.selectAll(); dataGridView2.DataSource = set; dataGridView2.DataMember = infom; else if (type = 课程) Course cou = new Course(); set = cou.selectAll(); dataGridView3.DataSource = set; dataGridView3.DataMember = infom; else if (type = 成绩) Score sco = new Score(); set = sco.selectAll(); dataGridView4.DataSource = set; dataGridView4.DataMember = infom; private void tabControl1_Selected(object sender, TabControlEventArgs e) if (e.TabPage = tabPage1) ShowAllData(学生); else if (e.TabPage = tabPage2) ShowAllData(班级); else if (e.TabPage = tabPage3) ShowAllData(课程); else if (e.TabPage = tabPage4) ShowAllData(成绩); /删除学生信息 private void button1_delstu_Click(object sender, EventArgs e) if (MessageBox.Show(this, 要删除所选记录吗?, 请确认, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign) = DialogResult.No) return; foreach (Control ctrl in this.Controls)/通过个一循环得到信息 string ctrlName = ctrl.Name.Trim(); if (ctrlName.StartsWith(pid)/查询信息根据的主键 ctrl.Enabled = false; delStudentNo = dataGridView1.RowsdataGridView1.CurrentRow.Index.Cells0.Value.ToString(); Student stu = new Student(); stu.delete(delStudentNo); /删除成绩信息 private void button1_delsco_Click(object sender, EventArgs e) if (MessageBox.Show(this, 要删除所选记录吗?, 请确认, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign) = DialogResult.No) return; if (delStudentNo != & delClassNo != ) Score sco = new Score(); sco.delete(delStudentNo, delClassNo); /删除课程信息 private void button1_delCou_Click(object sender, EventArgs e) if (MessageBox.Show(this, 要删除所选记录吗?, 请确认, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign) = DialogResult.No) return; foreach (Control ctrl in this.Controls)/通过个一循环得到信息 string ctrlName = ctrl.Name.Trim(); if (ctrlName.StartsWith(pid)/查询信息根据的主键 ctrl.Enabled = false; delCourseNo = dataGridView3.RowsdataGridView3.CurrentRow.Index.Cells0.Value.ToString(); Course cou = new Course(); cou.delete(delCourseNo); /删除班级信息 private void button1_delcla_Click(object sender, EventArgs e) if (MessageBox.Show(this, 要删除所选记录吗?, 请确认, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign) = DialogResult.No) return; foreach (Control ctrl in this.Controls)/通过个一循环得到信息 string ctrlName = ctrl.Name.Trim(); if (ctrlName.StartsWith(pid)/查询信息根据的主键 ctrl.Enabled = false; delClassNo= dataGridView2.RowsdataGridView2.CurrentRow.Index.Cells0.Value.ToString(); Classinfo cla = new Classinfo(); cla.delete(delClassNo); private void DeleteForm_Load(object sender, EventArgs e) ShowAllData(学生); private void dataGridView4_CellValidated(object sender, DataGridViewCellEventArgs e) delStudentNo = dataGridView4.Rowse.RowIndex.Cells0.Value.ToString(); delClassNo = dataGridView4.Rowse.RowIndex.Cells1.Value.ToString(); 1.3信息修改模块namespace StudentManagerSys public partial class ModifyForm : Form /修改学生信息用到的数据 public string modifyStudnetno; public string modifyStudnetname; public string modifySex; public string modifyAtive; public string modifyAddress; public string modifyBirth; /修改班级信息用到的数据 public string modifyClassno; public string modifyDepart; public string modifySpecical; public string modifyStudyears; public string modifyEntertime; /修改课程信息用到的数据 public string modifyCourseno; public string modifyCoursename; public string modifyCoursetype; public string modifyOpenterm; public string modifyCcoursehours; public string modifyCredit; /修改成绩信息需要的数据 public string modifyScore; public ModifyForm() InitializeComponent(); /显示所有相应表格的数据s public void ShowAllData(string type) DataSet set; if (type = 学生) Student stu = new Student(); set = stu.selectAll(); dataGridView1.DataSource = set; dataGridView1.DataMember = infom; else if (type = 班级) Classinfo cla = new Classinfo(); set = cla.selectAll(); dataGridView2.DataSource = set; dataGridView2.DataMember = infom; else if (type = 课程) Course cou = new Course(); set = cou.selectAll(); dataGridView3.DataSource = set; dataGridView3.DataMember = infom; else if (type = 成绩) Score sco = new Score(); set = sco.selectAll(); dataGridView4.DataSource = set; dataGridView4.DataMember = infom; private void button_edit_stu_Click(object sender, EventArgs e) if (MessageBox.Show(this, 要修改所选记录吗?, 请确认, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign) = DialogResult.No) return; Student stu = new Student(); stu.update(modifyStudnetno, modifyStudnetname, modifySex, modifyBirth, modifyAtive, modifyAddress); private void button_edit_class_Click(object sender, EventArgs e) if (MessageBox.Show(this, 要修改所选记录吗?, 请确认, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign) = DialogResult.No) return; Classinfo cla = new Classinfo(); cla.update(modifyClassno, modifyDepart, modifySpecical, modifyStudyears, modifyEntertime); private void button_edit_course_Click(object sender, EventArgs e) if (MessageBox.Show(this, 要修改所选记录吗?, 请确认, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOption
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!