




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、 安徽工業(yè)大學(xué)工商學(xué)院數(shù)據(jù)庫(kù)課程設(shè)計(jì)報(bào)告學(xué)生信息管理系統(tǒng) 姓名:金村界 學(xué)號(hào):141842211 專(zhuān)業(yè):計(jì)算機(jī)科學(xué)與技術(shù) 班級(jí):計(jì)1441 教師:甘麗1、 題目:學(xué)生信息管理系統(tǒng) 學(xué)生信息管理是一個(gè)教育單位不可缺少的部分,它的內(nèi)容對(duì)于學(xué)校的決策者和管理者來(lái)說(shuō)都是至關(guān)重要的。所以學(xué)生信息管理系統(tǒng)應(yīng)該能夠?yàn)橛脩?hù)提供充足的信息和快捷的查詢(xún)手段。本系統(tǒng)采用Microsoft Visual Studio 2010作為開(kāi)發(fā)工具,Microsoft SQL Server 2012建立數(shù)據(jù)庫(kù),并進(jìn)行初始數(shù)據(jù)輸入,在進(jìn)行界面的設(shè)計(jì)和代碼的編寫(xiě),界面簡(jiǎn)潔,功能明確,方便了工作人員的操作。二、開(kāi)發(fā)工具:Micros
2、oft Visual Studio 2010三、數(shù)據(jù)庫(kù):Microsoft SQL Server 2012 Microsoft SQL Server 2012是一套完整的數(shù)據(jù)庫(kù)和分析產(chǎn)品,具有高度的可擴(kuò)展性和可靠性,對(duì)市場(chǎng)的快速反應(yīng)能力強(qiáng),可以快速構(gòu)建各種業(yè)務(wù)和方案,具有高度的安全性保障。四、操作系統(tǒng):Microsoft windows 10五、功能圖登錄添加更改刪除 查詢(xún)6、 用戶(hù)視圖與代碼1、登錄頁(yè)面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;usin
3、g System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace 測(cè)試 public partial class Form1 : Form public Form1() InitializeComponent(); private void label1_Click(object sender, EventArgs e) private void comboBox1_SelectedIndexChanged(object se
4、nder, 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 = "Server=
5、.;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 SqlCommand(sql
6、, 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、功能頁(yè)面 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.
8、Text;using System.Windows.Forms;namespace 測(cè)試 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(obje
9、ct 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
10、= 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) 查詢(xún) using System;using Sys
11、tem.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 測(cè)試 public partial class Form4 : Form public Form4() InitializeComponent(); private void dataGridView1_CellCo
12、ntentClick(object sender, DataGridViewCellEventArgs e) private void button1_Click(object sender, EventArgs e) /查詢(xún) string str = "Server=.;Database=學(xué)生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "Select 姓名,性別,專(zhuān)業(yè),班級(jí)
13、0;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 button2_Click
14、(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 Syst
15、em.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace 測(cè)試 public partial class Form5 : Form public Form5() InitializeComponent(); private void button1_Click(object sender, EventArgs e) string str = "Server=.;Database=學(xué)生信
16、息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "Select 姓名,性別,專(zhuān)業(yè),班級(jí) From stu where 學(xué)號(hào) = '" + textBox1.Text + "'" SqlDataAdapter dr = new SqlDataAdapter(sqlstr, con); DataSe
17、t 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 = new SqlCon
18、nection(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é)生信息刪除成功!", "恭喜", MessageBoxButtons.OK,
19、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.Col
20、lections.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 測(cè)試 public partial class Form6 : Form public Form6() InitializeComponent(); private void groupBox1_Enter(object send
21、er, 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'pwd='1
22、67349'" SqlConnection con = new SqlConnection(str); String sqlstr = "update stu set 學(xué)號(hào)='" + textBox2.Text + "' ,姓名='" + textBox3.Text + "',性別='" + Sex + "',專(zhuān)業(yè)='" + textBox6.Text + "',年齡='&qu
23、ot; + textBox5.Text + "',班級(jí)='" + textBox4.Text + "' Where 學(xué)號(hào)='" + textBox1.Text + "'" SqlCommand mycom1 = new SqlCommand(sqlstr, con); con.Open(); mycom1.ExecuteNonQuery(); MessageBox.Show("該學(xué)生信息更新成功!", "恭喜", MessageBoxB
24、uttons.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),姓名,專(zhuān)業(yè),性別,年齡,班級(jí)
25、0;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 button3_Cli
26、ck_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;
27、using System.Windows.Forms;using System.Data.SqlClient;namespace 測(cè)試 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),姓名,性別,專(zhuān)業(yè),年齡,班級(jí))
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 動(dòng)脈瘤術(shù)后的護(hù)理
- 公交員工教育培訓(xùn)
- 中學(xué)音樂(lè)教育體系構(gòu)建與實(shí)踐路徑
- 裝修電銷(xiāo)話(huà)術(shù)培訓(xùn)
- 中職教育發(fā)展探索與實(shí)踐
- 特殊口腔護(hù)理
- 2025年海洋生態(tài)保護(hù)與修復(fù)政策對(duì)海洋生態(tài)系統(tǒng)服務(wù)功能可持續(xù)性提升策略報(bào)告
- 休閑農(nóng)業(yè)與鄉(xiāng)村旅游融合發(fā)展規(guī)劃報(bào)告:鄉(xiāng)村旅游與旅游產(chǎn)業(yè)融合的商業(yè)模式創(chuàng)新001
- 繪畫(huà)火龍果課件
- 小學(xué)數(shù)學(xué)教師入職面試培訓(xùn)
- 車(chē)輛進(jìn)廠出廠管理制度
- 安全生產(chǎn)月題庫(kù)-2025年安全生產(chǎn)月安全知識(shí)競(jìng)賽題庫(kù)(附題目答案)
- 2025-2030年古建筑行業(yè)市場(chǎng)深度調(diào)研及前景趨勢(shì)與投資研究報(bào)告
- 2024年貴州省黔西縣教育局公開(kāi)招聘試題含答案分析
- 集裝箱投資項(xiàng)目可行性研究報(bào)告
- 拆分合同:合伙企業(yè)解散及債務(wù)分擔(dān)協(xié)議
- 2025河北邯鄲市肥鄉(xiāng)區(qū)選聘農(nóng)村黨務(wù)(村務(wù))工作者100人筆試參考題庫(kù)完整參考答案詳解
- 2025年中小學(xué)美術(shù)教師招聘考試美術(shù)專(zhuān)業(yè)知識(shí)必考題庫(kù)及答案(共170題)
- 2025年05月四川阿壩州級(jí)事業(yè)單位公開(kāi)選調(diào)工作人員78人筆試歷年典型考題(歷年真題考點(diǎn))解題思路附帶答案詳解
- 2025-2030中國(guó)硫酸鈣晶須行業(yè)市場(chǎng)發(fā)展現(xiàn)狀及競(jìng)爭(zhēng)格局與投資發(fā)展研究報(bào)告
- DB31/T 1035-2017綠化有機(jī)覆蓋物應(yīng)用技術(shù)規(guī)范
評(píng)論
0/150
提交評(píng)論