<%@ Page Language="C#" MasterPageFile="MasterPage.Master" AutoEventWireup="true" CodeBehind="SaleStop.aspx.cs" Inherits="SocoShop.Web.Admin.SaleStop" %>
<%@ Register Namespace="SkyCES.EntLib" Assembly="SkyCES.EntLib" TagPrefix="SkyCES"%>
<%@ Import Namespace="SocoShop.Common" %>
<%@ Import Namespace="SocoShop.Business" %>
<%@ Import Namespace="SocoShop.Entity" %>
<%@ Import Namespace="System.Data" %>
<asp:Content ID="MasterContent" ContentPlaceHolderID="ContentPlaceHolder" runat="server">	
<div class="position"><img src="/Admin/Style/Images/PositionIcon.png"  alt=""/>销售分析</div>	
<div class="listBlock">
    <ul>
        <li><a href="SaleTotal.aspx">销售汇总</a></li>
        <li class="listOn"><a href="SaleStop.aspx">滞销分析</a></li>
        <li><a href="SaleDetail.aspx">销售流水账</a></li>      
    </ul>	
</div>
<div class="pageMark">	
    <div class="statisticsSearch">
		    分类：<asp:DropDownList ID="ClassID" runat="server" /> 
            品牌：<asp:DropDownList ID="BrandID" runat="server" />  
            名称：<SkyCES:TextBox CssClass="input" ID="Name" runat="server" Width="100px"/>
	        <asp:Button CssClass="button" ID="SearchButton" Text=" 搜 索 " runat="server"  OnClick="SearchButton_Click" />
    </div>   
    <table class="listTable saleStopTable" cellpadding="0" cellpadding="0">
        <tr class="listTableHead">
	        <td style="width:5%" rowspan="2">ID</td>
	        <td style="width:30%; text-align:left;text-indent:8px;"  rowspan="2">商品名称</td>
	        <td style="width:15%"  rowspan="2">分类</td>
	        <td style="width:40%" colspan="3">最近一次销售</td>
	        <td style="width:10%"  rowspan="2">滞销天数</td>        
        </tr>
        <tr class="listTableHead">
	        <td style="width:10%">订单号</td>
            <td style="width:10%">销售数量</td>
            <td style="width:20%">日期</td>           
        </tr>    
        <%foreach (ProductInfo product in productList){
              DataRow dr = ReadSaleStop(product.ID, dt);
               %>
        <tr class="listTableMain" onmousemove="ChangeColor(this,'#FFFDD7')" onmouseout="ChangeColor(this,'#FFF')">
		    <td style="width:5%"><%=product.ID%></td>
		    <td style="width:30%; text-align:left;text-indent:8px;"><%=product.Name%></td>
            <td style="width:15%"><%= ProductClassBLL.ProductClassNameList(product.ClassID)%></td>
            <%if(dr!=null){ %>
		  	<td style="width:10%"><%=dr["OrderNumber"] %></td>
            <td style="width:10%"><%=dr["BuyCount"] %></td>
            <td style="width:20%"><%=dr["AddDate"]%></td>
            <td style="width:10%"><%=(DateTime.Now.Date-Convert.ToDateTime(dr["AddDate"]).Date).Days%> 天 </td>   
            <%}else{ %>	 
            <td style="width:10%"></td>
            <td style="width:10%"></td>
            <td style="width:20%"></td>
            <td style="width:10%"></td>  
            <%} %>        
	    </tr>
	    <%} %>
    </table>
    <div class="listPage"><SkyCES:CommonPager ID="MyPager" runat="server" /></div>
</div>
</asp:Content>