數(shù)據(jù)庫課程設(shè)計學生信息管理系統(tǒng)_第1頁
數(shù)據(jù)庫課程設(shè)計學生信息管理系統(tǒng)_第2頁
數(shù)據(jù)庫課程設(shè)計學生信息管理系統(tǒng)_第3頁
數(shù)據(jù)庫課程設(shè)計學生信息管理系統(tǒng)_第4頁
數(shù)據(jù)庫課程設(shè)計學生信息管理系統(tǒng)_第5頁
已閱讀5頁,還剩13頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論