📄 bookkindform.aspx
字号:
<%--文件名:BookKindForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="BookKindForm.aspx.cs" Inherits="BookManage_BookKindForm" Title="当前位置:图书管理->图书类别设置" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 556px; height: 161px">
<tr>
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 16px;
background-color: darkturquoise">
请输入需要查询图书类别的名称:<asp:TextBox ID="TextBox1" runat="server" Width="106px">%%</asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="查询" Width="70px" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="新增" Width="70px" />
<asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="修改" Width="70px" /></td>
</tr>
<tr>
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 27px;
background-color: palegoldenrod">
类别名称:<asp:TextBox ID="TextBox2" runat="server" Width="190px">X</asp:TextBox>
类别编号:<asp:TextBox ID="TextBox3" runat="server" Width="201px">X</asp:TextBox><br />
补充说明:<asp:TextBox ID="TextBox4" runat="server" Width="468px">暂无</asp:TextBox> </td>
</tr>
<tr>
<td style="width: 2232px; height: 100px; background-color: gainsboro">
<asp:Panel ID="Panel1" runat="server" Height="200px" ScrollBars="Auto" Width="553px">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyBooksDBConnectionString %>"
DeleteCommand="DELETE FROM [图书类别] WHERE [类别名称] = @类别名称" InsertCommand="INSERT INTO [图书类别] ([类别名称], [类别编号], [补充说明]) VALUES (@类别名称, @类别编号, @补充说明)"
SelectCommand="SELECT * FROM [图书类别] WHERE ([类别名称] LIKE '%' + @类别名称 + '%')" UpdateCommand="UPDATE [图书类别] SET [类别编号] = @类别编号, [补充说明] = @补充说明 WHERE [类别名称] = @类别名称">
<DeleteParameters>
<asp:Parameter Name="类别名称" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="TextBox3" Name="类别编号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="补充说明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox2" Name="类别名称" PropertyName="Text" Type="String" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="类别名称" PropertyName="Text" Type="String" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox2" Name="类别名称" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="类别编号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="补充说明" PropertyName="Text" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="类别名称"
DataSourceID="SqlDataSource1" Font-Names="宋体" Font-Size="Small" GridLines="Vertical"
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Width="537px">
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<Columns>
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" />
<asp:TemplateField HeaderText="删除" ShowHeader="False">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete"
Text="删除" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="类别名称" HeaderText="类别名称" ReadOnly="True" SortExpression="类别名称" />
<asp:BoundField DataField="类别编号" HeaderText="类别编号" SortExpression="类别编号" />
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" />
</Columns>
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
</asp:Panel>
</td>
</tr>
</table>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -