学生成绩管理系统 课程设计

上传人:仙*** 文档编号:27767246 上传时间:2021-08-20 格式:DOC 页数:12 大小:246.56KB
返回 下载 相关 举报
学生成绩管理系统 课程设计_第1页
第1页 / 共12页
学生成绩管理系统 课程设计_第2页
第2页 / 共12页
学生成绩管理系统 课程设计_第3页
第3页 / 共12页
点击查看更多>>
资源描述
课程设计报告课程名称 Visual C#.Net 程序设计教程 项目名称 学生成绩管理系统 班级与班级代码 09信管一班 实验室名称(或课室) S-403 专 业 信息管理与信息系统 任课教师 朱若磊 学 号: 09251101121 姓 名: 李建波 提交日期: 2012 年 6 月 28 日 广东商学院教务处 制姓名 李建波 报告成绩 评语: 指导教师(签名) 年 月 日说明:指导教师评分后,实验报告交院(系)办公室保存。.NET程序设计开发课程设计项目任务:(本人)一、项目名称学生成绩管理系统二、项目背景 在21世纪的科技时代,科学技术突飞猛进,计算机已经不仅是在科技上应用,而且在生活中也是同样得到了广泛在应用。如今,不管是小学,初中,高中,甚至是很多大学生的学生成绩管理基本上是靠人工进行管理,但随着时间的变化,学校规模的扩大,有关学生成绩管理工作和所涉及到的数据量越来越大越来越多,大多数学校不得不靠增加人力,物力,财力来进行学生成绩管理。但是人工管理成绩档案具有效率低,查找麻烦,可靠性不高,保密性低等因素。因此开发出一个不仅仅是适用于大中专院校以及其它高校通用的学生成绩管理系统是必要的。 本团队就此开发一个学生成绩管理系统,采用计算机对学生成绩进行管理,以进一步提高办学效益和现代化水平,为广大教师和学生提高工作效率,实现学生成绩信息管理工作流程的系统化,规范化和自动化。 三、开发环境分析使用Microsoft Visual Studio 2005开发、使用C#.NET语言编程,后台数据库选择SQL Server 2005。四、项目要求设计一个比较完善的学生选课管理系统,其中要求后台的数据库利用SQL Server来完成(可以使用.NET自带的SQL Express),功能具体要求如下:(1)登录功能;(2)学生信息管理功能;(3)课程信息管理功能;(4)学生成绩管理功能;(5)实现将查询结果保存到硬盘的功能;(6)修改相关数据库结构并据此实现基本选课功能(7)任选(1)(4)项中的一项,将其利用ASP.NET来实现;设计项目成立与项目实施一、 项目组长组长:李建波二、 设计项目分工小组成员:彭健锋,陈志明,张泰宁,周敏强,成思谋,李建波。小组分工情况如下:一、项目组长:组长:李建波二、设计项目分工:小组成员:彭健锋,陈志明,张泰宁,周敏强,成思谋,李建波。小组分工情况如下:1、张泰宁:负责登录功能:Login.cs;并将其利用ASP.NET来实现;2、彭健锋:负责学生信息添加(StudentMsgFrm.cs)、管理功能(StudentFrm.cs);3、陈志明:负责课程信息添加(CourseMsgFrm.cs)和管理功能(CourseFrm.cs);4、成思谋:负责学生成绩管理功能(ScoreMsgFrm.cs);5、周敏强:实现将查询结果保存到硬盘的功能(select)(统一数据库);6、李建波:实现学生基本选课功能(整合全部功能)(selectcourse)。三、 项目实施过程:1、数据库设计和连接是使用SQL Server 2005设计的,在.Net用connectionString连接数据库。关键代码如下: InitializeComponent(); connString = Data Source=local;Initial Catalog=MySchool;Integrated Security=True; connection = new SqlConnection(connString); catch (Exception ex) MessageBox.Show(ex.Message,数据库操作出错了!, MessageBoxButtons.OK,MessageBoxIcon.Exclamation); 2、实现学生基本选课功能(整合全部功能),新建一个selectcourse.cs窗体,在窗体添加3个label控件,1个listbox控件,1个Richtxtbox和2个Button,设置两个数据源MySchoolDataSet1,MySchoolDataSet22.1按下列要求修改属性项:控件属性属性设置控件属性属性设置Label1NameLabelListboxNameCdoclassText名字Label2NameLabel2RichtxtboxNameRichtxtboxText信息如下:Label3NameLabel3Button1NameButton1TextText选他了MySchoolDataSetButton2NameButton2Text退出如下图:2.1图:2.1界面设计2.4设计的关键代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using MySchool;using System.Data.SqlClient;namespace MySchool public partial class selectcourse : Form public selectcourse() InitializeComponent(); private void selectcourse_Load(object sender, EventArgs e) / TODO: 这行代码将数据加载到表“mySchoolDataSet2.CourseMsg”中。您可以根据需要移动或移除它。 this.courseMsgTableAdapter1.Fill(this.mySchoolDataSet2.CourseMsg); / TODO: 这行代码将数据加载到表“mySchoolDataSet.CourseMsg”中。您可以根据需要移动或移除它。 this.courseMsgTableAdapter.Fill(this.mySchoolDataSet.CourseMsg); string connString = Data Source=(local);Initial Catalog=MySchool;Integrated Security=True; SqlConnection connection = new SqlConnection(connString); string sql = String.Format(select cc from tablea where enroll=1); connection.Open(); SqlCommand command = new SqlCommand(sql, connection); string num =(string )command.ExecuteScalar(); string message = String.Format(你好! 0先生, num); label3.Text = num; label1.Text = message; connection.Close(); private void aa_Click(object sender, EventArgs e) string connString = Data Source=(local);Initial Catalog=MySchool;Integrated Security=True; SqlConnection connection = new SqlConnection(connString); string sql = String.Format(update tablea set enroll=0 where enroll=1); connection.Open(); SqlCommand command = new SqlCommand(sql, connection); command.ExecuteNonQuery(); this.Close(); private void cboClass_SelectedIndexChanged(object sender, EventArgs e) string kk = cboClass.Text; string connString = Data Source=(local);Initial Catalog=MySchool;Integrated Security=True; SqlConnection connection = new SqlConnection(connString); string sql = String.Format(select CourseClass from CourseMsg where CourseName=0,kk); string sql2 = String.Format(select Credit from CourseMsg where CourseName=0, kk); string sql3 = String.Format(select PrelectionCredit from CourseMsg where CourseName=0, kk); string sql4 = String.Format(select ExperimentCredit CourseMsg where CourseName=0, kk); connection.Open(); SqlCommand command = new SqlCommand(sql, connection); SqlCommand command2 = new SqlCommand(sql2, connection); SqlCommand command3= new SqlCommand(sql3, connection); SqlCommand command4 = new SqlCommand(sql3, connection); string num = (string)command.ExecuteScalar(); int num2 = (int)command2.ExecuteScalar(); int num3 = (int)command3.ExecuteScalar(); int num4 = (int)command4.ExecuteScalar(); string message = String.Format(0, num); richTextBox1.Text = message; label2.Text = 学分+num2+理论课时:+num3+实验课时+num4; connection.Close(); private void button1_Click(object sender, EventArgs e) string connString = Data Source=(local);Initial Catalog=MySchool;Integrated Security=True; SqlConnection connection = new SqlConnection(connString); string sql = String.Format(INSERT INTO ScoreMsgMe(StudentName,CourseName,Score) VALUES(0,1,2), label3.Text, cboClass.Text, 0); connection.Open(); SqlCommand command = new SqlCommand(sql, connection); command.ExecuteNonQuery(); 四、 结果演示: 数据库设计1 ER图E-r图,如上图2 数据库表学生课程关系图User表结构列名数据类型说明UserNamenvarchar(50)管理员用户名,不允许为空,主键passwordnvarchar(50)管理员密码,不允许为空StudentMsg表结构列名数据类型说明StudentNoint(4)学号,主键,标识列StudentNamenvarchar(50)学生姓名,不允许为空sexnchar(10)性别departmentnvarchar(50)院系specialitynvarchar(50)专业Hobbynvarchar(200)兴趣爱好passwordnvarchar(8)学生登录密码,默认值1111enrollbit(1)学生登录状态,默认值为0CourserMsg表结构列名数据类型说明CouresIdint(4)课程编号,主键,标识列CourseNamenvarchar(50)课程名称,不允许为空CourseClassnvarchar(50)课程类别Requiredbit(1)是否必修Creditint(4)学分PrelectionCreditint(4)理论学时ExperimentCreditint(4)实验学时ScoreMsg表结构列名数据类型说明StudentNoint(4)学号,主键,外键CourseIdint(4)课程编号,主键Scoreint(4)成绩User表数据StudentMsg表数据CourseMsg表数据ScoreMsg表数据2、结果演示:学生登录图4.2.1学生应用界面 图4.2.2学生选课信息:图4.2.3选好课程后,点击“选它了”按钮,选课成功。信息记录到表上。选课五、课程设计总结: 本次实验是要团队建立一个学生成绩管理系统,以实现快捷,高效,准确保存学生的基本信息,课程信息,成绩信息,还有实现选课功能。
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸下载 > CAD图纸下载


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

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


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