版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、課程設計(論文)學生信息管理管理系統(tǒng)系 別:計算機科學與技術系專業(yè)(班級):計算機科學與技術2010級1班作者(學號):指 導 教 師:完 成 日 期:摘 要本文描述的是基于Windows環(huán)境的學生管理系統(tǒng),主要功能模塊包括學生信息的添加、修改、查找、刪除。主要工具Microsoft Visual Studio2010設計窗體,SQL server2008建立數(shù)據(jù)庫,實現(xiàn)學生信息管理的基本功能。本篇報告介紹一個學生信息管理系統(tǒng)的從分析到設計最后到實現(xiàn)的全過程,給出了學生信息管理系統(tǒng)的設計和技術實現(xiàn)的過程,特別在細節(jié)上分析功能和函數(shù)的實現(xiàn)思想。涉及到雪上信息管理的基本功能在本報告中都有描述。Ab
2、stractDescribed in this paper is based on the Windows environment management system for students, the main function modules include student information to add, modify, delete, search. The main tool of Microsoft Visual Studio2010 SQL Server2008 design form, database, information management students t
3、o achieve the basic function.This report describes a student information management system from analysis to design to the final realization of the entire process, gives the student information management system design and realization process, especially in the details of analysis function and the fu
4、nction of the realization of ideas. Relate to the snow on the basic functions of information management in this report are described.關鍵詞 數(shù)據(jù)庫,添加,修改,查找,刪除目 錄第一章 概述41.1設計目的41.2開發(fā)工具的選擇41.3開發(fā)環(huán)境41.4 本報告的主要內容4第二章 需求分析52.1 系統(tǒng)需求簡介.2 功能需求的分析52.1.3 性能需求分析5第三章 總體設計63.1 設計概述63.2 系統(tǒng)總體結構及功能模塊劃分63.2.1學生成績
5、查詢模塊63.2.2學生信息管理模塊73.3系統(tǒng)數(shù)據(jù)庫概念結構設計73.3.1系統(tǒng)E-R圖73.4.1 用戶登錄安全性8第四章 詳細設計94.1 概述94.2 系統(tǒng)程序流程圖94.3 系統(tǒng)主要功能模塊簡介104.3.1 系統(tǒng)登錄104.3.2 學生信息添加模塊114.3.3學生信息刪除模塊124.3.4 學生信息查找模塊134.3.5 學生信息修改模塊14第五章 程序設計總結15第六章 結束語16參考文獻17附錄18程序代碼18第一章概述1.1設計目的本課程設計的目的是使學生能熟練掌握簡單的Window窗體應用程序的設計和ADD.net的應用,希望通過本次的鍛煉學生實用c#語言解決實際問題的能
6、力。1.2開發(fā)工具的選擇本系統(tǒng)后臺數(shù)據(jù)庫采用Microsoft SQL Server 數(shù)據(jù)庫,該數(shù)據(jù)庫系統(tǒng)在安全性、準確性和運行速度方面有絕對的優(yōu)勢,并且處理數(shù)據(jù)量大、效率高;前臺采用Microsoft 公司的Visual Studio 2008 作為主要的開發(fā)工具,可與SQL Server 2008 數(shù)據(jù)庫無縫連接。1.3開發(fā)環(huán)境系統(tǒng)開發(fā)平臺:Microsoft Visual Studio2008系統(tǒng)開發(fā)語言:C#數(shù)據(jù)庫管理軟件:SQL Server 20051.4 本報告的主要內容本報告詳細的介紹了學生的信息管理的開發(fā)過程,主要設計到的工作如下:系統(tǒng)的需求分析、系統(tǒng)的總設計、系統(tǒng)的概念設計
7、、系統(tǒng)各模塊的詳細設計、系統(tǒng)運行與測試。第二章需求分析2.1 系統(tǒng)需求簡介2.1.1(1) 根據(jù)查詢條件實現(xiàn)學生信息的查詢(2) 學生信息的添加、刪除、修改(3) 對基本信息完成的增加、刪除、修改時,需要注意表與表之間的關聯(lián)2.1.2 功能需求的分析本系統(tǒng)的功能需求分析如下:學生信息查詢: 學生可以根據(jù)學號、姓名進行查詢學生信息管理: 主要是用于學生信息更改、插入、刪除學生成績錄入: 用于學生成績管理,錄入學生成績,也可以更新2.1.3 性能需求分析(1) 登錄、用戶界面需求: 簡潔、易懂、易用、有好的用戶界面(2) 安全保密需求: 只有憑借用戶名和密碼登錄系統(tǒng),才能進行信息的管理。第三章總體
8、設計3.1 設計概述根據(jù)需求把整體系統(tǒng)分化成不同的模塊,每個模塊完成一個特性的子功能。把著些模塊結合起來組成一個整體。逐一實現(xiàn)各種功能。3.2 系統(tǒng)總體結構及功能模塊劃分經過對系統(tǒng)的需求分析,學生信息管理系統(tǒng)主要劃分為三部分:學生信息查詢,學生信息管理,學生成績錄入三個功能模塊。如圖3.2.1學生信息管理系統(tǒng)學生信息查詢學生信息管理學生成績錄入圖3.2.1 系統(tǒng)的總體結構3.2.1學生成績查詢模塊學生信息查詢: 學生可以根據(jù)學號、姓名、專業(yè)進行查詢。如圖3.2.2學生信息查詢模塊結構 學生信息查詢學號查詢姓名查詢圖3.2.2學生信息管理模塊結構3.2.2學生信息管理模塊學生信息管理: 主要是用
9、于學生信息更新、插入、刪除,如圖3.2.3學生管理模塊結構學生信息管理學生信息更新學生信息錄入學生信息刪除基本信息更新基本信息錄入圖3.2.3 學生信息管理模塊結構3.3系統(tǒng)數(shù)據(jù)庫概念結構設計根據(jù)對數(shù)據(jù)項與數(shù)據(jù)結構的分析,設計出能夠滿足系統(tǒng)需求的各種實體,及他們之間的關系,為后面的邏輯結構設計打下基礎。3.3.1系統(tǒng)E-R圖系統(tǒng)E-R圖可以將各個實體之間的關系顯示出來,將各個實體間的屬性依賴表示明白。如圖3.3.1系統(tǒng)E-R圖結構學生表選課課程表學號姓名性別出生年月課程號課程名先行課學分 圖3.3.1 系統(tǒng)E-R圖結構3.4.1 用戶登錄安全性系統(tǒng)設計了登陸界面,每個合法用戶有用戶名及密碼,只
10、有當用戶輸入正確的用戶名及密碼組合后才能夠對學生信息進行操作。第四章詳細設計4.1 概述詳細設計階段的根本目標是確定應該怎么樣具有的實現(xiàn)所要求的系統(tǒng),也就是說,經過這個階段的設計工作,應該得出目標系統(tǒng)的精確描述,從而在編碼階段可以把這個描述直接翻譯成用某個程序設計語言寫的程序。4.2 系統(tǒng)程序流程圖程序流程圖又稱為程序框架圖,它是歷史悠久使用最廣泛的描述軟件的方法。它可將整個程序的總體流程清楚明白的顯示出來。如圖4.2.1 系統(tǒng)總流程圖結構。開始登陸界面驗證用戶及密碼是否正確系統(tǒng)主界面信息插入信息查找信息刪除退出信息修改結束圖4.2.1 系統(tǒng)總體流程圖4.3 系統(tǒng)主要功能模塊簡介4.3.1 系
11、統(tǒng)登錄用戶憑借用戶名及密碼登錄,成功登錄后可以對學生信息進行操作。用戶界面如圖4.3.1 用戶登錄界面所示。圖4.3.1 用戶登陸界面4.3.2 學生信息添加模塊學生信息添加:在程序主界面(圖4.3.2 程序主界面)通過信息錄入項進入信息添加模塊。通過此模塊,學生可以向數(shù)據(jù)庫中添加學號、姓名、生日及選擇性別。(如圖4.3.3 所示)。圖4.3.2 程序主界面圖4.3.3 信息添加界面4.3.3學生信息刪除模塊學生信息刪除:信息刪除模塊如圖4.3.4,可以通過刪除模塊進行學號或姓名進行信息的刪除。圖4.3.4 信息刪除界面4.3.4 學生信息查找模塊學生信息查找:信息查找模塊如圖4.3.5,可以
12、通過查找模塊進行學號或姓名的查找。圖4.3.5 信息查找界面4.3.5 學生信息修改模塊學生信息修改:信息修改如圖4.3.6,可以通過修改模塊進行信息的修改。圖4.3.6信息修改界面第五章程序設計總結在編程期間,不遇到點困哪似乎是不可能的,正是這些困難,我們才能會收到成功的喜悅,我們才能樂此不疲的進行下去。這是我對此次編程的最大感悟。下面來看看編寫的艱辛歷程:在剛開始的階段,我經常因為單詞的拼錯出現(xiàn)這樣或那樣的錯誤在數(shù)次的錯誤后我吸取教訓在后來的編程中幾乎不出現(xiàn)了這種錯誤。剩下的錯誤就是引用或語法上的錯誤。感到最深刻的是,窗體name后就不能隨意更改了,更改后在編寫的程序的程序中要相應的更新里
13、面的內容。當出現(xiàn)語法錯誤時我因經驗的不足不足很難自己將其更改出來,但通過在網上查詢幾乎都能找到我想要的結果。成功后留下的就是經驗和成就感了,在經驗和成就感的陪伴下我充滿著信心、激情和執(zhí)著。期間還有很多老師和同學的幫助。從中感受到了互動的優(yōu)勢和群眾的力量。第六章結束語為期九周的課程設計結束了,在王老師辛勤代理及同學們的幫助下我逐漸的掌握了一些編程的基本知識!畢竟我完成了教育部給我們規(guī)定的任務,期間,總有很多感觸。內心充滿了感激之情,特別是我們的班主任王老師,在微機房里為我們一遍又一遍的從零點講起細心教導,在我們編程過程中又一個一個的詢問我們的掌握情況。不論遇到什么問題,想想我們的老師,我們總會充
14、滿信心。在老師的關懷下我成功了!此時,言語已無法表達我對老師的感激了!此時無聲勝有聲!參考文獻1 王山,薩師煊高等教育出版社數(shù)據(jù)庫系統(tǒng)概論2 王磊實驗教程3 袁慶龍,候文義Ni-P合金鍍層組織形貌及顯微硬度研究太原理工大學學報,2001,32(1):51-53 4 劉國鈞,王連成圖書館史研究北京:高等教育出版社,1979:15-18,315 孫品一高校學報編輯工作現(xiàn)代化特征中國高等學校自然科學學報研究會科技編輯學論文集(2)北京:北京師范大學出版社,1998:10-226 張和生地質力學系統(tǒng)理論太原:太原理工大學,19987 馮西橋核反應堆壓力容器的LBB分析.北京:清華大學核能技術設計研究院
15、,19978 姜錫洲一種溫熱外敷藥制備方案中國專利:881056078,1983-08-129 GB/T 161591996,漢語拼音正詞法基本規(guī)則S北京:中國標準出版社,199610 謝希德創(chuàng)造學習的思路人民日報,1998-12-25(10)11 王明亮中國學術期刊標準化數(shù)據(jù)庫系統(tǒng)工程的EB/OL附錄程序代碼登陸程序代碼using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using S
16、ystem.Text;using System.Windows.Forms;using DataAccessLayer;namespace StudentMIS public partial class FormLogin : Form public FormLogin() InitializeComponent(); private void buttonok_Click(object sender, EventArgs e) int total = new SQLHelper().login(textBoxusername.Text.Trim(), textBoxpassword.Text
17、.Trim(); if (total 0) FormMain main = new FormMain(); main.Show(); this.Hide(); else MessageBox.Show(用戶名或密碼錯誤, 提示); textBoxusername.Text = ; textBoxpassword.Text = ; textBoxusername.Focus(); private void buttoncancel_Click(object sender, EventArgs e) textBoxusername.Text = ; textBoxpassword.Text = ;
18、 textBoxusername.Focus(); 主函數(shù)程序代碼using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using DataAccessLayer;namespace StudentMIS public partial class FormMain : Form public Form
19、Main() InitializeComponent(); private void 信息錄入ToolStripMenuItem_Click(object sender, EventArgs e) FormAddStudent add = new FormAddStudent(); add.ShowDialog(); if (add.DialogResult = DialogResult.OK) bind(); BindingSource bs = new BindingSource(); public void bind()/刷新網格 bs.DataSource = new SQLHelpe
20、r().CreateTable(); dataGridViewstudent.DataSource = bs; private void FormMain_Load(object sender, EventArgs e) bind(); private void 信息刪除ToolStripMenuItem_Click(object sender, EventArgs e) FormDeleteStudent delete = new FormDeleteStudent(); delete.ShowDialog(); if (delete.DialogResult = DialogResult.
21、OK) bind(); private void 查找信息ToolStripMenuItem_Click(object sender, EventArgs e) FormRearchStudent search = new FormRearchStudent(); search.ShowDialog(); if (search.DialogResult = DialogResult.OK) bind(); private void 修改信息ToolStripMenuItem_Click(object sender, EventArgs e) FormUpdateStudent update =
22、 new FormUpdateStudent(); update.ShowDialog(); if (update.DialogResult = DialogResult.OK) bind(); 添加信息程序代碼using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using DataAccessLa
23、yer;using System.Data.SqlClient;namespace StudentMIS public partial class FormAddStudent : Form public FormAddStudent() InitializeComponent(); private void buttonok_Click(object sender, EventArgs e) string sno = textBoxSno.Text.Trim(); string sname = textBoxSname.Text.Trim(); string sex = comboBoxse
24、x.Text.Trim(); string birthday = textBoxbirthday.Text.Trim(); new StudentDAO().insert(sno,sname,sex,birthday); this.DialogResult = DialogResult.OK; MessageBox.Show(輸入成功); private void buttoncancel_Click(object sender, EventArgs e) textBoxSno.Text = ; textBoxSname.Text = ; comboBoxsex.Text = 男; textB
25、oxbirthday.Text = ; textBoxSno.Focus(); 刪除信息程序代碼using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using DataAccessLayer;namespace StudentMIS public partial class FormDeleteSt
26、udent : Form public FormDeleteStudent() InitializeComponent(); private void buttonok_Click(object sender, EventArgs e) new StudentDAO().deletebysno(textBoxsno.Text.Trim(); this.DialogResult = DialogResult.OK; new StudentDAO().deletebyname(textBoxsname.Text.Trim(); MessageBox.Show(刪除成功); this.DialogR
27、esult = DialogResult.OK; private void buttoncancel_Click(object sender, EventArgs e) textBoxsno.Text = ; textBoxsname.Text = ; textBoxsno.Focus(); 查找信息程序代碼using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.T
28、ext;using System.Windows.Forms;using DataAccessLayer;namespace StudentMIS public partial class FormRearchStudent : Form public FormRearchStudent() InitializeComponent(); BindingSource bs = new BindingSource(); private void buttonsearchbysno_Click(object sender, EventArgs e) bs.DataSource = new Stude
29、ntDAO().searchbysno(textBoxsno.Text.Trim(); dataGridViewstudent.DataSource = bs; private void buttonsearchbysname_Click(object sender, EventArgs e) bs.DataSource = new StudentDAO().searchbysname(textBoxsname.Text.Trim(); dataGridViewstudent.DataSource = bs; 修改信息程序代碼using System;using System.Collecti
30、ons.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using DataAccessLayer;namespace StudentMIS public partial class FormUpdateStudent : Form public FormUpdateStudent() InitializeComponent(); BindingSource bs =
31、new BindingSource(); private void buttonsearch_Click(object sender, EventArgs e) bs.DataSource = new StudentDAO().searchbysno(textBoxSno.Text.Trim(); dataGridView1.DataSource = bs; private void buttonsname_Click(object sender, EventArgs e) if (textBoxSno.Text = ) MessageBox.Show(請輸入要修改的學號!); return;
32、 else MessageBox.Show(修改成功); string sno = textBoxSno.Text; string sname = textBoxSname.Text; new StudentDAO().update(sno,sname); MessageBox.Show(修改成功); this.DialogResult = DialogResult.OK; StudentDAOusing System;using System.Collections.Generic;using System.Data;using System.Data.SqlClient;using Sys
33、tem.Linq;using System.Text;namespace DataAccessLayer public class StudentDAO/ : DataAccessLayer.IStudentDAO private SQLHelper sqlhelper = null; public StudentDAO() sqlhelper = new SQLHelper(); /增 public void insert(string sno, string sname, string sex, string birthday) string sql = insert into stude
34、nt values(sno,sname,sex,birthday); SqlParameter para = new SqlParameter new SqlParameter(sno,SqlDbType.NChar), new SqlParameter(sname,SqlDbType.NVarChar), new SqlParameter(sex,SqlDbType.NChar), new SqlParameter(birthday,SqlDbType.NChar) ; int i = 0; parai+.Value = sno; parai+.Value = sname; parai+.V
35、alue = sex; parai+.Value = birthday; sqlhelper.ExecuteNonQuery(sql, para); /刪 public void deletebysno(string sno) string sql = delete from student where sno=sno; SqlParameter para = new SqlParameter new SqlParameter(sno,SqlDbType.NChar) ; int i = 0; parai+.Value = sno; sqlhelper.ExecuteNonQuery(sql,
36、 para); public void deletebyname(string sname) string sql = delete from student where sname=sname; SqlParameter para = new SqlParameter new SqlParameter(sname,SqlDbType.NVarChar) ; int i = 0; parai+.Value = sname; sqlhelper.ExecuteNonQuery(sql,para); /查找 public DataTable searchbysno(string sno) Data
37、Table table = new DataTable(); string sql = select * from student where sno=sno; SqlParameter para = new SqlParameter new SqlParameter(sno,SqlDbType.NChar) ; int i = 0; parai+.Value = sno; table = sqlhelper.CreateTableBySno(sql, para); return table; public DataTable searchbysname(string sname) DataT
38、able table = new DataTable(); string sql = select * from student where sname=sname; SqlParameter para = new SqlParameter new SqlParameter(sname,SqlDbType.NChar) ; int i = 0; parai+.Value = sname; table = sqlhelper.CreateTableBySname(sql, para); return table; /修改 public void update(string sno, string
39、 sname) DataTable table = new DataTable(); string sql = update student set sname=sname where sno=sno ; SqlParameter para = new SqlParameter new SqlParameter(sno,SqlDbType.NVarChar), new SqlParameter(sname,SqlDbType.NVarChar) ; int i = 0; parai+.Value = sno; parai+.Value = sname; sqlhelper.ExecuteNon
40、Query(sql, para); SQLHelperusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Data;namespace DataAccessLayer public class SQLHelper public void ExecuteNonQuery(string sql, params SqlParameter para) string connstr = server=.;data
41、base=student;integrated security=sspi; using (SqlConnection conn = new SqlConnection(connstr) conn.Open(); using (SqlCommand cmd = new SqlCommand(sql, conn) cmd.Parameters.AddRange(para); cmd.ExecuteNonQuery(); public DataTable CreateTable() DataTable table = new DataTable(); string connstr = server=.;database=student;integrated security=sspi; using (SqlConnection conn = new SqlConnection(connstr) conn.Open(); string sql = select * from student; using (SqlDataAdapter adapter = new SqlDataAdapter(sql, conn) adapter.Fill(table); return table; public DataTabl
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 委托轉讓公司協(xié)議
- 商超布展合作協(xié)議
- 《雅思閱讀技巧》課件
- 2025版五星酒店廚師長職位競聘與特聘合同書3篇
- 2025年全球及中國商用蘑菇殺菌設備行業(yè)頭部企業(yè)市場占有率及排名調研報告
- 2025-2030全球便攜式ALD系統(tǒng)行業(yè)調研及趨勢分析報告
- 2025年全球及中國氧化鈮蒸發(fā)材料行業(yè)頭部企業(yè)市場占有率及排名調研報告
- 2025年全球及中國磁力鎖支架行業(yè)頭部企業(yè)市場占有率及排名調研報告
- 2025年全球及中國手語口譯服務行業(yè)頭部企業(yè)市場占有率及排名調研報告
- 2025年全球及中國非接觸式26G高頻雷達物位計行業(yè)頭部企業(yè)市場占有率及排名調研報告
- 化學-河南省TOP二十名校2025屆高三調研考試(三)試題和答案
- 智慧農貿批發(fā)市場平臺規(guī)劃建設方案
- 林下野雞養(yǎng)殖建設項目可行性研究報告
- 2023年水利部黃河水利委員會招聘考試真題
- Python編程基礎(項目式微課版)教案22
- 01J925-1壓型鋼板、夾芯板屋面及墻體建筑構造
- 欠電費合同范本
- 2024年新高考地區(qū)數(shù)學選擇題填空壓軸題匯編十八含解析
- 大型商場招商招租方案(2篇)
- 2022年袋鼠數(shù)學競賽真題一二年級組含答案
- 英語主語從句省公開課一等獎全國示范課微課金獎課件
評論
0/150
提交評論