📄 master_product.aspx
字号:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Master_Product.aspx.cs" Inherits="Master_Product" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder_title" Runat="Server">
<span style="font-size:12px; color:#FFFFFF;font-weight: bold;">管理商品信息</span>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_Pages" Runat="Server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SellOrder_ConnectionString %>"
DeleteCommand="DELETE FROM [Commodity] WHERE [id] = @id"
SelectCommand="SELECT [id], [CommodityName], [ShortName], [ProducePlace], [AddTime], [Username] FROM [Commodity] ORDER BY [AddTime] DESC">
<DeleteParameters>
<asp:Parameter Name="id" Type="Int32" />
</DeleteParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
CellPadding="4" DataKeyNames="id" DataSourceID="SqlDataSource1" ForeColor="#333333"
GridLines="None" Width="98%" EmptyDataText="暂无数据!">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:BoundField DataField="CommodityName" HeaderText="产品名称" />
<asp:BoundField DataField="ShortName" HeaderText="商品简称" />
<asp:BoundField DataField="ProducePlace" HeaderText="产地" />
<asp:BoundField DataField="username" HeaderText="操作用户" />
<asp:BoundField DataField="AddTime" HeaderText="最后修改日期" />
<asp:HyperLinkField DataNavigateUrlFields="Id" DataNavigateUrlFormatString="Edit_Product.aspx?Id={0}"
HeaderText="修 改" NavigateUrl="Edit_Product.aspx" Text="修 改" />
<asp:CommandField HeaderText="删 除" ShowDeleteButton="True" DeleteText="<div id="de" onclick="JavaScript:return confirm('确定删除吗?')">删 除</div>" >
<ItemStyle Height="30px" HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
</asp:CommandField>
</Columns>
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" Height="30px" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" Height="35px" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" Height="30px" />
</asp:GridView>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -