




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、 安徽工業(yè)大學(xué)工商學(xué)院數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告學(xué)生信息管理系統(tǒng) 姓名:金村界 學(xué)號(hào):141842211 專業(yè):計(jì)算機(jī)科學(xué)與技術(shù) 班級(jí):計(jì)1441 教師:甘麗2017.1.31、 題目:學(xué)生信息管理系統(tǒng) 學(xué)生信息管理是一個(gè)教育單位不可缺少的部分,它的內(nèi)容對(duì)于學(xué)校的決策者和管理者來說都是至關(guān)重要的。所以學(xué)生信息管理系統(tǒng)應(yīng)該能夠?yàn)橛脩籼峁┏渥愕男畔⒑涂旖莸牟樵兪侄巍1鞠到y(tǒng)采用Microsoft Visual Studio 2010作為開發(fā)工具,Microsoft SQL Server 2012建立數(shù)據(jù)庫,并進(jìn)行初始數(shù)據(jù)輸入,在進(jìn)行界面的設(shè)計(jì)和代碼的編寫,界面簡潔,功能明確,方便了工作人員的操作。二、開發(fā)工
2、具:Microsoft Visual Studio 2010三、數(shù)據(jù)庫:Microsoft SQL Server 2012 Microsoft SQL Server 2012是一套完整的數(shù)據(jù)庫和分析產(chǎn)品,具有高度的可擴(kuò)展性和可靠性,對(duì)市場的快速反應(yīng)能力強(qiáng),可以快速構(gòu)建各種業(yè)務(wù)和方案,具有高度的安全性保障。四、操作系統(tǒng):Microsoft windows 10五、功能圖登錄添加更改刪除 查詢6、 用戶視圖與代碼1、登錄頁面using System;using System.Collections.Generic;using System.ComponentModel;using System.D
3、ata;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(o
4、bject sender, EventArgs e) if (comboBox1.Text = "學(xué)生") 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 = "
5、;Server=.;Database=學(xué)生信息管理系統(tǒng);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 SqlCom
6、mand(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 = "請(qǐng)選擇") MessageBox.Show("未選擇登錄選項(xiàng)"); else MessageBox.Show
7、("賬號(hào)或密碼錯(cuò)誤!", "錯(cuò)誤提示", 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
8、 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_CheckedChan
9、ged(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)
10、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) 系統(tǒng)功能:(1) 查詢 using System;u
11、sing 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 dataGridView
12、1_CellContentClick(object sender, DataGridViewCellEventArgs e) private void button1_Click(object sender, EventArgs e) /查詢 string str = "Server=.;Database=學(xué)生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "Select 姓名,性別,專
13、業(yè),班級(jí) From stu where 學(xué)號(hào) = '" + textBox1.Text + "'" SqlDataAdapter dr = new SqlDataAdapter(sqlstr,con); DataSet DataSet1 = new DataSet(); dr.Fill(DataSet1,"stu"); dataGridView1.DataSource = DataSet1.Tables"stu" private void butto
14、n2_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;us
15、ing 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=.;Data
16、base=學(xué)生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "Select 姓名,性別,專業(yè),班級(jí) From stu where 學(xué)號(hào) = '" + textBox1.Text + "'" SqlDataAdapter dr = new SqlDataAdapter(sqlstr, con)
17、; 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=學(xué)生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = ne
18、w SqlConnection(str); String sqlstr = "delete From stu where 學(xué)號(hào)='" + textBox1.Text + "'" SqlCommand mycom2 = new SqlCommand(sqlstr, con); con.Open(); mycom2.ExecuteNonQuery(); MessageBox.Show("該學(xué)生信息刪除成功!", "恭喜", MessageBoxButt
19、ons.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 Sy
20、stem.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(obj
21、ect 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=學(xué)生信息管理系統(tǒng);User id='sa'pw
22、d='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "update stu set 學(xué)號(hào)='" + textBox2.Text + "' ,姓名='" + textBox3.Text + "',性別='" + Sex + "',專業(yè)='" + textBox6.Text + "',年齡=
23、'" + textBox5.Text + "',班級(jí)='" + textBox4.Text + "' Where 學(xué)號(hào)='" + textBox1.Text + "'" SqlCommand mycom1 = new SqlCommand(sqlstr, con); con.Open(); mycom1.ExecuteNonQuery(); MessageBox.Show("該學(xué)生信息更新成功!", "恭喜", Mes
24、sageBoxButtons.OK, MessageBoxIcon.Information); con.Close(); private void button1_Click(object sender, EventArgs e) string str = "Server=.;Database=學(xué)生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "Select 學(xué)號(hào),姓名,專業(yè),性別,年
25、齡,班級(jí) From stu where 學(xué)號(hào) = '" + textBox1.Text + "'" SqlDataAdapter dr = new SqlDataAdapter(sqlstr, con); DataSet DataSet1 = new DataSet(); dr.Fill(DataSet1, "stu"); dataGridView1.DataSource = DataSet1.Tables"stu" private void but
26、ton3_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 Syst
27、em.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=學(xué)生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "insert into stu(學(xué)號(hào),姓名,性別,專業(yè),年齡,班級(jí))
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度競業(yè)協(xié)議失效一個(gè)月競業(yè)限制解除補(bǔ)償合同
- 二零二五年度大型商場裝修合同(含室內(nèi)外環(huán)境美化)
- 二零二五年度特色主題展臺(tái)設(shè)計(jì)制作安裝一體化合同
- 二零二五年度紋身技藝培訓(xùn)與加盟合作協(xié)議
- 二零二五年度新能源產(chǎn)業(yè)臨時(shí)研發(fā)人員服務(wù)協(xié)議
- 2025年度網(wǎng)絡(luò)安全防護(hù)合同價(jià)款調(diào)整與網(wǎng)絡(luò)安全事件應(yīng)對(duì)
- 二零二五年度虛擬現(xiàn)實(shí)產(chǎn)業(yè)利潤分配協(xié)議書
- 二零二五年度搏擊教練員免責(zé)責(zé)任書
- 農(nóng)業(yè)現(xiàn)代化技術(shù)推廣合作協(xié)議
- 智能建筑系統(tǒng)合同
- 新生兒腸道病毒感染
- 2025年度專業(yè)酒店裝修承攬合同
- 2025年度5G基站建設(shè)勞務(wù)合同范本
- (完整版)班主任量化考核細(xì)則
- 2025年中國鐵路鄭州局集團(tuán)有限公司招聘筆試參考題庫含答案解析
- 2025年上半年永春縣農(nóng)文旅發(fā)展集團(tuán)限公司公開招聘若干名工作人員易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- 家庭康復(fù)服務(wù)的商業(yè)價(jià)值與發(fā)展趨勢
- 2025年?;髽I(yè)安全教育培訓(xùn)計(jì)劃
- 《HR的成長之路》課件
- 裝修完成情況報(bào)告范文
- 2024-2024年上海市高考英語試題及答案
評(píng)論
0/150
提交評(píng)論