




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
工业大学工商学院数据库课程设计报告学生信息管理系统:金村界学号:141842211专业:计算机科学与技术班级:计1441教师:甘丽2017.1.3题目:学生信息管理系统学生信息管理是一个教育单位不可缺少的部分,它的容对于学校的决策者和管理者来说都是至关重要的。所以学生信息管理系统应该能够为用户提供充足的信息和快捷的查询手段。本系统采用MicrosoftVisualStudio2010作为开发工具,MicrosoftSQLServer2012建立数据库,并进行初始数据输入,在进行界面的设计和代码的编写,界面简洁,功能明确,方便了工作人员的操作。二、开发工具:MicrosoftVisualStudio2010三、数据库:MicrosoftSQLServer2012MicrosoftSQLServer2012是一套完整的数据库和分析产品,具有高度的可扩展性和可靠性,对市场的快速反应能力强,可以快速构建各种业务和方案,具有高度的安全性保障。四、操作系统:Microsoftwindows10五、功能图登录登录添加更改删除查询添加更改删除查询用户视图与代码1、登录页面usingSystem;usingSystem.Collections.Generic;usingSystem.ponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespace测试{publicpartialclassForm1:Form{publicForm1(){Initializeponent();}privatevoidlabel1_Click(objectsender,EventArgse){}privatevoidboBox1_SelectedIndexChanged(objectsender,EventArgse){if(boBox1.Text=="学生")pictureBox1.Image=Image.FromFile("pic\\1.jpg");if(boBox1.Text=="教师")pictureBox1.Image=Image.FromFile("pic\\2.jpg");}privatevoidbutton2_Click(objectsender,EventArgse){stringstr,sql;str="Server=.;Database=学生信息管理系统;Userid='sa';pwd='167349'";SqlConnectionconn=newSqlConnection(str);conn.Open();sql="select*from教师登入表wherezh='"+textBox1.Text+"'andmima='"+textBox2.Text+"'";Sqlmandcmd=newSqlmand(sql,conn);cmd.mandType=mandType.Text;SqlDataReadersdr;sdr=cmd.ExecuteReader();if(sdr.Read()&&boBox1.Text=="教师"){Form3form2=newForm3();form2.Show();}elseif(boBox1.Text=="请选择")MessageBox.Show("未选择登录选项");elseMessageBox.Show("账号或密码错误!","错误提示",MessageBoxButtons.OK,MessageBoxIcon.Error);}privatevoidbutton3_Click(objectsender,EventArgse){this.Dispose();}}}2、功能页面usingSystem;usingSystem.Collections.Generic;usingSystem.ponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespace测试{publicpartialclassForm3:Form{publicForm3(){Initializeponent();}privatevoidradioButton1_CheckedChanged(objectsender,EventArgse){}privatevoidradioButton2_CheckedChanged(objectsender,EventArgse){}privatevoidradioButton3_CheckedChanged(objectsender,EventArgse){}privatevoidradioButton4_CheckedChanged(objectsender,EventArgse){}privatevoidbutton2_Click(objectsender,EventArgse){if(radioButton1.Checked){Form4f=newForm4();f.Show();}if(radioButton2.Checked){Form5f=newForm5();f.Show();}if(radioButton3.Checked){Form6f=newForm6();f.Show();}if(radioButton4.Checked){Form7f=newForm7();f.Show();}}privatevoidbutton1_Click(objectsender,EventArgse){this.Dispose();}privatevoidgroupBox1_Enter(objectsender,EventArgse){}privatevoidlabel2_Click(objectsender,EventArgse){}}}系统功能:查询usingSystem;usingSystem.Collections.Generic;usingSystem.ponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespace测试{publicpartialclassForm4:Form{publicForm4(){Initializeponent();}privatevoiddataGridView1_CellContentClick(objectsender,DataGridViewCellEventArgse){}privatevoidbutton1_Click(objectsender,EventArgse)//查询{stringstr="Server=.;Database=学生信息管理系统;Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="Select
,性别,专业,班级
From
stu
where
学号
=
'"+textBox1.Text+"'";SqlDataAdapterdr=newSqlDataAdapter(sqlstr,con);DataSetDataSet1=newDataSet();dr.Fill(DataSet1,"stu");dataGridView1.DataSource=DataSet1.Tables["stu"];}privatevoidbutton2_Click(objectsender,EventArgse){this.Dispose();}privatevoidbutton3_Click(objectsender,EventArgse){Form3thild=newForm3();thild.Show();this.Dispose();}privatevoidForm4_Load(objectsender,EventArgse){}}}删除usingSystem;usingSystem.Collections.Generic;usingSystem.ponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespace测试{publicpartialclassForm5:Form{publicForm5(){Initializeponent();}privatevoidbutton1_Click(objectsender,EventArgse){stringstr="Server=.;Database=学生信息管理系统;Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="Select
,性别,专业,班级
From
stu
where
学号
=
'"+textBox1.Text+"'";SqlDataAdapterdr=newSqlDataAdapter(sqlstr,con);DataSetDataSet1=newDataSet();dr.Fill(DataSet1,"stu");dataGridView1.DataSource=DataSet1.Tables["stu"];}privatevoidbutton2_Click(objectsender,EventArgse){stringstr="Server=.;Database=学生信息管理系统;Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="delete
From
stu
where
学号='"+textBox1.Text+"'";Sqlmandmy2=newSqlmand(sqlstr,con);con.Open();my2.ExecuteNonQuery();MessageBox.Show("该学生信息删除成功!","恭喜",MessageBoxButtons.OK,MessageBoxIcon.Information);}privatevoidbutton3_Click(objectsender,EventArgse){Form3thild=newForm3();thild.Show();this.Dispose();}privatevoidbutton4_Click(objectsender,EventArgse){this.Dispose();}privatevoidForm5_Load(objectsender,EventArgse){}}}更改usingSystem;usingSystem.Collections.Generic;usingSystem.ponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespace测试{publicpartialclassForm6:Form{publicForm6(){Initializeponent();}privatevoidgroupBox1_Enter(objectsender,EventArgse){}privatevoidtextBox2_TextChanged(objectsender,EventArgse){}privatevoidbutton2_Click(objectsender,EventArgse){StringSex;if(radioButton1.Checked==true){Sex="男";}else{Sex="女";}stringstr="Server=.;Database=学生信息管理系统;Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="update
stu
set
学号='"+textBox2.Text+"'
,='"+textBox3.Text+"',性别='"+Sex+"',专业='"+textBox6.Text+"',年龄='"+textBox5.Text+"',班级='"+textBox4.Text+"'
Where
学号='"+textBox1.Text+"'";Sqlmandmy1=newSqlmand(sqlstr,con);con.Open();my1.ExecuteNonQuery();MessageBox.Show("该学生信息更新成功!","恭喜",MessageBoxButtons.OK,MessageBoxIcon.Information);con.Close();}privatevoidbutton1_Click(objectsender,EventArgse){stringstr="Server=.;Database=学生信息管理系统;Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="Select
学号,,专业,性别,年龄,班级
From
stu
where
学号
=
'"+textBox1.Text+"'";SqlDataAdapterdr=newSqlDataAdapter(sqlstr,con);DataSetDataSet1=newDataSet();dr.Fill(DataSet1,"stu");dataGridView1.DataSource=DataSet1.Tables["stu"];}privatevoidbutton3_Click_1(objectsender,EventArgse){Form3fiveth=newForm3();fiveth.Show();this.Dispose();}privatevoidForm6_Load(objectsender,EventArgse){}}}添加usingSystem;usingSystem.Collections.Generic;usingSystem.ponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespace测试{publicpartialclassForm7:Form{publicForm7(){Initializeponent();}privatevoidlabel1_Click(objectsender,EventArgse){}privatevoidbutton1_Click(objectsender,EventArgse){StringSex;if(radioButton1.Checked==true){Sex="男";}else{Sex="女";}stringstr="Server=.;Database=学生信息管理系统;Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnectio
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【正版授权】 IEC TS 63165:2024 EN Requirements for industrial water quality analyzer system – Photometry
- 2025年浙江省安全员-C证考试(专职安全员)题库及答案
- 2025-2030年中国钢材加工配送中心行业运行态势及发展规划分析报告
- 2025-2030年中国金融信息化行业运营状况及发展前景分析报告
- 2025-2030年中国酒石酸美托洛尔缓释片行业运行动态与十三五规划研究报告
- 2025-2030年中国螺旋泵市场运营状况及发展前景分析报告
- 2025-2030年中国薯条行业运行状况与前景趋势分析报告
- 西双版纳职业技术学院《集装箱与国际物流运输管理》2023-2024学年第二学期期末试卷
- 河北师范大学《节目策划》2023-2024学年第二学期期末试卷
- 西京学院《商务应用文写作》2023-2024学年第二学期期末试卷
- 现代康复治疗腕管综合症
- 福建公安基础知识真题汇编2
- 2024年金融理财-特许金融分析CFA考试近5年真题附答案
- 2024桥式门式起重机大修项目及其技术标准
- 部编版七年级历史下册全册导学案
- 2024风力发电叶片维保作业技术规范
- 公路工程监理工作指导手册
- 第2课 玩泥巴(课件)科学一年级下册
- 学校临聘人员规范管理自查报告
- 小学数学课堂有效教学现状调查问卷分析报告
- 食材配送服务方案投标方案(技术方案)
评论
0/150
提交评论