<%@ Page Language="C#" MasterPageFile="~/MasterPage/MainMasterPage.master" AutoEventWireup="true" CodeFile="BorrowBook.aspx.cs" Inherits="BookBRManage_BorrowBook" Title="Untitled Page" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<table width="771" height="465" border="0" align="center" cellpadding="0" cellspacing="1" class="waikuang">
<tr>
<form name="form1" method="post" action="">
<td valign="top">
<table width="756" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="756" height="15" colspan="3" align="right"> </td>
</tr>
<tr>
<td height="45" colspan="3" background="../images/tushujieyue.gif"></td>
</tr>
<tr>
<td height="100" colspan="3" background="../images/tu shu pai hang2.gif">
<table width="740" height="100" border="0" align="center" cellspacing="0">
<tr>
<td class="waikuang">
<table width="718" border="0" align="center" cellspacing="0">
<tr>
<td height="27" colspan="2" width="205">
<img src="../images/zuzheyanzheng.gif" width="133" height="18"></td>
<td width="1" rowspan="3">
<img src="../images/shuxian.jpg" width="1" height="76"></td>
<td width="111" align="center" class="daohang1">姓名:</td>
<td width="162">
<label>
<asp:TextBox ID="txtReader" runat="server" ReadOnly="True"></asp:TextBox>
</label>
</td>
<td width="73" class="daohang1">性别:</td>
<td width="166">
<asp:TextBox ID="txtSex" runat="server" ReadOnly="True"></asp:TextBox></td>
</tr>
<tr>
<td height="28" colspan="2" class="daohang1">读者编号:</td>
<td align="center" class="daohang1">证件类型:</td>
<td>
<asp:TextBox ID="txtPaperType" runat="server" ReadOnly="True"></asp:TextBox></td>
<td width="73" class="daohang1">证件号码:</td>
<td width="166">
<asp:TextBox ID="txtPaperNum" runat="server" ReadOnly="True"></asp:TextBox></td>
</tr>
<tr>
<td width="149">
<label>
<asp:TextBox ID="txtReaderID" runat="server" Width="98px"></asp:TextBox>
</label>
</td>
<td width="56" align="center">
<label>
<asp:Button ID="btnSure" runat="server" Text="确定" OnClick="btnSure_Click" />
</label>
</td>
<td align="center" class="daohang1">读者类型:</td>
<td>
<asp:TextBox ID="txtRType" runat="server" ReadOnly="True"></asp:TextBox></td>
<td width="73" class="daohang1">可借数量:</td>
<td width="166">
<asp:TextBox ID="txtBNum" runat="server" ReadOnly="True"></asp:TextBox></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" valign="top" background="../images/tu shu pai hang2.gif">
<table width="745" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"></td>
</tr>
<tr>
<td height="5" colspan="2">
<table width="722" height="30" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#C2D7E4" bordercolordark="#FFFFFF">
<tr>
<td height="28">
<table width="735" height="23" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#ACF2F1"> 图书借阅</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<asp:GridView ID="gvBookInfo" runat="server" AllowPaging="True" AutoGenerateColumns="False" Font-Size="9pt" HorizontalAlign="Center"
OnPageIndexChanging="gvBookInfo_PageIndexChanging"
PageSize="5" Width="678px" OnRowUpdating="gvBookInfo_RowUpdating">
<Columns>
<asp:BoundField DataField="bookcode" HeaderText="条形码" ReadOnly="True" />
<asp:BoundField DataField="bookname" HeaderText="图书名称" />
<asp:BoundField DataField="type" HeaderText="图书类型" />
<asp:BoundField DataField="pubname" HeaderText="出版社" />
<asp:BoundField DataField="bcase" HeaderText="书架" />
<asp:BoundField DataField="storage" HeaderText="库存总数" />
<asp:TemplateField HeaderText="借阅">
<ItemTemplate>
<asp:Button ID="btnBorrow" runat="server" CommandName="Update" Text="借阅" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle HorizontalAlign="Center" />
<HeaderStyle BackColor="#DFF5F5" />
</asp:GridView>
</td>
</tr>
<tr>
<td colspan="3" valign="top" background="images/tu shu pai hang2.gif">
<table width="745" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" style="height: 19px"></td>
</tr>
<tr>
<td height="5" colspan="2">
<table width="722" height="30" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#C2D7E4" bordercolordark="#FFFFFF">
<tr>
<td height="28">
<table width="735" height="23" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#ACF2F1"> 读者所借图书</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<asp:GridView ID="gvBorrowBook" runat="server" AllowPaging="True" AutoGenerateColumns="False" Font-Size="9pt" HorizontalAlign="Center"
OnPageIndexChanging="gvBorrowBook_PageIndexChanging"
PageSize="5" Width="678px">
<Columns>
<asp:BoundField DataField="bookname" HeaderText="图书名称" />
<asp:BoundField DataField="borrowTime" HeaderText="借阅时间" />
<asp:BoundField DataField="ygbackTime" HeaderText="应还时间" />
<asp:BoundField DataField="pubname" HeaderText="出版社" />
<asp:BoundField DataField="bcase" HeaderText="书架" />
<asp:BoundField DataField="price" HeaderText="价格" />
</Columns>
<RowStyle HorizontalAlign="Center" />
<HeaderStyle BackColor="#DFF5F5" />
</asp:GridView>
<br>
</td>
</tr>
<tr>
<td height="4" colspan="3" valign="top" background="../images/tu shu pai hang3.gif"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
</asp:Content>
-
AutoEventWireup: 如果Page指令的AutoEventWireup属性被设置为 true(或者如果缺少此属性,因为它默认为true),该``页框架将自动调用页事件,即Page_Init 和 Page_Load方法。在这种情况下,不需要任何显式的Handles子句或委托。
-
ReadOnly="True":只读,可以选中,不能修改。
-
MasterPageFile:MasterPageFile其实是定义一个了外围的框架的页面,最常见的应用就是网站的顶部导航栏和底部的CopyRight声明栏。母版页为具有扩展名 .master(如 Main.master)的 ASP.NET 文件,由特殊的 @ Master 指令识别如下:<%@ Master Language="C#" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>。以下是母版位置:
-
所有class统一放置的位置:
-
BoundField属性:表示数据绑定控件中以文本形式显示的字段。
-
TemplateField列:和BoundField相比,可以放入控件或其他显示控制可以放入控件或其他显示控制。
-
<ItemTemplate>:模板类,可以自己向其中添加各种服务器控件.
-
Page_Load():客户端每刷新或是提交一次,Page_Load事件就重新绘制页面,将当前页面当新页面来处理。