




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
工業大學工商學院數據庫課程設計報告學生信息管理系統:金村界學號: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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 船舶電子電氣技術專業教學標準(高等職業教育專科)2025修訂
- 2025年中國堅果禮盒行業市場全景分析及前景機遇研判報告
- 2025-2030年中國PLUS模塊行業深度研究分析報告
- 中國剪切板行業市場調查研究及投資潛力預測報告
- 家具工藝培訓課件
- 2024年全球及中國食品和飲料軟管行業頭部企業市場占有率及排名調研報告
- 2025年 化工自動化控制儀表操作證考試練習題附答案
- 2025年 國科大附屬學校招聘教師考試試題附答案
- 2024年中國功能性涂布膠膜行業調查報告
- 2025年中國塑合行業市場發展前景及發展趨勢與投資戰略研究報告
- 2025年新疆中考數學真題試卷及答案
- 2025-2030年中國茶具行業深度分析及發展前景與發展戰略研究報告
- 2025年山東省高考招生統一考試高考真題化學試卷(真題+答案)
- 2025至2030年中國月子中心行業競爭格局分析及市場前景趨勢報告
- 2025年山煤國際招聘筆試沖刺題(帶答案解析)
- 2024-2025學年七年級英語下學期期末模擬試卷(外研版2024)
- 2024年涼山昭覺縣委社會工作部選聘社區工作者真題
- 2025年山東省濟南市長清區中考二模道德與法治試題(含答案)
- 冠心病的規范化診培訓課件
- 未來中國檢測市場發展趨勢簡析(精)
- 2025年AI+賦能中小企業:出海營銷的創新與發展
評論
0/150
提交評論