收藏 分销(赏)

数据库课程设计学生信息管理系统.doc

上传人:快乐****生活 文档编号:4866844 上传时间:2024-10-16 格式:DOC 页数:18 大小:304.44KB 下载积分:8 金币
下载 相关 举报
数据库课程设计学生信息管理系统.doc_第1页
第1页 / 共18页
数据库课程设计学生信息管理系统.doc_第2页
第2页 / 共18页


点击查看更多>>
资源描述
安徽工业大学工商学院 数据库课程设计报告 学生信息管理系统 姓名: 学号: 专业:计算机科学与技术 班级:计1441 教师: 2017.1.3 一、 题目:学生信息管理系统 学生信息管理是一个教育单位不可缺少的部分,它的内容对于学校的决策者和管理者来说都是至关重要的。所以学生信息管理系统应该能够为用户提供充足的信息和快捷的查询手段。本系统采用Microsoft Visual Studio 2010作为开发工具,Microsoft SQL Server 2012建立数据库,并进行初始数据输入,在进行界面的设计和代码的编写,界面简洁,功能明确,方便了工作人员的操作。 二、开发工具:Microsoft Visual Studio 2010 三、数据库:Microsoft SQL Server 2012 Microsoft SQL Server 2012是一套完整的数据库和分析产品,具有高度的可扩展性和可靠性,对市场的快速反应能力强,可以快速构建各种业务和方案,具有高度的安全性保障。 四、操作系统:Microsoft windows 10 五、功能图 登录 添加 更改 删除 查询 六、 用户视图与代码 1、登录页面 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace 测试 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void label1_Click(object sender, EventArgs e) { } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox1.Text == "学生") pictureBox1.Image = Image.FromFile("pic\\1.jpg"); if (comboBox1.Text == "教师") pictureBox1.Image = Image.FromFile("pic\\2.jpg"); } private void button2_Click(object sender, EventArgs e) { string str, sql; str = "Server=.;Database=学生信息管理系统;User id='sa';pwd='167349'"; SqlConnection conn = new SqlConnection(str); conn.Open(); sql = "select * from 教师登入表 where zh='" + textBox1.Text + "' and mima='" + textBox2.Text + "'"; SqlCommand cmd = new SqlCommand(sql, conn); cmd.CommandType = CommandType.Text; SqlDataReader sdr; sdr = cmd.ExecuteReader(); if (sdr.Read() && comboBox1.Text == "教师") { Form3 form2 = new Form3(); form2.Show(); } else if (comboBox1.Text == "请选择") MessageBox.Show("未选择登录选项"); else MessageBox.Show("账号或密码错误!", "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } private void button3_Click(object sender, EventArgs e) { this.Dispose(); } } } 2、功能页面 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace 测试 { public partial class Form3 : Form { public Form3() { InitializeComponent(); } private void radioButton1_CheckedChanged(object sender, EventArgs e) { } private void radioButton2_CheckedChanged(object sender, EventArgs e) { } private void radioButton3_CheckedChanged(object sender, EventArgs e) { } private void radioButton4_CheckedChanged(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { if (radioButton1.Checked) { Form4 f = new Form4(); f.Show(); } if (radioButton2.Checked) { Form5 f = new Form5(); f.Show(); } if (radioButton3.Checked) { Form6 f = new Form6(); f.Show(); } if (radioButton4.Checked) { Form7 f = new Form7(); f.Show(); } } private void button1_Click(object sender, EventArgs e) { this.Dispose(); } private void groupBox1_Enter(object sender, EventArgs e) { } private void label2_Click(object sender, EventArgs e) { } } } 系统功能: (1) 查询 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace 测试 { public partial class Form4 : Form { public Form4() { InitializeComponent(); } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { } private void button1_Click(object sender, EventArgs e) //查询 { string str = "Server=.;Database=学生信息管理系统;User id='sa';pwd='167349'"; SqlConnection con = new SqlConnection(str); String sqlstr = "Select 姓名,性别,专业,班级 From stu where 学号 = '" + textBox1.Text + "'"; SqlDataAdapter dr = new SqlDataAdapter(sqlstr,con); DataSet DataSet1 = new DataSet(); dr.Fill(DataSet1,"stu"); dataGridView1.DataSource = DataSet1.Tables["stu"]; } private void button2_Click(object sender, EventArgs e) { this.Dispose(); } private void button3_Click(object sender, EventArgs e) { Form3 thild = new Form3(); thild.Show(); this.Dispose(); } private void Form4_Load(object sender, EventArgs e) { } } } (2) 删除 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace 测试 { public partial class Form5 : Form { public Form5() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string str = "Server=.;Database=学生信息管理系统;User id='sa';pwd='167349'"; SqlConnection con = new SqlConnection(str); String sqlstr = "Select 姓名,性别,专业,班级 From stu where 学号 = '" + textBox1.Text + "'"; SqlDataAdapter dr = new SqlDataAdapter(sqlstr, con); DataSet DataSet1 = new DataSet(); dr.Fill(DataSet1, "stu"); dataGridView1.DataSource = DataSet1.Tables["stu"]; } private void button2_Click(object sender, EventArgs e) { string str = "Server=.;Database=学生信息管理系统;User id='sa';pwd='167349'"; SqlConnection con = new SqlConnection(str); String sqlstr = "delete  From stu where 学号='" + textBox1.Text + "'"; SqlCommand mycom2 = new SqlCommand(sqlstr, con); con.Open(); mycom2.ExecuteNonQuery(); MessageBox.Show("该学生信息删除成功!", "恭喜", MessageBoxButtons.OK, MessageBoxIcon.Information); } private void button3_Click(object sender, EventArgs e) { Form3 thild = new Form3(); thild.Show(); this.Dispose(); } private void button4_Click(object sender, EventArgs e) { this.Dispose(); } private void Form5_Load(object sender, EventArgs e) { } } } (3) 更改 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace 测试 { public partial class Form6 : Form { public Form6() { InitializeComponent(); } private void groupBox1_Enter(object sender, EventArgs e) { } private void textBox2_TextChanged(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { String Sex; if (radioButton1.Checked == true) { Sex = "男"; } else { Sex = "女"; } string str = "Server=.;Database=学生信息管理系统;User id='sa';pwd='167349'"; SqlConnection con = new SqlConnection(str); String sqlstr = "update stu set 学号='" + textBox2.Text + "' ,姓名='" + textBox3.Text + "',性别='" + Sex + "',专业='" + textBox6.Text + "',年龄='" + textBox5.Text + "',班级='" + textBox4.Text + "' Where 学号='" + textBox1.Text + "'"; SqlCommand mycom1 = new SqlCommand(sqlstr, con); con.Open(); mycom1.ExecuteNonQuery(); MessageBox.Show("该学生信息更新成功!", "恭喜", MessageBoxButtons.OK, MessageBoxIcon.Information); con.Close(); } private void button1_Click(object sender, EventArgs e) { string str = "Server=.;Database=学生信息管理系统;User id='sa';pwd='167349'"; SqlConnection con = new SqlConnection(str); String sqlstr = "Select 学号,姓名,专业,性别,年龄,班级 From stu where 学号 = '" + textBox1.Text + "'"; SqlDataAdapter dr = new SqlDataAdapter(sqlstr, con); DataSet DataSet1 = new DataSet(); dr.Fill(DataSet1, "stu"); dataGridView1.DataSource = DataSet1.Tables["stu"]; } private void button3_Click_1(object sender, EventArgs e) { Form3 fiveth = new Form3(); fiveth.Show(); this.Dispose(); } private void Form6_Load(object sender, EventArgs e) { } } } (4) 添加 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace 测试 { public partial class Form7 : Form { public Form7() { InitializeComponent(); } private void label1_Click(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { String Sex; if (radioButton1.Checked == true) { Sex = "男"; } else { Sex = "女"; } string str = "Server=.;Database=学生信息管理系统;User id='sa';pwd='167349'"; SqlConnection con = new SqlConnection(str); String sqlstr = "insert into stu(学号,姓名,性别,专业,年龄,班级) values ( '" + textBox1.Text + "',  '" + textBox2.Text + "','" + Sex + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "')"; SqlCommand mycom1 = new SqlCommand(sqlstr, con); con.Open(); mycom1.ExecuteNonQuery(); MessageBox.Show("该学生信息添加成功!", "恭喜", MessageBoxButtons.OK, MessageBoxIcon.Information); con.Close(); } private void button2_Click(object sender, EventArgs e) { Form3 fiveth = new Form3(); fiveth.Show(); this.Dispose(); } private void button3_Click(object sender, EventArgs e) { this.Dispose(); } private void Form7_Load(object sender, EventArgs e) { } } } 七、总结 通过两三天的编程和调试以及实验报告的撰写,最终还是做了一个小型数据库应用程序的开发。预先设想的功能经过查阅资料和询问同学基本得以实现。尽管在做的过程中存在了很多的错误,花了很多的时间去改正,最后还是做成功了。通过本实验我收获很多。今后对于每一科目的每一次的上机实验,,我都会认真的对待,并及时进行总结,以不断提升自己的能力。 参考资料:数据库基础与应用 Visual c#.NET 程序设计实用教程 目 录 第一章 总 论 1 一、项目提要 1 二、可行性研究报告编制依据 2 三、综合评价和论证结论 3 四、存在问题与建议 4 第二章 项目背景及必要性 5 一、项目建设背景 5 二、项目区农业产业化经营发展现状 11 三、项目建设的必要性及目的意义 12 第三章 建设条件 15 一、项目区概况 15 二、项目实施的有利条件 17 第四章 建设单位基本情况 19 一、建设单位概况 19 二、研发能力 20 三、财务状况 20 第五章 市场分析与销售方案 21 一、市场分析 21 二、产品生产及销售方案 22 三、销售策略及营销模式 22 四、销售队伍和销售网络建设 23 第六章 项目建设方案 24 一、建设任务和规模 24 二、项目规划和布局 24 三、生产技术方案与工艺流程 25 四、项目建设标准和具体建设内容 26 五、项目实施进度安排 27 第七章 投资估算和资金筹措 28 一、投资估算依据 28 二、项目建设投资估算 28 三、资金来源 29 四、年度投资与资金偿还计划 29 第八章 财务评价 30 一、财务评价的原则 30 二、主要参数的选择 30 三、财务估算 31 四、盈利能力分析 32 五、不确定性分析 33 六、财务评价结论 34 第九章 环境影响评价 35 一、环境影响 35 二、环境保护与治理措施 35 三、环保部门意见 36 第十章 农业产业化经营与农民增收效果评价 37 一、产业化经营 37 二、农民增收 38 三、其它社会影响 38 第十一章 项目组织与管理 40 一、组织机构与职能划分 40 二、项目经营管理模式 42 三、技术培训 42 四、劳动保护与安全卫生 43 第十二章 可行性研究结论与建议 46 一、可行性研究结论 46 二、建议 47
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服