freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

在線小說城管理系統的設計與實現畢業(yè)設計(編輯修改稿)

2025-01-04 01:39 本頁面
 

【文章內容簡介】 protected void Button1_Click object sender EventArgs e if TextBox1Text TextBox2Text ResponseWrite alert 用戶名或密碼不能為空 else SqlConnection conn new SqlConnection connOpen 打開數據庫連接 string sql stringFormat insert into [User] values 0 1 null SqlCommand cmd new SqlCommand sql conn cmdExecuteNonQuery connClose ResponseWrite alert 注冊成功 ResponseRedirect 1txt 將該頁跳轉到指定的頁面中 TextBox1Text TextBox2Text TextBox3Text 輸入文本框的信息是否為空如果為空系統則會彈出提示框提醒用戶輸入要修改的用戶信息 TextBox4 文本框后面的驗證控件會判斷 TextBox3Text和 TextBox4Text文本框中新的密碼輸入是否一致不一致會顯示輸入密碼不一致必須重新填寫才能修改密碼如果所有的輸入信息都正確數據庫就會獲取用戶輸入信息將 數據庫的用戶信息根據用戶修改的信息加以保存修改完成會提示是用戶密碼修改成功用戶下次登錄是就要運用新修改的密碼進行登錄不然系統就會報用戶密碼錯誤 關鍵技術密碼修改運用了數據庫的 Update 方法 用戶密碼修改界面如下圖所示 圖 53 密碼修改頁面視圖 密碼修改后臺代碼如下 protected void Button1_Click object sender EventArgs e if TextBox1Text TextBox2Text ResponseWrite alert 用戶名或密碼不能為空 else if TextBox3Text ResponseWrite alert 密碼不能為空 else if TextBox4Text ResponseWrite alert 請再次輸入密碼 else SqlConnection conn new SqlConnection connOpen string sql stringFormat Update [user] set pass 0 where name 1 and pass 2 SqlCommand cmd new SqlCommand sql conn cmdExecuteNonQuery ResponseWrite script language javascript alert 修改成功 location javascripthistorygo 1 connClose protected void Button2_Click object sender EventArgs e ResponseRedirect indexaspx 詢模塊 書籍查詢頁面設計流程新建一個 web 頁面將其命名為 chaxunaspx 頁面在頁面設計視圖中添加一個 textbox文本框 button按鈕和一個 gridview表將 button按鈕的 text 屬性設置為查詢將 gridview1 綁定數據源到數據庫中的 bookinfo表 操作過程輸入搜索信息點擊查詢按鈕 書籍查詢頁面實現 1 通過網站鏈接到書籍數據庫系統創(chuàng)建一個鏈接打開數據庫中的 bookinfo 表 2 獲取用戶輸入的查詢信 息對數據庫中的圖書實習進行逐一必對 3 獲得該圖書信息后將數據進行填充綁定數據源將數據綁定在 Gridview1 表中 關鍵技術書籍查詢主要運用的到了 SQL 數據庫的 Select 方法建立數據連接使用模糊查詢 書籍查詢視圖如下 圖 54 書籍查詢頁面視圖 查詢頁面的代碼和代碼分析如下 protected void Button1_Click1 object sender EventArgs e SqlConnection conn new SqlConnection connOpen SqlCommand cmd new SqlCommand DataSet ds new DataSet SqlDataAdapter da new SqlDataAdapter select from [bookinfo] where name like conn daFill ds bookinfo Source ds Bind 模塊 留言板界面設計與實現新建一個 web 頁面將以命名為 liuyanaspx 在設計窗口界面中添加三個 label控件三個 textbox控件三個 button控件將 label1設置為用戶名 label2 設置為留言主題 label3 設置為留言內容將 textbox3 的textMode 屬性設置為 MultiLinebutton按鈕 text屬性分別設置為留言取消跟新雙擊所以 button 按鈕輸入相應的共能操作代碼 操作過程分別輸入用戶名留言主題留言內容點擊留言按鈕進行留言操作 留言模塊實現首先輸入用戶名再輸入留言主題后開始 填寫留言內容完成以上操作后點擊留言留言就成功 關鍵技術留言界面使用了數據庫連接技術和 SQL insert 方法 圖 55 留言板界面視圖 留言界面代碼如下 protected void Button1_Click object sender EventArgs e SqlConnection conn new SqlConnection connOpen 打開數據庫連接 string sql stringFormat insert into [liuyan] values 0 1 2 3 null SyToString 插入數據 SqlCommand cmd new SqlCommand sql conn cmdExecuteNonQuery 執(zhí)行命令 connClose ResponseWrite alert 留言成功 protected void Button3_Click object sender EventArgs e ResponseRedirect liuyanaspx protected void Button2_Click object sender EventArgs e ResponseRedirect indexaspx 塊 下載界面設計與實現添加一個 gridview 控件見下載信息表的數據綁定數據表中添加下載列編寫下載代碼 操作過程點擊書籍信息中的下 載按鈕實現下載功能 下載模塊實現點擊下載導航欄鏈接到下在頁面查看相應的書籍信息點擊下載按鈕實施下載 關鍵技術使用了 ServerMapPath 圖 56 下載界面圖 下載按鈕代碼如下 protected void Page_Load object sender EventArgs e string name downBook string path new DirectoryInfo ServerMapPath FullNameToString \book\ name 獲取書籍的的路徑 string str pathReplace \\ SyInfo file new SyInfo str if fileExists ResponseClear ResponseAddHeader ContentDisposition attachment filename ServerUrlEncode fileName 解決中文亂碼 ResponseAddHeader ContentLength ring 返回一個不能被客戶端讀取的的流必須被下載 ResponseContentType applicationoctetstream設置二進制數據流 Respe ResponseWriteFile fileFullName ResponseEnd else ResponseWrite This file does not exist ResponseRedirect downloadaspx public string downBook SqlConnection conn new SqlConnection ConfigurationManagerConnectionStrings[zaixianxiaoshuoConnectionString]ToString try connOpen SqlCommand cmd new SqlCommand cmdCommandText select name from [xiazai] where id id cmdConnection conn id SqlDbTypeNChar Value getId ToString SqlDataReader dr cmdExecuteReader string name if drRead name drGetString 0 Trim ToString drClose cmdExecuteNonQuery return name finally connClose public string getId string id HttpConAndQuery int n idLastIndexOf id idSubstring n 1 return id
點擊復制文檔內容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1