📄 tableform.aspx
字号:
<%--文件名:TableForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="TableForm.aspx.cs" Inherits="BaseManage_TableForm" Title="当前位置:基本管理->台位信息管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 558px; height: 1px">
<tr>
<td align="left" style="font-size: 0.8em; width: 550px; font-family: 宋体; height: 17px;
background-color: deepskyblue">
请输入需要查询的台位编号:<asp:TextBox ID="TextBox4" runat="server" Width="208px">%%</asp:TextBox>
<asp:Button ID="Button3" runat="server" Text="查询" Width="70px" />
<asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="打印" Width="70px" /></td>
</tr>
<tr>
<td align="left" style="font-size: 0.8em; width: 550px; font-family: 宋体; height: 17px;
background-color: lightseagreen">
台位编号:<asp:TextBox ID="TextBox1" runat="server" Width="51px"></asp:TextBox>
容纳人数:<asp:TextBox ID="TextBox2" runat="server" Width="25px">0</asp:TextBox>
所在位置:<asp:TextBox ID="TextBox3" runat="server" Width="88px"></asp:TextBox>
台位类型:<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>普通方桌</asp:ListItem>
<asp:ListItem>普通圆桌</asp:ListItem>
<asp:ListItem>包间方桌</asp:ListItem>
<asp:ListItem>包间圆桌</asp:ListItem>
</asp:DropDownList><br />
当前状态:<asp:DropDownList ID="DropDownList2" runat="server">
<asp:ListItem>空置</asp:ListItem>
<asp:ListItem>在用</asp:ListItem>
<asp:ListItem>停用</asp:ListItem>
</asp:DropDownList>
补充说明:<asp:TextBox ID="TextBox5" runat="server" Width="192px">暂无</asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="新增" Width="70px" /> <asp:Button
ID="Button2" runat="server" OnClick="Button2_Click" Text="修改" Width="70px" />
</td>
</tr>
<tr>
<td style="overflow: auto; width: 550px; height: 103px; background-color: gainsboro">
<asp:Panel ID="Panel1" runat="server" Height="250px" ScrollBars="Auto" Width="555px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1"
DataKeyNames="台位编号" DataSourceID="SqlDataSource1" Font-Names="宋体" Font-Size="Small"
GridLines="None" OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Width="650px">
<FooterStyle BackColor="#C6C3C6" 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="所在位置" />
<asp:BoundField DataField="台位类型" HeaderText="台位类型" SortExpression="台位类型" />
<asp:BoundField DataField="当前状态" HeaderText="当前状态" SortExpression="当前状态" />
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" />
</Columns>
<RowStyle BackColor="#DEDFDE" ForeColor="Black" />
<SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
<HeaderStyle BackColor="Navy" Font-Bold="True" ForeColor="#E7E7FF" HorizontalAlign="Center" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyEateryDBConnectionString %>"
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="TextBox2" Name="容纳人数" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="TextBox3" Name="所在位置" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="台位类型" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="当前状态" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="补充说明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox1" Name="台位编号" PropertyName="Text" Type="String" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox4" Name="台位编号" PropertyName="Text" Type="String" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox1" Name="台位编号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox2" Name="容纳人数" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="TextBox3" Name="所在位置" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="台位类型" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="当前状态" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="补充说明" PropertyName="Text" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</asp:Panel>
</td>
</tr>
</table>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -