📄 goodsform.aspx
字号:
<%--文件名:GoodsForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="GoodsForm.aspx.cs" Inherits="BaseManage_GoodsForm" 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="TextBox7" runat="server" Width="288px">%%</asp:TextBox>
<asp:Button ID="Button3" runat="server" 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="122px"></asp:TextBox>
菜品大类:<asp:TextBox ID="TextBox2" runat="server" Width="90px"></asp:TextBox>
菜品小类:<asp:TextBox ID="TextBox3" runat="server" Width="104px"></asp:TextBox><br />
菜品风味:<asp:TextBox ID="TextBox4" runat="server" Width="90px"></asp:TextBox>
计量单位:<asp:TextBox ID="TextBox5" runat="server" Width="36px"></asp:TextBox>
计量单价:<asp:TextBox ID="TextBox6" runat="server" Width="40px">0</asp:TextBox>
当前状态:<asp:DropDownList ID="DropDownList1" runat="server" Width="78px">
<asp:ListItem>可以供应</asp:ListItem>
<asp:ListItem>暂停供应</asp:ListItem>
</asp:DropDownList><br />
补充说明:<asp:TextBox ID="TextBox8" runat="server" Width="317px">暂无</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"
Font-Names="宋体" Font-Size="Small" GridLines="None" OnRowCreated="GridView1_RowCreated"
OnSelectedIndexChanged="GridView1_SelectedIndexChanged" Width="950px" DataKeyNames="菜品名称" DataSourceID="SqlDataSource1">
<FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
<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" />
<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="计费单价" />
<asp:BoundField DataField="当前状态" HeaderText="当前状态" SortExpression="当前状态" />
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" />
</Columns>
</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="String" />
<asp:ControlParameter ControlID="TextBox3" Name="菜品小类" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="菜品风味" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="计量单位" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="计费单价" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="DropDownList1" Name="当前状态" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox8" Name="补充说明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox1" Name="菜品名称" PropertyName="Text" Type="String" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox7" Name="菜品名称" PropertyName="Text" Type="String" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox1" Name="菜品名称" PropertyName="Text" Type="String" />
<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" />
<asp:ControlParameter ControlID="TextBox5" Name="计量单位" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="计费单价" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="DropDownList1" Name="当前状态" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox8" 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 + -