<%@ Page Language="C#" MasterPageFile="MasterPage.Master" AutoEventWireup="true" CodeBehind="Product.aspx.cs" Inherits="SocoShop.Web.Admin.Product" %>
<%@ Register Namespace="SkyCES.EntLib" Assembly="SkyCES.EntLib" TagPrefix="SkyCES"%>
<%@ Import Namespace="SocoShop.Common" %>
<asp:Content ID="MasterContent" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
<script language="javascript" src="/Admin/js/calendar.js" type="text/javascript"></script>
<div class="position"><img src="/Admin/Style/Images/PositionIcon.png"  alt=""/>商品列表</div>	
<ul class="search">
    <li>
        分类：<asp:DropDownList ID="ClassID" runat="server" /> 
        品牌：<asp:DropDownList ID="BrandID" runat="server" /> 
        关键字：<SkyCES:TextBox CssClass="input" ID="Key" runat="server" Width="100px" title="商品名称，名称拼音首字母或者商品编码"/>
		添加时间：从<SkyCES:TextBox CssClass="input" ID="StartAddDate" runat="server" RequiredFieldType="日期时间"  onfocus="cdr.show(this);"/> 到 <SkyCES:TextBox CssClass="input" ID="EndAddDate" runat="server" RequiredFieldType="日期时间"  onfocus="cdr.show(this);"/><br />
		是否特价：<asp:DropDownList ID="IsSpecial" runat="server"><asp:ListItem Value="">全部</asp:ListItem><asp:ListItem Value="0">否</asp:ListItem><asp:ListItem Value="1">是</asp:ListItem></asp:DropDownList>
		是否新品：<asp:DropDownList ID="IsNew" runat="server"> <asp:ListItem Value="">全部</asp:ListItem><asp:ListItem Value="0">否</asp:ListItem><asp:ListItem Value="1">是</asp:ListItem></asp:DropDownList>
		是否热销：<asp:DropDownList ID="IsHot" runat="server" ><asp:ListItem Value="">全部</asp:ListItem><asp:ListItem Value="0">否</asp:ListItem><asp:ListItem Value="1">是</asp:ListItem></asp:DropDownList>
		是否推荐：<asp:DropDownList ID="IsTop" runat="server"  ><asp:ListItem Value="">全部</asp:ListItem><asp:ListItem Value="0">否</asp:ListItem><asp:ListItem Value="1">是</asp:ListItem></asp:DropDownList>        
        <asp:Button CssClass="button" ID="SearchButton" Text=" 搜 索 " runat="server"  OnClick="SearchButton_Click" />
    </li>
</ul>
<table class="listTable" cellpadding="0" cellpadding="0">
    <tr class="listTableHead">
	    <td style="width:5%">ID</td>
	    <td style="width:10%">图片</td>
	    <td style="width:45%; text-align:left;text-indent:8px;">商品</td>
	    <td style="width:10%">编码</td>
	    <td style="width:5%">特价</td>
	    <td style="width:5%">新品</td>
	    <td style="width:5%">热销</td>
	    <td style="width:5%">推荐</td> 	
	    <td style="width:5%">管理</td>       
	    <td style="width:5%">选择</td>        
    </tr>
<asp:Repeater ID="RecordList" runat="server">
	<ItemTemplate>	     
    	<tr class="listTableMain" onmousemove="ChangeColor(this,'#FFFDD7')" onmouseout="ChangeColor(this,'#FFF')">
		    <td style="width:5%"><%# Eval("ID") %></td>
		    <td style="width:10%;"><img src="<%#Eval("Photo").ToString().Replace("Original","60-60") %>"  onload="photoLoad(this,40,40)"/></td>
		    <td style="width:45%; text-align:left;text-indent:8px;"><a href="/ProductDetail-I<%# Eval("ID") %>.aspx" target="_blank"><%# Eval("Name") %></a></td>
		    <td style="width:10%"><%# Eval("ProductNumber") %></td>
            <td style="width:5%"><span id="IsSpecial<%#Eval("ID") %>" style="cursor:pointer" onclick="UpdateStatus(<%#Eval("ID") %>,'IsSpecial')"><%# ShopCommon.GetBoolString(Eval("IsSpecial"))%></span></td>
            <td style="width:5%"><span id="IsNew<%#Eval("ID") %>" style="cursor:pointer" onclick="UpdateStatus(<%#Eval("ID") %>,'IsNew')"><%# ShopCommon.GetBoolString(Eval("IsNew"))%></span></td>	       
            <td style="width:5%"><span id="IsHot<%#Eval("ID") %>" style="cursor:pointer" onclick="UpdateStatus(<%#Eval("ID") %>,'IsHot')"><%# ShopCommon.GetBoolString(Eval("IsHot"))%></span></td>
            <td style="width:5%"><span id="IsTop<%#Eval("ID") %>" style="cursor:pointer" onclick="UpdateStatus(<%#Eval("ID") %>,'IsTop')"><%# ShopCommon.GetBoolString(Eval("IsTop"))%></span></td> 
		    <td style="width:5%;"><a href="javascript:pop('ProductAdd.aspx?ID=<%# Eval("ID") %>',800,600,'商品修改','ProductAdd')"><img src="Style/Images/edit.gif" alt="修改" title="修改" /></a></td>
		    <td style="width:5%"><input type="checkbox" name="SelectID" value="<%# Eval("ID") %>" /></td> 
        </tr>
    </ItemTemplate>
</asp:Repeater>
</table>
<div class="listPage"><SkyCES:CommonPager ID="MyPager" runat="server" /></div>
<div class="action">
        <input type="button"  value=" 添 加 " class="button"  onclick="pop('ProductAdd.aspx',800,600,'商品添加','ProductAdd')"/>&nbsp;
        <input type="button"  value="商品导出" class="button"  onclick="popPageOnly('ProductExport.aspx?<%=HttpContext.Current.Request.QueryString%>',500,330,'商品导出','ProductAdd')"/>&nbsp;
        <asp:Button CssClass="button" ID="OffSaleButton" Text=" 下 架 " OnClientClick="return checkSelect()" runat="server"  OnClick="OffSaleButton_Click"/>&nbsp;
        <input type="checkbox" name="All" onclick="selectAll(this)" />全选/取消
</div>
</asp:Content>
