ShopingNet/Pages/Background/ProductManage/ProductDelete.aspx

(完整代码) 3KB

<%@ Page Language="C#" MasterPageFile="~/Pages/MasterPages/Main.master" AutoEventWireup="true" CodeFile="ProductDelete.aspx.cs" Inherits="Pages_Background_ProductManage_ProductDelete" Title="产品信息查看" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table width="600" border="0" cellspacing="0" cellpadding="0" style="width:100%;">
 <tr>
<td style="width: 100%; background-color: #fda702"><span style="color: #ffffff">
     产品信息页</span></td>
 </tr>
 </table>
    <div style="width:100%;">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        DataKeyNames="ProductID" DataSourceID="SDS_ProductDel" Width="100%" OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="ProductID" DataNavigateUrlFormatString="~/Pages/Background/ProductManage/ProductUpdate.aspx?id={0}"
                DataTextField="ProductName" HeaderText="产品名" NavigateUrl="~/Pages/Background/ProductManage/ProductUpdate.aspx"
                Text="id" />
            <asp:BoundField DataField="ProductID" HeaderText="产品编号" InsertVisible="False" ReadOnly="True"
                SortExpression="ProductID" />
            <asp:BoundField DataField="ProductClassID" HeaderText="产品类别号" SortExpression="ProductClassID" />
            <asp:BoundField DataField="ProductUnitPrice" HeaderText="单价" SortExpression="ProductUnitPrice" />
            <asp:BoundField DataField="ProductCount" HeaderText="库存" SortExpression="ProductCount" />
            <asp:BoundField DataField="PrductDate" HeaderText="上架日期" SortExpression="PrductDate" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SDS_ProductDel" runat="server" ConnectionString="<%$ ConnectionStrings:ShopingNetConnectionString %>"
        DeleteCommand="DELETE FROM [Tab_Products] WHERE [ProductID] = @ProductID" InsertCommand="INSERT INTO [Tab_Products] ([ProductName], [ProductClassID], [ProductUnitPrice], [ProductCount], [ProductContent], [PrductDate], [ProductImg]) VALUES (@ProductName, @ProductClassID, @ProductUnitPrice, @ProductCount, @ProductContent, @PrductDate, @ProductImg)"
        SelectCommand="SELECT * FROM [Tab_Products]" UpdateCommand="UPDATE [Tab_Products] SET [ProductName] = @ProductName, [ProductClassID] = @ProductClassID, [ProductUnitPrice] = @ProductUnitPrice, [ProductCount] = @ProductCount, [ProductContent] = @ProductContent, [PrductDate] = @PrductDate, [ProductImg] = @ProductImg WHERE [ProductID] = @ProductID">
        <DeleteParameters>
            <asp:Parameter Name="ProductID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="ProductName" Type="String" />
            <asp:Parameter Name="ProductClassID" Type="Int32" />
            <asp:Parameter Name="ProductUnitPrice" Type="Double" />
            <asp:Parameter Name="ProductCount" Type="Int32" />
            <asp:Parameter Name="ProductContent" Type="String" />
            <asp:Parameter Name="PrductDate" Type="String" />
            <asp:Parameter Name="ProductImg" Type="String" />
            <asp:Parameter Name="ProductID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="ProductName" Type="String" />
            <asp:Parameter Name="ProductClassID" Type="Int32" />
            <asp:Parameter Name="ProductUnitPrice" Type="Double" />
            <asp:Parameter Name="ProductCount" Type="Int32" />
            <asp:Parameter Name="ProductContent" Type="String" />
            <asp:Parameter Name="PrductDate" Type="String" />
            <asp:Parameter Name="ProductImg" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    </div>
</asp:Content>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。