-
大小: 2.88MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-09-09
- 語言: C#
- 標簽: asp.net??c#??網(wǎng)頁設計??
資源簡介
基于asp.net的圖書管理系統(tǒng)程序加文檔完美運行,運行不了打我好不好,僅供參考

代碼片段和文件信息
using?System;
using?System.Data;
using?System.Configuration;
using?System.Collections;
using?System.Web;
using?System.Web.Security;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.Web.UI.WebControls.WebParts;
using?System.Web.UI.HtmlControls;
using?System.Data.SqlClient;
public?partial?class?bookBorrow?:?System.Web.UI.Page
{
????static?int?isSum?=?0;
????SqlHelper?data?=?new?SqlHelper();
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????????if?(!IsPostBack)
????????{
????????????if?(Session[“userName“]?==?null)
????????????{
????????????????Alert.AlertAndRedirect(“對不起您還沒有登錄“?“Default.aspx“);
????????????}
????????????else
????????????{
????????????????string?readerBarCode?=?Session[“readerBarCode“].ToString();???????????????//獲取讀者條形碼
????????????????string?BSql?=?“select?count(*)?from?bookBorrow?where?readerBarCode=‘“?+?Session[“readerBarCode“].ToString()?+?“‘?and?isReturn=‘0‘“;
????????????????dataOperate?db?=?new?dataOperate();
????????????????TextBox1.Text?=?data.ReturnSql(BSql);
????????????????bindReaderInfo();?????//調(diào)用自定義方法顯示讀者信息
????????????}
????????}
????}
?
????//自定義方法顯示讀者信息,
????public?void?bindReaderInfo()
????{
????????string?readerBarCode?=?Session[“readerBarCode“].ToString();???????????????//獲取讀者條形碼
????????//創(chuàng)建SQL語句在讀者信息表中查詢符合讀者條形碼條件的記錄
????????string?readerSql?=?““;
????????readerSql?=?“select?*?from?reader?where?readerBarCode=‘“?+?readerBarCode?+?“‘“;
????????SqlDataReader?sdr?=?dataOperate.getRow(readerSql);??????????//獲取該讀者詳細信息
????????if?(sdr.Read())
????????{?????????????????????????????????????????????????//讀取一條記錄
????????????txtReaderName.Text?=?sdr[“username“].ToString();??????????//顯示讀者姓名
????????????this.Hidden1.Value?=?sdr[“IsUse“].ToString();
????????????TextBox2.Text?=?sdr[“MoenyInfo“].ToString();??
????????????txtCertificate.Text?=?sdr[“certificate“].ToString();????????//顯示證件號
????????????//創(chuàng)建SQL語句在讀者類型表中查詢符合讀者類型編號的記錄
????????????string?readerTypeSql?=?“select?*?from?readerType?where?type=‘“?+?sdr[“readerType“].ToString()?+?“‘“;
????????????SqlDataReader?typeSdr?=?dataOperate.getRow(readerTypeSql);??//獲取讀者類型信息
????????????typeSdr.Read();?????????????????????????????????????????????//讀取一條記錄
????????????txtReaderType.Text?=?typeSdr[“type“].ToString();????????????//顯示讀者類型
????????????int?borrowNum?=?Convert.ToInt32(typeSdr[“num“]);????????????//獲取可借圖書總數(shù)
????????
????????????int?alreadyDate?=?Convert.ToInt32(typeSdr[“Date“]);
????????????//創(chuàng)建SQL語句在圖書借閱表中查詢符合讀者條形碼條件的讀者借了幾本圖書(圖書未還的)
????????????string?selSql?=?“select?count(*)?from?bookBorrow?where?readerBarCode=‘“?+?readerBarCode?+?“‘?and?isReturn?=‘0‘“;
????????????int?alreadyNum?=?dataOperate.seleSQL(selSql);???????????????//獲取圖書已借數(shù)
????????????txtNum.Text?=?Convert.ToString(borrowNum?-?alreadyNum);?????//顯示可以借閱數(shù)
????????????TxtDate.Text?=?Convert.ToString(alreadyDate);??//顯示可以天數(shù)
????????????isSum?=?1;
????????}
????????else
????????????RegisterStartupscript(““?“
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2660??2013-11-28?23:19??TSGLWeb\Admin\addBookcase.aspx
?????文件???????2076??2013-11-28?23:09??TSGLWeb\Admin\addBookcase.aspx.cs
?????文件??????16789??2013-11-29?08:59??TSGLWeb\Admin\addBookInfo.aspx
?????文件???????6333??2013-11-28?23:09??TSGLWeb\Admin\addBookInfo.aspx.cs
?????文件???????2660??2013-11-28?23:19??TSGLWeb\Admin\addBookType.aspx
?????文件???????2058??2013-11-28?23:09??TSGLWeb\Admin\addBookType.aspx.cs
?????文件???????3794??2013-11-29?08:48??TSGLWeb\Admin\AddMoney.aspx
?????文件???????1638??2013-11-29?08:48??TSGLWeb\Admin\AddMoney.aspx.cs
?????文件???????2661??2013-11-28?23:19??TSGLWeb\Admin\Addpublishing.aspx
?????文件???????2061??2013-11-28?23:09??TSGLWeb\Admin\Addpublishing.aspx.cs
?????文件???????7963??2013-11-29?08:40??TSGLWeb\Admin\addReaderInfo.aspx
?????文件???????3768??2013-11-28?23:09??TSGLWeb\Admin\addReaderInfo.aspx.cs
?????文件???????3878??2013-11-28?23:19??TSGLWeb\Admin\addReaderType.aspx
?????文件???????2193??2013-11-28?23:09??TSGLWeb\Admin\addReaderType.aspx.cs
?????文件???????4070??2013-11-29?08:45??TSGLWeb\Admin\addUser.aspx
?????文件???????2284??2013-11-28?23:09??TSGLWeb\Admin\addUser.aspx.cs
?????文件???????4435??2013-11-28?23:19??TSGLWeb\Admin\bookBorrowSearch.aspx
?????文件???????1467??2013-11-28?23:09??TSGLWeb\Admin\bookBorrowSearch.aspx.cs
?????文件???????3349??2013-11-28?23:19??TSGLWeb\Admin\bookcaseManage.aspx
?????文件???????1759??2013-11-28?23:09??TSGLWeb\Admin\bookcaseManage.aspx.cs
?????文件???????3766??2013-11-28?23:19??TSGLWeb\Admin\bookInfoManage.aspx
?????文件???????3134??2013-11-28?23:09??TSGLWeb\Admin\bookInfoManage.aspx.cs
?????文件???????4628??2013-11-28?23:19??TSGLWeb\Admin\bookReturnSearch.aspx
?????文件???????1466??2013-11-28?23:09??TSGLWeb\Admin\bookReturnSearch.aspx.cs
?????文件???????3146??2013-11-28?23:19??TSGLWeb\Admin\bookType.aspx
?????文件???????1786??2013-11-28?23:09??TSGLWeb\Admin\bookType.aspx.cs
?????文件????????445??2013-11-28?23:19??TSGLWeb\Admin\entry.aspx
?????文件????????456??2013-11-28?23:09??TSGLWeb\Admin\entry.aspx.cs
?????文件???????4588??2013-11-28?23:19??TSGLWeb\Admin\FaKuanInque.aspx
?????文件???????1429??2013-11-28?23:09??TSGLWeb\Admin\FaKuanInque.aspx.cs
............此處省略1089個文件信息
評論
共有 條評論