軟件系統(tǒng)設(shè)計(jì)大作業(yè)_第1頁(yè)
軟件系統(tǒng)設(shè)計(jì)大作業(yè)_第2頁(yè)
軟件系統(tǒng)設(shè)計(jì)大作業(yè)_第3頁(yè)
軟件系統(tǒng)設(shè)計(jì)大作業(yè)_第4頁(yè)
軟件系統(tǒng)設(shè)計(jì)大作業(yè)_第5頁(yè)
已閱讀5頁(yè),還剩27頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、實(shí)用標(biāo)準(zhǔn)文案武漢輕工大學(xué)軟件系統(tǒng)設(shè)計(jì)大作業(yè)專業(yè):軟件工程班級(jí):軟工 1203 班學(xué)號(hào):1205110627姓 名: 司福江 指導(dǎo)老師: 蔣麗華2015 年 5 月 2 日精彩文檔實(shí)用標(biāo)準(zhǔn)文案一實(shí)驗(yàn)?zāi)康耐ㄟ^(guò)制作一個(gè)電子通信錄系統(tǒng)來(lái)掌握使用 ADO.NET 訪問與操縱 數(shù)據(jù)庫(kù)的方法, 或者設(shè)計(jì)制作教材中所述的偽郵件系統(tǒng), 或者設(shè)計(jì)制 作自己擬定的工資、學(xué)籍、圖書管理系統(tǒng)之類的系統(tǒng)。 二實(shí)驗(yàn)內(nèi)容1、電子通信錄包括三部分信息:用戶登錄注冊(cè)信息通信組信息聯(lián)系人信息2、電子通信錄系統(tǒng)應(yīng)至少包括下列功能頁(yè)面(頁(yè)面布局自定) : 用戶首先要進(jìn)行注冊(cè), 注冊(cè)成功后, 還要允許用戶進(jìn)行密碼修改。精彩文檔實(shí)用標(biāo)準(zhǔn)文

2、案通信組的創(chuàng)建 AddGroup.aspx通信組的顯示與維護(hù) AltGroup.aspx (包括通信組信息的刪除和 修改)通信組是根據(jù)聯(lián)系人之間的關(guān)系建立不同性質(zhì)的 Group ,以上頁(yè) 面主要訪問數(shù)據(jù)庫(kù) 中的 TableGroup 數(shù)據(jù)表。頁(yè)面主要功能分別 為:組的創(chuàng)建和維護(hù)。比如,可以建 立親友通信組、工作通信組、 同學(xué)通信組以及其他類型通信組等。聯(lián)系人信息的添加 AddPerson.aspx聯(lián)系人信息的顯示與維護(hù) AltPerson.aspx (包括聯(lián)系人信息的刪 除和修改)根據(jù)聯(lián)系人與通信組的關(guān)系,對(duì)聯(lián)系人進(jìn)行分類添加和維護(hù),以 上頁(yè)面涉及到對(duì) TableUser 數(shù) 據(jù) 表 的 操

3、作 , 同 時(shí) 需 要 考 慮 與 TableGroup 數(shù)據(jù)表之間的關(guān)系。查找通信錄 Find.aspx設(shè)置查找條件, 用戶可以直接輸入查詢關(guān)鍵字, 也可以先 選擇通信組,再 輸入查詢關(guān)鍵字,系統(tǒng)返回查詢結(jié)果,可以綁定 DataGrid 控件來(lái)顯示查詢結(jié)果。三需求分析本系統(tǒng)除了用戶的注冊(cè)設(shè)計(jì)外,還可設(shè)置收發(fā)郵件的查看刪除功 能。包括:加強(qiáng)信息保管的安全性;提高信息準(zhǔn)確度和全面性;提高信息獲精彩文檔實(shí)用標(biāo)準(zhǔn)文案取的便捷性;確保 信息管理的高效性。以 Windows 為操作系統(tǒng), 運(yùn)數(shù)據(jù)庫(kù)技術(shù),開發(fā)以Windows XP 為用戶的操作平臺(tái),界面友善、功能齊全的通訊錄系統(tǒng)。新系統(tǒng)的運(yùn)行 硬 件環(huán)境

4、 PC 機(jī),當(dāng)用戶使用系統(tǒng)時(shí),通過(guò)正確的口令進(jìn)入系統(tǒng),進(jìn)行 數(shù)據(jù)庫(kù)的維 護(hù)操作和運(yùn)用。操作上是對(duì) IE 瀏覽器的引用,該瀏覽 器的使用,主要憑借使用瀏 覽操作技術(shù)即可完成數(shù)據(jù)錄入,方便 簡(jiǎn)單。使用前只要對(duì)用戶進(jìn)行簡(jiǎn)單的說(shuō)明或閱 讀幫助文件即可使 用該系統(tǒng)。四系統(tǒng)框架1、登陸頁(yè)面模塊:登陸,注冊(cè)用戶模塊。 2、用戶注冊(cè)頁(yè)面模塊。3、主界面模塊。4、添加分組模塊。5、查詢聯(lián)系人模塊。五主要模塊代碼、截圖。1、登錄模塊精彩文檔實(shí)用標(biāo)準(zhǔn)文案代碼:/ 登錄按鈕響應(yīng)事件protected void Buttondenglu_Click( object sender, EventArgs e)string

5、ConnString = server=localhost; Initial Catalog=liumail; Integrated Security = SSPI;SqlConnection Conn = new SqlConnection (ConnString);string QueryStr = select count(*) from TAB_UserInfo where UserID=+TextBoxUsername.Text + and Password= + TextBoxPassword.Text + ;Conn.Open();SqlCommand cmd = new Sql

6、Command (QueryStr, Conn); int count = Convert .ToInt32(cmd.ExecuteScalar();tryif (count 0)Session UserID =TextBoxUsername.Text;Session Password = TextBoxPassword.Text;Response.BufferOutput = true ; Response.Redirect( Global.aspx );else精彩文檔實(shí)用標(biāo)準(zhǔn)文案用戶名或者密碼不正確!請(qǐng)Response.Write( alert( 重新輸入 ) );catch (Exce

7、ption ex)Console .WriteLine( Exception in main: + ex.Message); Conn.Close();注冊(cè)按鈕事件代碼:protected void Buttonzhuce_Click( object sender, EventArgs e) Response.Redirect( Register.aspx );精彩文檔實(shí)用標(biāo)準(zhǔn)文案2、注冊(cè)模塊代碼:/ 注冊(cè)按鈕事件protected void ButtonOK_Click( object sender, EventArgs e) string ConnString = server=local

8、host; Initial Catalog=liumail; Integrated Security = SSPI SqlConnection Conn = new SqlConnection (ConnString);try精彩文檔實(shí)用標(biāo)準(zhǔn)文案string InsertStr = insert into TAB_UserInfo(UserID,UserName,Password,Address,QQ,ConfEmail) +values( + TextBoxLoginName.Text + , + TextBoxUserName.Text +, + TextBoxPassword.Text

9、+ , +TextBoxAddress.Text + , + TextBoxQQ.Text +, + TextBoxEmail.Text + ) ;SqlCommand myCom = new SqlCommand (InsertStr, Conn);if (RadioButtonAccept.Checked = true )myCom.Connection.Open(); myCom.ExecuteNonQuery();myCom.Connection.Close();Response.Write( alert( 注冊(cè)成功! );location.href=Login.aspx; ); el

10、se不接受服務(wù)條款,不能注冊(cè)!) );Response.Write( alert(catch (Exception ex)Response.Write( alert( 注冊(cè)失?。?); ); TextBoxLoginName.Text = ;TextBoxUserName.Text = ;TextBoxPassword.Text = ; TextBoxAddress.Text = ; TextBoxQQ.Text = ; TextBoxEmail.Text = ; LabelMessage.Text = ;驗(yàn)證用戶名是否存在:protected void ButtonCheck_Click(

11、object sender, EventArgs e)string ConnString = server=localhost; Initial Catalog=liumail; Integrated Security = SSPI ; SqlConnection Conn = new SqlConnection (ConnString);string QueryStr = select count(*) from TAB_UserInfo where UserID=+ TextBoxLoginName.Text +Conn.Open();SqlCommand cmd = new SqlCom

12、mand (QueryStr, Conn);int count = Convert .ToInt32(cmd.ExecuteScalar();if (count 0)LabelMessage.Text = 此用戶名已被使用精彩文檔實(shí)用標(biāo)準(zhǔn)文案TextBoxLoginName.Text =elseLabelMessage.Text = 恭喜你!此用戶名可使用Conn.Close();3.主界面模塊代碼:#line-chart height:300px;width:800px;margin: 0px auto;精彩文檔實(shí)用標(biāo)準(zhǔn)文案margin-top: 1em;.navbar-default .n

13、avbar-brand, .navbar-default .navbar-brand:hover color: #fff;.dropdown-menu text-align:center; font-weight:bold;$(function() var uls = $(.sidebar-nav ul *).clone();uls.addClass(visible-xs);$(#main-menu).append(uls.clone(););精彩文檔實(shí)用標(biāo)準(zhǔn)文案Toggle navigation   聯(lián)系薄 style=position:relative;top: 3px

14、; %=SessionuserName.T切換賬號(hào) 通訊錄 %精彩文檔實(shí)用標(biāo)準(zhǔn)文案String gnames = getGroupNames();foreach (String gname in gnames) Response.Write(+ gname+);% 查詢 組管理 用戶 簽到 報(bào)名修改密碼精彩文檔實(shí)用標(biāo)準(zhǔn)文案黃頁(yè)4.查詢模塊代碼:精彩文檔實(shí)用標(biāo)準(zhǔn)文案using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web

15、;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using utils;namespace webpro5public partial class findresult : System.Web.UI.Pageprivate QueryRunner qr = new QueryRunner();p

16、rotected void Page_Load(object sender, EventArgs e)bind();精彩文檔實(shí)用標(biāo)準(zhǔn)文案/ 查詢語(yǔ)句的更改protected void FindView_RowEditing(object sender, GridViewEditEventArgs e) FindView.EditIndex = e.NewEditIndex;bind();/ 刪除protected void FindView_RowDeleting(object sender, GridViewDeleteEventArgs e)int index = e.RowIndex;s

17、tring sql = delete from table_contact where cid= +FindView.DataKeyse.RowIndexcid.T oString() + ;qr.ExecuteNonQuery(sql);bind();/ 更新protected void FindView_RowUpdating(object sender, GridViewUpdateEventArgs e)string sql = update table_contact set cname= +(TextBox)(FindView.Rowse.RowIndex.Cells2.Contr

18、ols0).Text.ToString().Trim()+ ,gender= +(TextBox)(FindView.Rowse.RowIndex.Cells3.Controls0).Text.ToString().Trim()精彩文檔實(shí)用標(biāo)準(zhǔn)文案+ ,address= +(TextBox)(FindView.Rowse.RowIndex.Cells4.Controls0).T+ ,postcode= +(TextBox)(FindView.Rowse.RowIndex.Cells5.Controls0).T+ ,telphone= +(TextBox)(FindView.Rowse.RowI

19、ndex.Cells6.Controls0).T+ ,email= +(TextBox)(FindView.Rowse.RowIndex.Cells7.Controls0).Text.ToString().Trim()ext.ToString().Trim()ext.ToString().Trim()ext.ToString().Trim()精彩文檔+ where cid= + FindView.DataKeyse.RowIndex.Value.ToString() + qr.ExecuteNonQuery(sql);FindView.EditIndex = -1;bind();/ 取消pro

20、tected void FindView_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) FindView.EditIndex = -1;bind();/ 綁定public void bind()實(shí)用標(biāo)準(zhǔn)文案String uid = SessionuserId.T oString();String name = Request.QueryStringcname;String tel = Request.QueryStringtel;String sql = select * from getContacts( + u

21、id + ) c where 1=1;/name 和 tel 有效, name 有效 tel 無(wú)效, name 無(wú)效 tel 有效if (name != null) & (name.Trim() != ) & (tel != null & tel.Trim() != )sql += and ame like % + name + % or c.telphone like % + tel + %;else if (name != null) & (name.Trim() != ) & (tel = null) | (tel.Trim() = )sql += and ame like % + na

22、me + %;else if (tel != null) & (tel.Trim() != ) & (name = null) | (name.Trim() = )sql += and c.telphone like% + tel + %;DataSet contactDs = qr.ExcuteDataSet(sql);int count = contactDs.Tables0.Rows.Count;if(count = 0)精彩文檔實(shí)用標(biāo)準(zhǔn)文案沒有記錄 );Response.Write( FindView.DataSource = contactDs;FindView.DataBind()

23、;protected void FindView_RowDataBound(object sender, GridViewRowEventArgs e)if (e.Row.RowState = (DataControlRowState.Edit | DataControlRowState.Alternate)| e.Row.RowState = DataControlRowState.Edit)TextBox curText;for (int i = 0; i e.Row.Cells.Count; i+)if (e.Row.Cellsi.Controls.Count != 0)curText

24、= e.Row.Cellsi.Controls0 as TextBox;if (curText != null)curText.Width = Unit.Pixel(80);精彩文檔實(shí)用標(biāo)準(zhǔn)文案protected void FindView_PageIndexChanging(object sender, GridViewPageEventArgs e)FindView.PageIndex = e.NewPageIndex;bind();5.添加分組模塊代碼: 添加聯(lián)系人 精彩文檔實(shí)用標(biāo)準(zhǔn)文案 增加聯(lián)系人 精彩文檔實(shí)用標(biāo)準(zhǔn)文案 聯(lián)系人姓名 聯(lián)系人性別 男 女 聯(lián)系人電話 extBox/asp:T精彩文檔實(shí)用標(biāo)準(zhǔn)文案 組 聯(lián)系人地址 郵編 郵箱 保存精彩文檔實(shí)用標(biāo)準(zhǔn)文案保存 window.onload = function()document.getElementById(saveBtn).onclick = function()if(!Page_ClientValidate(contactGroup)document.getElementById(msgSpan).innerHTML=請(qǐng)按要求完善聯(lián)系人和聯(lián)系方式 !;return false;精彩文檔實(shí)用標(biāo)準(zhǔn)文案$(rel=tooltip).tooltip();$(function() $(.demo

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論