数据库课程设计学生信息管理系统.docx
- 文档编号:1799881
- 上传时间:2022-10-24
- 格式:DOCX
- 页数:15
- 大小:270.69KB
数据库课程设计学生信息管理系统.docx
《数据库课程设计学生信息管理系统.docx》由会员分享,可在线阅读,更多相关《数据库课程设计学生信息管理系统.docx(15页珍藏版)》请在冰豆网上搜索。
数据库课程设计学生信息管理系统
安徽工业大学工商学院
数据库课程设计报告
学生信息管理系统
姓名:
学号:
专业:
计算机科学与技术
班级:
计1441
教师:
2017.1.3
1、题目:
学生信息管理系统
学生信息管理是一个教育单位不可缺少的部分,它的内容对于学校的决策者和管理者来说都是至关重要的。
所以学生信息管理系统应该能够为用户提供充足的信息和快捷的查询手段。
本系统采用MicrosoftVisualStudio2010作为开发工具,MicrosoftSQLServer2012建立数据库,并进行初始数据输入,在进行界面的设计和代码的编写,界面简洁,功能明确,方便了工作人员的操作。
二、开发工具:
MicrosoftVisualStudio2010
三、数据库:
MicrosoftSQLServer2012
MicrosoftSQLServer2012是一套完整的数据库和分析产品,具有高度的可扩展性和可靠性,对市场的快速反应能力强,可以快速构建各种业务和方案,具有高度的安全性保障。
四、操作系统:
Microsoftwindows10
五、功能图
6、用户视图与代码
1、登录页面
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Windows.Forms;
usingSystem.Data.SqlClient;
namespace测试
{
publicpartialclassForm1:
Form
{
publicForm1()
{
InitializeComponent();
}
privatevoidlabel1_Click(objectsender,EventArgse)
{
}
privatevoidcomboBox1_SelectedIndexChanged(objectsender,EventArgse)
{
if(comboBox1.Text=="学生")
pictureBox1.Image=Image.FromFile("pic\\1.jpg");
if(comboBox1.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+"'";
SqlCommandcmd=newSqlCommand(sql,conn);
cmd.CommandType=CommandType.Text;
SqlDataReadersdr;
sdr=cmd.ExecuteReader();
if(sdr.Read()&&comboBox1.Text=="教师")
{
Form3form2=newForm3();form2.Show();
}
elseif(comboBox1.Text=="请选择")
MessageBox.Show("未选择登录选项");
elseMessageBox.Show("账号或密码错误!
","错误提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
privatevoidbutton3_Click(objectsender,EventArgse)
{
this.Dispose();
}
}
}
2、功能页面
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Windows.Forms;
namespace测试
{
publicpartialclassForm3:
Form
{
publicForm3()
{
InitializeComponent();
}
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)
{
}
}
}
系统功能:
(1)查询
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Windows.Forms;
usingSystem.Data.SqlClient;
namespace测试
{
publicpartialclassForm4:
Form
{
publicForm4()
{
InitializeComponent();
}
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)
{
}
}
}
(2)删除
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Windows.Forms;
usingSystem.Data.SqlClient;
namespace测试
{
publicpartialclassForm5:
Form
{
publicForm5()
{
InitializeComponent();
}
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);
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数据库 课程设计 学生 信息管理 系统