版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
安徽工業(yè)大學工商學院數(shù)據(jù)庫課程設(shè)計報告學生信息管理系統(tǒng)姓名:學號:專業(yè):計算機科學與技術(shù)班級:計1441教師:2017.1.3題目:學生信息管理系統(tǒng)學生信息管理是一個教育單位不可缺少的部分,它的內(nèi)容對于學校的決策者和管理者來說都是至關(guān)重要的。所以學生信息管理系統(tǒng)應該能夠為用戶提供充足的信息和快捷的查詢手段。本系統(tǒng)采用MicrosoftVisualStudio2010作為開發(fā)工具,MicrosoftSQLServer2012建立數(shù)據(jù)庫,并進行初始數(shù)據(jù)輸入,在進行界面的設(shè)計和代碼的編寫,界面簡潔,功能明確,方便了工作人員的操作。二、開發(fā)工具:MicrosoftVisualStudio2010三、數(shù)據(jù)庫:MicrosoftSQLServer2012MicrosoftSQLServer2012是一套完整的數(shù)據(jù)庫和分析產(chǎn)品,具有高度的可擴展性和可靠性,對市場的快速反應能力強,可以快速構(gòu)建各種業(yè)務(wù)和方案,具有高度的安全性保障。四、操作系統(tǒng):Microsoftwindows10五、功能圖登錄登錄添加更改刪除查詢添加更改刪除查詢用戶視圖與代碼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=學生信息管理系統(tǒng);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){}}}系統(tǒng)功能:查詢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=學生信息管理系統(tǒng);Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="Select
姓名,性別,專業(yè),班級
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.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=學生信息管理系統(tǒng);Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="Select
姓名,性別,專業(yè),班級
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=學生信息管理系統(tǒng);Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="delete
From
stu
where
學號='"+textBox1.Text+"'";SqlCommandmycom2=newSqlCommand(sqlstr,con);con.Open();mycom2.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.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespace測試{publicpartialclassForm6:Form{publicForm6(){InitializeComponent();}privatevoidgroupBox1_Enter(objectsender,EventArgse){}privatevoidtextBox2_TextChanged(objectsender,EventArgse){}privatevoidbutton2_Click(objectsender,EventArgse){StringSex;if(radioButton1.Checked==true){Sex="男";}else{Sex="女";}stringstr="Server=.;Database=學生信息管理系統(tǒng);Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="update
stu
set
學號='"+textBox2.Text+"'
,姓名='"+textBox3.Text+"',性別='"+Sex+"',專業(yè)='"+textBox6.Text+"',年齡='"+textBox5.Text+"',班級='"+textBox4.Text+"'
Where
學號='"+textBox1.Text+"'";SqlCommandmycom1=newSqlCommand(sqlstr,con);con.Open();mycom1.ExecuteNonQuery();MessageBox.Show("該學生信息更新成功!","恭喜",MessageBoxButtons.OK,MessageBoxIcon.Information);con.Close();}privatevoidbutton1_Click(objectsender,EventArgse){stringstr="Server=.;Database=學生信息管理系統(tǒng);Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="Select
學號,姓名,專業(yè),性別,年齡,班級
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.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespace測試{publicpartialclassForm7:Form{publicForm7(){InitializeComponent();}privatevoidlabel1_Click(objectsender,EventArgse){}privatevoidbutton1_Click(objectsender,EventArgse){StringSex;if(radioButton1.Checked==true){Sex="男";}else{Sex="女";}stringstr="Server=.;Database=學生信息管理系統(tǒng);Userid='sa';pwd='167349'";SqlConnectioncon=newSqlConnection(str);Stringsqlstr="insert
into
stu(學號,姓名,性別,專業(yè),年齡,班級)
values
(
'"+textBox1.Text+"',
'"+textBox2.Text+"','"+Sex+"','"+textBox3.Text+"','"+textBox4.Text+"','"+textBox5.Text+"')";SqlCommandmycom1=newSqlCommand(sqlstr,con);con.Open();mycom1.ExecuteNonQuery();MessageBox.Show("該學生信息添加成功!","恭喜",MessageBoxButtons.OK,MessageBoxIcon.Information);con.Close();}privatevoidbutton2_Click(objectsender,EventArgse){Form3fiveth=newForm3();fiveth.Show();this.Dispose();}privatevoidbutton3_Cl
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 《車用驅(qū)動電機原理與控制基礎(chǔ) 第2版》 課件英文 Chapter 3 Electromechanical Energy Conversion
- 泊船瓜洲課件教學課件
- 陜西省漢中市(2024年-2025年小學四年級語文)統(tǒng)編版開學考試(下學期)試卷及答案
- 江西省新余市(2024年-2025年小學四年級語文)統(tǒng)編版質(zhì)量測試((上下)學期)試卷及答案
- 長江課件教學
- 河北醫(yī)科大學第二醫(yī)院招聘工作人員考試試卷及答案
- 2024年溫室灌溉營養(yǎng)液自動配置與施肥設(shè)備項目合作計劃書
- 2024年自動化X光檢查機項目發(fā)展計劃
- 處理人際交往關(guān)系技巧培訓18溝通你我他
- 2024年高效照明電器產(chǎn)品項目建議書
- 第八屆全國醫(yī)藥行業(yè)特有職業(yè)技能競賽(中藥調(diào)劑員)考試題及答案
- 2024-2030年中國奶茶粉市場競爭格局現(xiàn)狀與投資商機調(diào)研報告
- 2018低壓電力線高速載波通信互聯(lián)互通技術(shù)規(guī)范第3部分:檢驗方法
- 鋼琴基礎(chǔ)教程(第一冊)
- 中華民族現(xiàn)代文明有哪些鮮明特質(zhì)?建設(shè)中華民族現(xiàn)代文明的路徑是什么?參考答案02
- 2024-2030年中國心電圖行業(yè)市場發(fā)展趨勢與前景展望戰(zhàn)略分析報告
- 2024-2030年中國鹽堿地治理市場前景研發(fā)趨勢與未來發(fā)展戰(zhàn)略規(guī)劃研究報告
- 6.2交友的智慧 課件-2024-2025學年道德與法治七年級上冊(統(tǒng)編版2024)
- 數(shù)據(jù)交易場所發(fā)展指數(shù)研究報告(2024年)
- 2024年浙江省杭州市上城區(qū)殘疾人聯(lián)合會招聘編外1人歷年(高頻重點復習提升訓練)共500題附帶答案詳解
- 人力資源輸送協(xié)議范本示例
評論
0/150
提交評論