📄 merchandiseform.aspx
字号:
<%--文件名:MerchandiseForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MerchandiseForm.aspx.cs" Inherits="GoodsManage_MerchandiseForm" 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="133px">%%</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: gainsboro">
商品编号:<asp:TextBox ID="TextBox2" runat="server" Width="86px"></asp:TextBox>
商品名称:<asp:TextBox ID="TextBox3" runat="server" Width="147px"></asp:TextBox>
规格型号:<asp:TextBox ID="TextBox4" runat="server" Width="79px">未定</asp:TextBox> <br />
生产厂商:<asp:TextBox ID="TextBox5" runat="server" Width="195px">未定</asp:TextBox>
计量单位:<asp:TextBox ID="TextBox6" runat="server" Width="34px">吨</asp:TextBox>
累计采购量:<asp:TextBox ID="TextBox7" runat="server" Width="71px">0</asp:TextBox><br />
累计销售量:<asp:TextBox ID="TextBox8" runat="server" Width="106px">0</asp:TextBox>
建议采购价:<asp:TextBox ID="TextBox9" runat="server" Width="95px">0</asp:TextBox>
建议销售价:<asp:TextBox ID="TextBox10" runat="server" Width="74px">0</asp:TextBox><br />
补充说明:<asp:TextBox ID="TextBox11" runat="server" Width="470px">暂无</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:MySaleDBConnectionString %>"
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="TextBox5" Name="生产厂商" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="计量单位" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox7" Name="累计采购量" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox8" Name="累计销售量" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox9" Name="建议采购价" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox10" Name="建议销售价" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox11" 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" />
<asp:ControlParameter ControlID="TextBox5" Name="生产厂商" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="计量单位" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox7" Name="累计采购量" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox8" Name="累计销售量" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox9" Name="建议采购价" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox10" Name="建议销售价" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox11" 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="1000px">
<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="规格型号" />
<asp:BoundField DataField="生产厂商" HeaderText="生产厂商" SortExpression="生产厂商" />
<asp:BoundField DataField="计量单位" HeaderText="计量单位" SortExpression="计量单位" />
<asp:BoundField DataField="累计采购量" HeaderText="累计采购量" SortExpression="累计采购量" />
<asp:BoundField DataField="累计销售量" HeaderText="累计销售量" SortExpression="累计销售量" />
<asp:BoundField DataField="当前库存量" HeaderText="当前库存量" ReadOnly="True" SortExpression="当前库存量" />
<asp:BoundField DataField="建议采购价" HeaderText="建议采购价" 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 + -