C#大作业学生成绩管理系统 - 图文
更新时间:2024-01-07 17:52:01 阅读量: 教育文库 文档下载
.
.
《c#程序设计》大作业
题目:学生成绩管理系统
班级:
学号: 姓名:
.
小组成员分工:
姓名
分工
汪依清: StuIfoupdate Login 傅勤珍: Other Rank
斯王春: StuIfoSearch Mainframe 黄成烽: StuIfoChange CourseEnter 吴凯: StuoIfoEnter ScoreEnter 朱隆震: CurChoice ScoreUpdate 洪彬: Other2
学生成绩管理系统
------主界面的设计和学生信息查询
主界面的设计:
主界面设计要求简单明了,能把系统的所有功能展现在主界面上面,能让人方便的查
询学生的各种信息,包括系统管理、学生信息管理、课程信息管理、成绩信息管理、选课信息管理、特殊情况管理等功能,不仅如此,界面的设计也要美观大方,这样很好的实现了人机交互。
学生信息查询: 1.1功能
(1) 根据查询条件实现学生信息的查询 (2) 学生选课信息查询、成绩信息的查询
.
.
(3) 学生信息、课程信息、成绩信息的增加、删除、修改
(4) 对基本信息完成增加、删除、修改时,需注意表与表之间的关联
1.2功能需求分析
学生信息查询:学生可以根据学号、姓名、专业进行查询.
1.3软件环境需求
利用Visual Studio 2010作为前台开发工具,后台SQL数据库管理实现学生成绩管理系统。设计
2.1学生信息查询模块
学生信息查询:学生可以根据学号、姓名、班级、学院进行查询。
学生信息查询 学号查询 姓名查询 班级查询 学院查询 2.2学生信息内容
学生的信息包括学号,姓名,性别,民族,班级,院系,出生日期,政治面貌。
学 生 信 息
.
学号 姓名 性别 民族 班级 院系 出生日政治面.
3.数据库设计
本系统的数据库是SQL server数据库,在SQL环境下创建数据库学生管理系统文件。根据以上模块划分图分析,针对学生信息管理系统,分别对个人基本信息、选课、成绩进行详细的研究分析。数据库的设计采用一库多表式设计。即设计了一个用户登录,添加学生信息,数据库中对学生的信息加入基础的添加、查询、修改和删除。该数据库包括Student、
Score、Other、Course、Choice、User列表。本人负责部分为后用户信息“Student”表。
以下是数据库的表清单:
User表:
Student表:
.
.
Score表:
Other表:
Course表:
.
.
Choice表:
.
.
4.测试:
主界面:
学生信息查询:
.
.
主要功能代码:
Mainframe代码:
namespace StudentIfoMag {
public partial class MainFrm : Form {
public MainFrm() {
InitializeComponent(); }
private void 退出ToolStripMenuItem_Click(object sender, EventArgs e) {
this.Close(); }
private void 学生信息录入ToolStripMenuItem_Click(object sender, EventArgs e) {
StuIfoEnter ent = new StuIfoEnter(); ent.MdiParent = this; ent.Show();
tssStu.Text = ent.Text; }
private void 学生信息更新ToolStripMenuItem_Click(object sender, EventArgs e) {
StuIfoSearch ser = new StuIfoSearch(); ser.MdiParent = this; ser.Show();
tssStu .Text = ser.Text; }
private void 学生信息更新ToolStripMenuItem1_Click(object sender, EventArgs e) {
StuIfoUpdate upt = new StuIfoUpdate(); upt.MdiParent = this; upt.Show();
tssStu.Text = upt.Text; }
.
.
private void 课程信息录入ToolStripMenuItem_Click(object sender, EventArgs e) {
CourseEnter en = new CourseEnter(); en.MdiParent = this; en.Show();
tssStu.Text = en.Text; }
private void 成绩录入ToolStripMenuItem_Click(object sender, EventArgs e) {
ScoreEnter enter = new ScoreEnter(); enter.MdiParent = this; enter.Show () ;
tssStu.Text = enter.Text; }
private void 成绩更新ToolStripMenuItem_Click(object sender, EventArgs e) {
ScoreUpdate up = new ScoreUpdate(); up.MdiParent = this; up.Show();
tssStu.Text = up.Text; }
private void 成绩排名ToolStripMenuItem_Click(object sender, EventArgs e) {
Rank ra = new Rank(); ra.MdiParent = this; ra.Show();
tssStu.Text = ra.Text; }
private void 班级选课ToolStripMenuItem_Click(object sender, EventArgs e) {
CurChoice ch = new CurChoice(); ch.MdiParent = this; ch.Show();
tssStu.Text = ch.Text; }
private void 留级休学ToolStripMenuItem_Click(object sender, EventArgs e) {
Other oth = new Other();
.
.
oth.MdiParent = this; oth.Show();
tssStu.Text = oth.Text; }
private void 留级ToolStripMenuItem_Click(object sender, EventArgs e) {
Other2 the = new Other2(); the.MdiParent = this; the.Show();
tssStu.Text = the.Text; } } }
学生信息查询代码:
namespace StudentIfoMag {
public partial class StuIfoSearch : Form {
public StuIfoSearch() {
InitializeComponent(); }
private void StuIfoSearch_Load(object sender, EventArgs e) {
comboBox1.SelectedIndex = 0;
// TODO: 这行代码将数据加载到表“studentIfoMagDataSet.Student”中。您可以根据需要移动或移除它。
// this.studentTableAdapter.Fill(this.studentIfoMagDataSet.Student);
}
private void button1_Click(object sender, EventArgs e) {
string connString = @\汪依清2012014574\\大三\\C#\\STUDENTINFORMATIONMAG\\StudentIfoMag.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True\;
.
.
SqlConnection connection = new SqlConnection(connString); if (textBox1.Text == \) //未输入查询条件时显示全部内容 {
string sql = String.Format(\); //SQL语句 try {
connection.Open(); //打开数据库连接
SqlDataAdapter adapter = new SqlDataAdapter(sql, connection); DataSet DS = new DataSet(); adapter.Fill(DS, \);
dataGridView1.DataSource = DS.Tables[\]; }
catch (SqlException ex) //数据库出错情况 {
MessageBox.Show(ex.Message, \操作数据库出错!\, MessageBoxButtons.OK, MessageBoxIcon.Error); } finally {
connection.Close(); //关闭数据库情况 } }
else //输入了查询条件 {
string sql;
switch (comboBox1.SelectedItem.ToString()) {
case \学号\:
sql = String.Format(\* from Student where studentNo = '{0}' \, textBox1.Text);
try {
connection.Open(); //打开数据库连接 DataSet DS = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter(sql, connection); adapter.Fill(DS, \);
dataGridView1.DataSource = DS.Tables[\];
if (DS.Tables[0].Rows.Count == 0) //如果未查询到任何信息,给出提示,并显示全部信息 {
MessageBox.Show(\没有查到相关信息,请检查查询条件!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
.
.
} }
catch (SqlException ex) //数据库出错情况 {
MessageBox.Show(ex.Message, \操作数据库出错!\, MessageBoxButtons.OK, MessageBoxIcon.Error); } finally {
connection.Close(); //关闭数据库连接 } break; case \姓名\:
sql = String.Format(\convert(nvarchar(255),studentName) LIKE '%{0}%' \, textBox1.Text); try {
connection.Open(); //打开数据库连接 DataSet DS = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter(sql, connection); adapter.Fill(DS, \);
dataGridView1.DataSource = DS.Tables[\];
if (DS.Tables[0].Rows.Count == 0) //如果未查询到任何信息,给出提示,并显示全部信息 {
MessageBox.Show(\没有查到相关信息,请检查查询条件!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
catch (SqlException ex) //数据库出错情况 {
MessageBox.Show(ex.Message, \操作数据库出错!\, MessageBoxButtons.OK, MessageBoxIcon.Error); } finally {
connection.Close(); //关闭数据库连接 } break; case \班级\:
sql = String.Format(\convert(nvarchar(255),studentClass) = '{0}' \, textBox1.Text); try {
.
.
connection.Open(); //打开数据库连接 DataSet DS = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter(sql, connection); adapter.Fill(DS, \);
dataGridView1.DataSource = DS.Tables[\];
if (DS.Tables[0].Rows.Count == 0) //如果未查询到任何信息,给出提示,并显示全部信息 {
MessageBox.Show(\没有查到相关信息,请检查查询条件!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
catch (SqlException ex) //数据库出错情况 {
MessageBox.Show(ex.Message, \操作数据库出错!\, MessageBoxButtons.OK, MessageBoxIcon.Error); } finally {
connection.Close(); //关闭数据库连接 } break; case \学院\:
sql = String.Format(\convert(nvarchar(255),studentAcademy) LIKE '%{0}%' \, textBox1.Text); try {
connection.Open(); //打开数据库连接 DataSet DS = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter(sql, connection); adapter.Fill(DS, \);
dataGridView1.DataSource = DS.Tables[\];
if (DS.Tables[0].Rows.Count == 0) //如果未查询到任何信息,给出提示,并显示全部信息 {
MessageBox.Show(\没有查到相关信息,请检查查询条件!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
catch (SqlException ex) //数据库出错情况 {
MessageBox.Show(ex.Message, \操作数据库出错!\, MessageBoxButtons.OK, MessageBoxIcon.Error); }
.
.
finally {
connection.Close(); //关闭数据库连接 } break; } } }
private void button3_Click(object sender, EventArgs e) {
this.Close(); }
private void button2_Click(object sender, EventArgs e) {
string connString = @\汪依清2012014574\\大三\\C#\\STUDENTINFORMATIONMAG\\StudentIfoMag.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True\;
SqlConnection connection = new SqlConnection(connString); string sql = String.Format(\); //SQL语句 connection.Open(); //打开数据库连接
SqlDataAdapter adapter = new SqlDataAdapter(sql, connection); DataSet DS = new DataSet(); adapter.Fill(DS, \);
dataGridView1.DataSource = DS.Tables[\]; studentTableAdapter.Fill(studentIfoMagDataSet.Student); } } }
5.总结
本次系统设计让我知道了进行管理系统开发这样的工作,要有恒心,要能静下新来做,而不能浮躁。要真真实实的多查资料,多问,多看。要善于同同学和老师交流与合作,善于获取各种有用的资源。
更让我认识到一个系统开发的过程中编码不是重要的,最重要的是分析系统、建立起系统模型。只有分析出来才能进行编码。在分析一个系统前,操作者必须要对将要开发的系统所涉及到的各方面知识有一个整体的认识,然后将系统的模型建立起来。
在程序编写中,我认识到软件要有简便的界面,良好的程序风格。拥有这些条件,程序
.
.
的可读性才会好,开发的复杂度才能大大减少,修改代码时更加容易下手。
.
正在阅读:
C#大作业学生成绩管理系统 - 图文01-07
地理必修三测试06-12
(公开课设计)五年级上册语文《去打开大自然绿色的课本》教案10-23
2-汽车电控发动机构造与检修整体实训教案 - 图文05-19
电子商务交易费用基础和发展障碍05-25
新题速递解析精校word版 - 河南省郑州市2018年高三第一次质量预03-16
浅谈新形势下路政管理工作存在的问题与对策05-08
社区矫正知识考试试题03-15
- exercise2
- 铅锌矿详查地质设计 - 图文
- 厨余垃圾、餐厨垃圾堆肥系统设计方案
- 陈明珠开题报告
- 化工原理精选例题
- 政府形象宣传册营销案例
- 小学一至三年级语文阅读专项练习题
- 2014.民诉 期末考试 复习题
- 巅峰智业 - 做好顶层设计对建设城市的重要意义
- (三起)冀教版三年级英语上册Unit4 Lesson24练习题及答案
- 2017年实心轮胎现状及发展趋势分析(目录)
- 基于GIS的农用地定级技术研究定稿
- 2017-2022年中国医疗保健市场调查与市场前景预测报告(目录) - 图文
- 作业
- OFDM技术仿真(MATLAB代码) - 图文
- Android工程师笔试题及答案
- 生命密码联合密码
- 空间地上权若干法律问题探究
- 江苏学业水平测试《机械基础》模拟试题
- 选课走班实施方案
- C#
- 管理系统
- 作业
- 成绩
- 图文
- 学生
- 河北省石家庄市2013届高中毕业班第二次模拟考试试题及答案(word版) 文综地理
- 2018-2019年小学语文教科版《六年级上册》《第七单元》《13 钓鱼的启示》精选专题试卷含
- 2015-2020年中国港口码头市场供需趋势预测及投资战略分析报告 - 图文
- 中西餐厅规章制度
- 企业倒闭职员工资赔偿标准是什么?
- 辽宁省沈阳市城郊市重点联合体2012-2013学年高一下学期期中考试语文试题
- 快乐教学法在思想政治课中的应用
- 2019-2020年语文版语文一年级上课文11 静夜思课后练习第三十九篇
- PLC考点
- 2019届四川省成都外国语学校高三上学期10月月考数学(文)试卷
- 农村人力资本与农民收入
- 创建“平安校园”调查问卷
- 2018-2023年中国数字出版行业商业模式与投资战略规划分析(目录)
- 西北师范大学2010年全日制专业学位硕士研究生招生专业目录
- 河南省灵宝市实验高中2017 - 2018学年高一物理下学期第一次月考试题
- 2015电子信息技术展会
- 小学数学北师大2011课标版四年级小数的意义和加减法整理与复习
- 2017年美国耶鲁大学著名校友
- 高考语文一轮复习《作文语言锤炼》教案
- 工作总结之社团总结的发言稿