




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、 安徽工業(yè)大學工商學院數(shù)據(jù)庫課程設計報告學生信息管理系統(tǒng) 姓名:金村界 學號:141842211 專業(yè):計算機科學與技術 班級:計1441 教師:甘麗1、 題目:學生信息管理系統(tǒng) 學生信息管理是一個教育單位不可缺少的部分,它的內(nèi)容對于學校的決策者和管理者來說都是至關重要的。所以學生信息管理系統(tǒng)應該能夠為用戶提供充足的信息和快捷的查詢手段。本系統(tǒng)采用Microsoft Visual Studio 2010作為開發(fā)工具,Microsoft SQL Server 2012建立數(shù)據(jù)庫,并進行初始數(shù)據(jù)輸入,在進行界面的設計和代碼的編寫,界面簡潔,功能明確,方便了工作人員的操作。二、開發(fā)工具:Micros
2、oft Visual Studio 2010三、數(shù)據(jù)庫:Microsoft SQL Server 2012 Microsoft SQL Server 2012是一套完整的數(shù)據(jù)庫和分析產(chǎn)品,具有高度的可擴展性和可靠性,對市場的快速反應能力強,可以快速構建各種業(yè)務和方案,具有高度的安全性保障。四、操作系統(tǒng):Microsoft windows 10五、功能圖登錄添加更改刪除 查詢6、 用戶視圖與代碼1、登錄頁面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 測試 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 = "學生") 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=學生信息管理系統(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 = "請選擇") MessageBox.Show("未選擇登錄選項"); else MessageBox.Show("賬
7、號或密碼錯誤!", "錯誤提示", 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.
8、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(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) 查詢 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 測試 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) /查詢 string str = "Server=.;Database=學生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "Select 姓名,性別,專業(yè),班級
13、0;From stu where 學號 = '" + 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 測試 public partial class Form5 : Form public Form5() InitializeComponent(); private void button1_Click(object sender, EventArgs e) string str = "Server=.;Database=學生信
16、息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "Select 姓名,性別,專業(yè),班級 From stu where 學號 = '" + 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=學生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlCon
18、nection(str); String sqlstr = "delete From stu where 學號='" + textBox1.Text + "'" SqlCommand mycom2 = new SqlCommand(sqlstr, con); con.Open(); mycom2.ExecuteNonQuery(); MessageBox.Show("該學生信息刪除成功!", "恭喜", 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 測試 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=學生信息管理系統(tǒng);User id='sa'pwd='1
22、67349'" SqlConnection con = new SqlConnection(str); String sqlstr = "update stu set 學號='" + textBox2.Text + "' ,姓名='" + textBox3.Text + "',性別='" + Sex + "',專業(yè)='" + textBox6.Text + "',年齡='&qu
23、ot; + textBox5.Text + "',班級='" + textBox4.Text + "' Where 學號='" + textBox1.Text + "'" SqlCommand mycom1 = new SqlCommand(sqlstr, con); con.Open(); mycom1.ExecuteNonQuery(); MessageBox.Show("該學生信息更新成功!", "恭喜", MessageBoxB
24、uttons.OK, MessageBoxIcon.Information); con.Close(); private void button1_Click(object sender, EventArgs e) string str = "Server=.;Database=學生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "Select 學號,姓名,專業(yè),性別,年齡,班級
25、0;From stu where 學號 = '" + 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 測試 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=學生信息管理系統(tǒng);User id='sa'pwd='167349'" SqlConnection con = new SqlConnection(str); String sqlstr = "insert into stu(學號,姓名,性別,專業(yè),年齡,班級)
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 零售企業(yè)數(shù)字化供應鏈協(xié)同報告:供應鏈協(xié)同與供應鏈協(xié)同風險管理策略優(yōu)化實踐報告001
- 短視頻平臺內(nèi)容監(jiān)管法規(guī)與2025年社會責任實踐案例解析報告
- 2025年食品行業(yè)食品安全追溯體系與食品質(zhì)量安全管理法規(guī)研究報告
- 2025年鄉(xiāng)村旅游項目旅游與城市形象提升研究報告
- 量子計算技術在金融風險模擬領域的應用現(xiàn)狀與未來趨勢報告
- 尿液分析比對試驗報告表
- 房屋買賣合同書(中介標準)
- 2025-2030中國防水硅膠革行業(yè)競爭策略與應用前景預測報告
- 2025-2030中國鏵式犁行業(yè)發(fā)展趨勢與投資動態(tài)預測報告
- 2025-2030中國鋼螺旋鉆頭行業(yè)產(chǎn)銷狀況與前景動態(tài)預測報告
- Seldinger穿刺技術課件
- 船體結構與制圖知到智慧樹期末考試答案題庫2025年華中科技大學
- 2025年度醫(yī)療機構應急預案演練計劃
- 過戶光伏合同能源管理協(xié)議
- 2025至2030年中國稀奶油市場分析及競爭策略研究報告
- 藥店考核試題及答案
- 智慧礦山無人機自動巡檢解決方案
- 海南2025年中國熱帶農(nóng)業(yè)科學院椰子研究所高層次人才引進(第1號)筆試歷年參考題庫附帶答案詳解
- 抽水蓄能電站全生命周期成本控制及優(yōu)化方案研究
- 2025-2030智能制造裝備行業(yè)市場發(fā)展分析及前景趨勢與投資研究報告
- 顳下頜關節(jié)紊亂病
評論
0/150
提交評論