📄 productmanage.aspx
字号:
<%@ Page Language="C#" EnableEventValidation="false" MasterPageFile="~/Admin/MasterPage.master"
AutoEventWireup="true" Inherits="PowerEasy.WebSite.Admin.Shop.ProductManage"
Codebehind="ProductManage.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="Server">
<asp:ScriptManager ID="ScriptManageContent" runat="server" />
<pe:ProductManageNavigation ID="Pmn" runat="server" />
<div style="padding-top: 5px;">
<table style="width: 100%; margin: 0 auto;" cellpadding="1" cellspacing="1" class="border">
<tr>
<td class="tdbg">
<table border="0">
<tr>
<td style="width: 65px" align="left" class="tdbg">
<b>快速查找:</b>
</td>
<td class="tdbg">
<asp:DropDownList ID="DropSearch" AutoPostBack="true" runat="server" OnSelectedIndexChanged="DropSearch_SelectedIndexChanged">
<asp:ListItem Value="20" Text="所有商品"></asp:ListItem>
<asp:ListItem Value="21" Text="正在销售的商品"></asp:ListItem>
<asp:ListItem Value="22" Text="未销售的商品"></asp:ListItem>
<asp:ListItem Value="23" Text="正常销售的商品"></asp:ListItem>
<asp:ListItem Value="24" Text="特价处理的商品"></asp:ListItem>
<asp:ListItem Value="25" Text="所有热销的商品"></asp:ListItem>
<asp:ListItem Value="26" Text="所有新品"></asp:ListItem>
<asp:ListItem Value="27" Text="所有精品商品"></asp:ListItem>
<asp:ListItem Value="28" Text="有促销活动的商品"></asp:ListItem>
<asp:ListItem Value="29" Text="实际库存报警的商品"></asp:ListItem>
<asp:ListItem Value="30" Text="预定库存报警的商品"></asp:ListItem>
<asp:ListItem Value="31" Text="已售完的商品"></asp:ListItem>
<asp:ListItem Value="32">所有批发商品</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</td>
<td class="tdbg">
<table border="0">
<tr>
<td style="width: 65px">
<b>高级查询:</b>
</td>
<td>
<asp:DropDownList ID="DropSearchField" runat="server">
<asp:ListItem Value="">请选择</asp:ListItem>
<asp:ListItem Value="ProductName">商品名称</asp:ListItem>
<asp:ListItem Value="ProductIntro">商品简介</asp:ListItem>
<asp:ListItem Value="ProductExplain">商品介绍</asp:ListItem>
<asp:ListItem Value="ProducerName">厂商</asp:ListItem>
<asp:ListItem Value="TrademarkName">品牌/商标</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:TextBox ID="TxtKeyword" runat="server" Text="关键字"></asp:TextBox>
<asp:Button ID="BtnSearch" runat="server" Text="搜索" OnClick="BtnSearch_Click" />
</td>
</tr>
</table>
</td>
<td align="left" class="tdbg">
<pe:ExtendedButton ID="EBtnProductHtml" runat="server" Text=" 生成HTML管理" IsChecked="true"
OperateCode="ProductManage" OnClick="EBtnProductHtml_Click" />
<asp:Button ID="BtnProductRecycle" runat="server" OnClick="BtnProductRecycle_Click"
Text="商品回收站管理" />
</td>
</tr>
</table>
</div>
<br />
<table style="width: 100%; margin: 0 auto;" cellpadding="0" cellspacing="0">
<tr>
<td>
<pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" runat="server" />
</td>
<td align="right">
排序方式:
<asp:DropDownList ID="DropRescentQuery" AutoPostBack="true" OnSelectedIndexChanged="DropSelectedIndex_Changed"
runat="server">
<asp:ListItem Value="-1">按ID降序</asp:ListItem>
<asp:ListItem Value="-2">按ID升序</asp:ListItem>
<asp:ListItem Value="1">按推荐级别降序</asp:ListItem>
<asp:ListItem Value="2">按推荐级别升序</asp:ListItem>
<asp:ListItem Value="3">按优先级别降序</asp:ListItem>
<asp:ListItem Value="4">按优先级别升序</asp:ListItem>
<asp:ListItem Value="5">按日点击数降序</asp:ListItem>
<asp:ListItem Value="6">按日点击数升序</asp:ListItem>
<asp:ListItem Value="7">按周点击数降序</asp:ListItem>
<asp:ListItem Value="8">按周点击数升序</asp:ListItem>
<asp:ListItem Value="9">按月点击数降序</asp:ListItem>
<asp:ListItem Value="10">按月点击数升序</asp:ListItem>
<asp:ListItem Value="11">按总点击数降序</asp:ListItem>
<asp:ListItem Value="12">按总点击数升序</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="Server">
<pe:ExtendedGridView ID="GdvProductList" runat="server" AutoGenerateColumns="False"
OnRowDataBound="GdvProductList_RowDataBound" AllowPaging="True" DataSourceID="OdsProductList"
AutoGenerateCheckBoxColumn="True" OnRowCommand="GdvProductList_RowCommand" DataKeyNames="GeneralId,ProductId,TableName,ProductName"
ItemName="商品" ItemUnit="个" CheckBoxFieldHeaderWidth="3%" SerialText="">
<Columns>
<pe:TemplateField HeaderText="商品名称" SortExpression="ProductName">
<ItemStyle HorizontalAlign="Left" />
<ItemTemplate>
<pe:LinkImage ID="LinkImageModel" runat="server">
<asp:Label ID="LblProductName" runat="server" Text=""></asp:Label></pe:LinkImage>
</ItemTemplate>
</pe:TemplateField>
<pe:BoundField DataField="Unit" HeaderText="单位" SortExpression="Unit" HtmlEncode="False">
<HeaderStyle Width="5%" />
</pe:BoundField>
<pe:TemplateField HeaderText="库存" SortExpression="Stocks">
<ItemStyle HorizontalAlign="Right" Width="6%" />
<ItemTemplate>
<%#Eval("Stocks")%>
</ItemTemplate>
</pe:TemplateField>
<pe:TemplateField HeaderText="价格" SortExpression="Price">
<ItemStyle HorizontalAlign="Right" />
<HeaderStyle Width="7%" />
<ItemTemplate>
<asp:Label ID="LblProductPrice" runat="server" Text=""></asp:Label>
</ItemTemplate>
</pe:TemplateField>
<pe:TemplateField HeaderText="类型" SortExpression="ProductType">
<HeaderStyle Width="5%" />
<ItemTemplate>
<asp:Label ID="LblProductType" runat="server"></asp:Label>
</ItemTemplate>
</pe:TemplateField>
<pe:TemplateField HeaderText="推荐级别" SortExpression="EliteLevel">
<ItemStyle HorizontalAlign="Right" Width="7%" />
<ItemTemplate>
<%#Eval("EliteLevel")%>
</ItemTemplate>
</pe:TemplateField>
<pe:TemplateField HeaderText="商品属性">
<HeaderStyle Width="10%" />
<ItemTemplate>
<asp:Label ID="LblProductAttribute" runat="server"></asp:Label>
</ItemTemplate>
</pe:TemplateField>
<pe:TemplateField HeaderText="销售中" SortExpression="Saling">
<HeaderStyle Width="6%" />
<ItemTemplate>
<%#(bool)Eval("EnableSale") ? "√" : "<font color=red>×</font>"%>
</ItemTemplate>
</pe:TemplateField>
<pe:TemplateField HeaderText="已生成" SortExpression="Created">
<HeaderStyle Width="6%" />
<ItemTemplate>
<%# (DateTime)Eval("CreateTime") <= (DateTime)Eval("UpdateTime") ? "<font color=red>×</font>" : "√"%>
</ItemTemplate>
</pe:TemplateField>
<pe:TemplateField HeaderText="操作">
<HeaderStyle Width="9%" />
<ItemTemplate>
<%-- <pe:ExtendedAnchor IsChecked="true" runat="server" OperateCode="ProductModify" href='<%#string.Format("Product.aspx?Action=Modify&NodeID={0}&GeneralID={1}&ModelID={2}&LinkType={3}",Eval("NodeID"),Eval("GeneralID"),Eval("ModelID"),Eval("LinkType")) %>'>修改</pe:ExtendedAnchor>
--%>
<asp:HyperLink runat="server" ID="LbtnModify" NavigateUrl='<%#string.Format("Product.aspx?Action=Modify&NodeID={0}&GeneralID={1}&ModelID={2}&LinkType={3}",Eval("NodeID"),Eval("GeneralID"),Eval("ModelID"),Eval("LinkType")) %>'
Text="修改" />
<asp:LinkButton ID="LbtnDelete" runat="server" CommandName="DeleteProduct" OnClientClick="if(!this.disabled) return confirm('确实要删除此商品吗(有订单的商品无法删除)?删除后还可以从回收站中还原!');">删除</asp:LinkButton>
</ItemTemplate>
</pe:TemplateField>
</Columns>
</pe:ExtendedGridView>
<asp:HiddenField ID="HdnListType" runat="server" Value="-1" />
<asp:HiddenField ID="HdnStatus" runat="server" Value="100" />
<asp:HiddenField ID="HdnSearch" runat="server" Value="SpeedSearch" />
<asp:HiddenField ID="HdnKeyword" runat="server" Value="20" />
<asp:ObjectDataSource ID="OdsProductList" runat="server" SelectCountMethod="GetTotalOfAllProducts"
SelectMethod="GetProductsList" TypeName="PowerEasy.Shop.Product" DeleteMethod="Delete"
EnablePaging="true" StartRowIndexParameterName="startRowIndexId" MaximumRowsParameterName="maxNumberRows">
<DeleteParameters>
<asp:Parameter Name="generalId" Type="String" />
</DeleteParameters>
<SelectParameters>
<asp:ControlParameter ControlID="HdnSearch" Type="String" Name="searchType" PropertyName="Value" />
<asp:ControlParameter ControlID="HdnKeyword" Type="String" Name="keyword" PropertyName="Value" />
<asp:QueryStringParameter Name="nodeId" QueryStringField="NodeID" Type="Int32" />
<asp:ControlParameter ControlID="HdnListType" Type="Int32" Name="listType" PropertyName="Value" />
<asp:ControlParameter ControlID="HdnStatus" Type="Int32" Name="status" PropertyName="Value" />
</SelectParameters>
</asp:ObjectDataSource>
<br />
<table border="0">
<tr>
<td align="left">
<input id="ChkAll" onclick="javascript:CheckAll(this);" type="checkbox" /><label
for="ChkAll">选中本页显示的所有商品</label>
</td>
<td align="left">
<asp:Button ID="BtnStartSale" runat="server" CommandName="BtnStartSale" Text="开始销售"
OnClick="ExecuteCommand" />
<asp:Button ID="BtnSetHot" runat="server" CommandName="BtnSetHot" Text="设为热卖" OnClick="ExecuteCommand" />
<asp:Button ID="BtnSetBest" runat="server" CommandName="BtnSetBest" Text="设为精品" OnClick="ExecuteCommand" />
<asp:Button ID="BtnSetNew" runat="server" CommandName="BtnSetNew" Text="设为新品" OnClick="ExecuteCommand" />
<asp:Button ID="BtnDelete" runat="server" CommandName="BtnDelete" OnClientClick="return confirm('是否要删除记录?')"
Text="批量删除" OnClick="ExecuteCommand" />
<asp:Button ID="BtnBatchMove" Visible="false" runat="server" CommandName="BtnBatchMove"
Text="批量移动" OnClick="ExecuteCommand" />
<br />
<asp:Button ID="BtnStopSale" runat="server" CommandName="BtnStopSale" Text="停止销售"
OnClick="ExecuteCommand" />
<asp:Button ID="BtnStopHot" runat="server" CommandName="BtnStopHot" Text="取消热卖" OnClick="ExecuteCommand" />
<asp:Button ID="BtnStopBest" runat="server" CommandName="BtnStopBest" Text="取消精品"
OnClick="ExecuteCommand" />
<asp:Button ID="BtnStopNew" runat="server" CommandName="BtnStopNew" Text="取消新品" OnClick="ExecuteCommand" />
<asp:Button ID="BtnBatchSet" runat="server" CommandName="BtnBatchSet" Text="批量设置"
OnClick="ExecuteCommand" />
<!--<pe:ExtendedButton IsChecked="true" OperateCode="ProductModify" ID="BtnStopElite"
runat="server" CommandName="BtnStopElite" Text="不推荐" OnClick="ExecuteCommand" />
<pe:ExtendedButton IsChecked="true" OperateCode="ProductModify" ID="BtnSetElite"
runat="server" CommandName="BtnSetElite" Text="设置推荐" OnClick="ExecuteCommand" />-->
</td>
</tr>
</table>
<br />
<br />
<br />
<b>商品属性中的各项含义:</b><br />
<font color="blue">精</font>----推荐精品,<font color="red">热</font>----热门商品,<font color="green">新</font>----推荐新品,<font
color="blue">图</font>----有商品缩略图
<br />
<br />
<br />
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -