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

正文內(nèi)容

圖書館信息管理系統(tǒng)設(shè)計(jì)說明書-文庫吧

2025-03-28 06:05 本頁面


【正文】 來自系統(tǒng),即注冊(cè)用戶必定是人大正式在冊(cè)的教師和學(xué)生,因此,借閱歷史記錄查詢系統(tǒng)的user數(shù)據(jù)表使用了U系統(tǒng)中的用戶基本信息。用戶使用該系統(tǒng)時(shí)只要輸入賬號(hào)即可登錄,完成身份識(shí)別認(rèn)證。這樣,既避免了認(rèn)證功能的重復(fù)開發(fā),又減少了讀者對(duì)多賬號(hào)的記憶。( 2 )查詢功能實(shí)現(xiàn) ?、俨樵兘缑妗 ∠到y(tǒng)在提供用戶登錄認(rèn)證界面的同時(shí),設(shè)計(jì)了某一日期或某一時(shí)段瀏覽兩種選擇查詢方式,即讀者在進(jìn)行身份登錄的同時(shí)要設(shè)定查詢借閱歷史的范圍。查詢范圍以時(shí)間為界定?! 、跀?shù)據(jù)庫查詢處理借閱歷史查詢系統(tǒng)使用PHP語言讀取后臺(tái)數(shù)據(jù)庫中的數(shù)據(jù),選擇出屬于該用戶的借閱數(shù)據(jù)進(jìn)行處理。由于目前數(shù)據(jù)庫中數(shù)據(jù)量比較小,因此在系統(tǒng)實(shí)現(xiàn)中,僅建立了一個(gè)借閱歷史數(shù)據(jù)的物理存儲(chǔ)子表book,但隨著系統(tǒng)數(shù)據(jù)的日益增長,將會(huì)啟用分表存儲(chǔ)。( 3)查詢結(jié)果輸出實(shí)現(xiàn)對(duì)于每一條查詢結(jié)果,系統(tǒng)提供了三種方式充分滿足讀者對(duì)借閱歷史查詢的不同需求。讀者可以通過應(yīng)用程序即時(shí)查看,也可以導(dǎo)出成為Excel文件形式保存到本地硬盤。5通用類的生成與數(shù)據(jù)庫連接 本系統(tǒng)的主要操作都需要與數(shù)據(jù)庫發(fā)生交互,為了提高代碼的重用性和規(guī)范性,把與數(shù)據(jù)庫交互的功能單獨(dú)放在一個(gè)類中,在該類中實(shí)現(xiàn)數(shù)據(jù)庫的增加、刪除、修改、查詢等通用功能。 連接數(shù)據(jù)庫(1)為數(shù)據(jù)庫BookManage和本系統(tǒng)之間建立一個(gè)數(shù)據(jù)連接?! ?)在服務(wù)器資源管理器中右擊“數(shù)據(jù)連接”節(jié)點(diǎn)(VS 2008中操作)。在彈出的快捷菜單中執(zhí)行“添加連接”命令,打開Data Link Properties對(duì)話框。切換到Provider選項(xiàng)卡,選中列表框中的Microsoft OLE DB Provider for SQL Server項(xiàng)。單擊“下一步”切換到Connection選項(xiàng)卡。2)在其中的第一個(gè)下拉列表框中選擇數(shù)據(jù)庫所在服務(wù)器名稱。輸入登錄服務(wù)器信息后選擇數(shù)據(jù)庫BookManage,然后單擊測試按鈕。如果測試成功,單擊“確定”按鈕。(2)定義數(shù)據(jù)庫連接字符串,代碼如下:Private static string ConnectString = Data Source= (local)\\sqlexpress。DataBase=。(2)創(chuàng)建Connection對(duì)象,代碼如下:SqlConnection con = new SqlConnection(ConnectString)。(3)打開連接,代碼如下:()。(4)關(guān)閉連接,代碼如下:()。 操作數(shù)據(jù)庫中的數(shù)據(jù)using System。using 。using 。using 。using 。using 。namespace BookManage{ class DataAccess { private static string ConnectString = @Data Source =A20\SQLEXPRESS。AttachDbFilename=F:\BookManage\data\。Integrated Security=False。//數(shù)據(jù)庫連接字符串 /// summary /// 根據(jù)表名獲取數(shù)據(jù)集的表 /// /summary /// param name=table/param /// returns/returnspublic static DataTable GetDataSetByTableName(string table) {using (SqlConnection con = new SqlConnection(ConnectString))//創(chuàng)建數(shù)據(jù)庫連接對(duì)象 { string sql = select * from + table + 。//查詢sql語句try {SqlDataAdapter adapter = new SqlDataAdapter(sql, con)。//創(chuàng)建適配器對(duì)象 DataSet ds = new DataSet()。//創(chuàng)建數(shù)據(jù)集對(duì)象 (ds, table)。//填充數(shù)據(jù)集 return [0]。//返回?cái)?shù)據(jù)表 } catch (SqlException ex) { throw new Exception()。 。}}} public static DataSet GetDataSetBySql(string sql) { using (SqlConnection con = new SqlConnection(ConnectString))//創(chuàng)建數(shù)據(jù)庫連接對(duì)象 { SqlDataAdapter adapter = new SqlDataAdapter(sql,con)。//創(chuàng)建適配器對(duì)象 DataSet ds = new DataSet()。//創(chuàng)建數(shù)據(jù)集對(duì)象 try { (ds)。//填充數(shù)據(jù)集 return ds。//返回?cái)?shù)據(jù)集 } catch (SqlException ex) {throw new Exception()} } public static SqlDataReader GetDataReaderByID(int id) {using (SqlConnection con = new SqlConnection(ConnectString)) {string sql = select * from bookinfo where bookid= + id。//sql語句 try {SqlCommand m = new SqlCommand(sql, con)。//創(chuàng)建Command對(duì)象 ()。//打開連接 SqlDataReader reader = ()。//創(chuàng)建DataReader對(duì)象 ()。//讀取數(shù)據(jù) return reader。//返回DataReader} catch (SqlException ex) {throw new Exception()。 }} public static bool UpdateDataTable(string sql) {using (SqlConnection con = new SqlConnection(ConnectString)) { try {()。//打開連接 SqlCommand m = new SqlCommand(sql, con)。//創(chuàng)建Command對(duì)象 if (() 0) //執(zhí)行更新 {return true。} else {return false。}} catch (SqlException ex) {throw new Exception()。}}} public static void UpdateDataSet(DataSet ds,string sql) { using (SqlConnection con = new SqlConnection(ConnectString))
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1