




已阅读5页,还剩10页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
安徽工业大学工商学院数据库课程设计报告学生信息管理系统 姓名: 学号: 专业:计算机科学与技术 班级:计1441 教师:2017.1.31、 题目:学生信息管理系统 学生信息管理是一个教育单位不可缺少的部分,它的内容对于学校的决策者和管理者来说都是至关重要的。所以学生信息管理系统应该能够为用户提供充足的信息和快捷的查询手段。本系统采用Microsoft Visual Studio 2010作为开发工具,Microsoft SQL Server 2012建立数据库,并进行初始数据输入,在进行界面的设计和代码的编写,界面简洁,功能明确,方便了工作人员的操作。二、开发工具:Microsoft Visual Studio 2010三、数据库:Microsoft SQL Server 2012 Microsoft SQL Server 2012是一套完整的数据库和分析产品,具有高度的可扩展性和可靠性,对市场的快速反应能力强,可以快速构建各种业务和方案,具有高度的安全性保障。四、操作系统:Microsoft windows 10五、功能图登录添加更改删除 查询6、 用户视图与代码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(pic1.jpg); if (comboBox1.Text = 教师) pictureBox1.Image = Image.FromFile(pic2.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姓名,性别,专业,班级Fromstuwhere学号= + textBox1.Text + ; SqlDataAdapter dr = new SqlDataAdapter(sqlstr,con); DataSet DataSet1 = new DataSet(); dr.Fill(DataSet1,stu); dataGridView1.DataSource = DataSet1.Tablesstu; 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姓名,性别,专业,班级Fromstuwhere学号= + textBox1.Text + ; SqlDataAdapter dr = new SqlDataAdapter(sqlstr, con); DataSet DataSet1 = new DataSet(); dr.Fill(DataSet1, stu); dataGridView1.DataSource = DataSet1.Tablesstu; private void button2_Click(object sender, EventArgs e) string str = Server=.;Database=学生信息管理系统;User id=sa;pwd=167349; SqlConnection con = new SqlConnection(str); String sqlstr = deleteFromstuwhere学号= + 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 = updatestuset学号= + 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学号,姓名,专业,性别,年龄,班级Fromstuwhere学号= + textBox1.Text + ; SqlDataAdapter dr = new SqlDataAdapter(sqlstr, con); DataSet DataSet1 = new DataSet(); dr.Fill(DataSet1, stu); dataGridView1.DataSource = DataSet1.Tablesstu; 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 SqlConn
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 养护安全培训做法与意义课件
- 商铺门面租赁合同解除协议书9篇
- 到山下去看树课件
- 化工企业机电安全培训课件
- 初级起重工安全知识培训课件
- 兴县安全生产专题培训班课件
- 国产无人机营销方案(3篇)
- 媒体营销项目营销方案(3篇)
- 2024-2025学年江苏省苏州市重点校九年级上学期数学期中试卷【附答案】
- 内蒙古银质针课件
- 《工程勘察设计收费标准》(2002年修订本)
- 医疗机构中药制剂临床前药效学与安全性研究技术指南
- 拆除工程施工安全培训
- 质量源于设计课件
- 2023年快递员职业技能理论考试题库(600题)
- 郭天祥51单片机教程
- GB 31644-2018食品安全国家标准复合调味料
- 第三单元名著导读《朝花夕拾之二十四孝图》-部编版语文七年级上册
- 最新人教版四年级英语上册课件(完美版)Review of Unit 5
- 掌骨骨折查房课件
- 大学食堂装饰装修方案
评论
0/150
提交评论