<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Product_Product_Manage, V5Shop.Shop.Category" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register TagPrefix="V5Shop" Namespace="V5Shop.Control" Assembly="V5Shop.Control" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>商品管理</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
    <script type="text/javascript" language="javascript" src="js/Control_Calendar.js"></script>
    <style type="text/css">
    #dhtmltooltip {
        font-size: 9pt;
        BORDER-RIGHT: gray 1px solid; 
        PADDING-RIGHT: 4px; 
        BORDER-TOP: gray 1px solid; 
        PADDING-LEFT: 4px; 
        Z-INDEX: 100; 
        FILTER: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=120); 
        VISIBILITY: hidden; 
        PADDING-BOTTOM: 4px; 
        BORDER-LEFT: gray 1px solid; 
        PADDING-TOP: 4px; 
        BORDER-BOTTOM: gray 1px solid; 
        POSITION: absolute; 
        BACKGROUND-COLOR: #cccccc
    }
    </style>
    <div id='dhtmltooltip'>
        <img src="" /></div>

    <script language="javascript" src="js/showimg.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <uc3:ManageHeader ID="ManageHeader1" runat="server" />
        <div>
            <div id="search">
                <div style="padding: 10px 20px; border: 1px #eeeeee solid; background: #f7f7f7; margin: 0 0 5px 0;">
                    <table width="100%">
                        <tr>
                            <td width="80%">
                                <div>
                                    <asp:Label ID="lblName" runat="server" Text="商品名称："></asp:Label><asp:TextBox Width="100px" ID="txtName" runat="server"></asp:TextBox>
                                    <asp:Label ID="lblNumber" runat="server" Text="商品编号："></asp:Label><asp:TextBox Width="80px" ID="txtNumber" runat="server"></asp:TextBox>
                                    <asp:Label ID="lblCategoryId" runat="server" Text="商品分类："></asp:Label><asp:DropDownList ID="ddlCategoryId" runat="server">
                                    </asp:DropDownList>
                                    <asp:Label ID="Label1" runat="server" Text="商品标签："></asp:Label><asp:DropDownList ID="ddlTags" runat="server">
                                    </asp:DropDownList>                                    
                                </div>
                                <div id="searchmore" style="display: none;">
                                    <div>
                                        <asp:Label ID="lblPrice" runat="server" Text="价格范围："></asp:Label><asp:TextBox ID="txtPriceStart" runat="server" Width="80px"></asp:TextBox><asp:RegularExpressionValidator
                                            ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtPriceStart"
                                            Display="Dynamic" ErrorMessage="只能为数字" ValidationExpression="\d*(\.\d+)*"></asp:RegularExpressionValidator>-
                                        <asp:TextBox ID="txtPriceEnd" runat="server" Width="80px"></asp:TextBox><asp:RegularExpressionValidator
                                            ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtPriceEnd"
                                            Display="Dynamic" ErrorMessage="只能为数字" ValidationExpression="\d*(\.\d+)*"></asp:RegularExpressionValidator><asp:Label
                                                ID="lblStatus" runat="server" Text="状态："></asp:Label><asp:DropDownList ID="ddlStatus" runat="server">
                                        </asp:DropDownList>
                                        <asp:Label ID="lblVirtual" runat="server" Text="商品性质："></asp:Label><asp:DropDownList ID="ddlVirtual" runat="server">
                                        </asp:DropDownList>
                                        <asp:Label ID="lblIsPresent" runat="server" Text="赠品配件："></asp:Label><asp:DropDownList ID="ddlIsPresent" runat="server">
                                            <asp:ListItem Text="全部" Value=""></asp:ListItem>
                                            <asp:ListItem Text="是" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="否" Value="1"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                    <div>
                                        <asp:Label ID="lblIsRecommend" runat="server" Text="是否推荐："></asp:Label><asp:DropDownList ID="ddlIsRecommend" runat="server">
                                        </asp:DropDownList>
                                        <asp:Label ID="lblIsNew" runat="server" Text="是否新品："></asp:Label><asp:DropDownList ID="ddlIsNew" runat="server">
                                        </asp:DropDownList>
                                        <asp:Label ID="lblIsSpecialOffer" runat="server" Text="是否特价："></asp:Label><asp:DropDownList ID="ddlIsSpecialOffer" runat="server">
                                        </asp:DropDownList>
                                        <asp:Label ID="lblIsHot" runat="server" Text="是否热点："></asp:Label><asp:DropDownList ID="ddlIsHot" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                    <div>
                                        <asp:Label ID="lblBrandId" runat="server" Text="商品品牌："></asp:Label><asp:DropDownList ID="ddlBrandId" runat="server">
                                        </asp:DropDownList>
                                        <asp:Label ID="lblAddTime" runat="server" Text="添加时间："></asp:Label><asp:TextBox ID="txtStartDate" runat="server" Width="80px"></asp:TextBox><asp:RegularExpressionValidator
                                            ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtStartDate"
                                            Display="Dynamic" ErrorMessage="日期格式不正确" ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                                        <img id="sltStart" src="images/calendar1.gif" title="打开日历" alt="打开日历" align="absmiddle" />-
                                        <asp:TextBox ID="txtEndDate" runat="server" Width="80px"></asp:TextBox><asp:RegularExpressionValidator
                                            ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtEndDate"
                                            Display="Dynamic" ErrorMessage="日期格式不正确" ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                                        <img id="sltEnd" src="images/calendar1.gif" title="打开日历" alt="打开日历" align="absmiddle" /></div>
                                </div>
                            </td>
                            <td width="45%" align="left">
                                <a href="javascript:void(0);" onclick="HiddenOrShowSearch()">
                                    <img id="searchimg" src="images/more.gif" align="absmiddle" />
                                    <span id="searchwd">更多</span></a> <span>
                                        <asp:Button ID="Button1" runat="server" Text="查询" CssClass="button" OnClick="btnSearch_Click" />
                                    </span>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div id="content">
                <div style="padding: 3px 25px; color: #4B6888; border-bottom: 1px #CCCCCC solid">
                    <input type="checkbox" id="CheckAllBox" onclick="CheckAll()" class="checkbox" />
                    全选
　
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" OnClick="btnAdd_Click"><img src="images/icon/key_add.gif" /> 添加</asp:LinkButton>
                    <asp:LinkButton ID="btnCopy" runat="server" ForeColor="#4B6888" OnClick="btnCopy_Click" OnClientClick="return CheckEdit()"><img src="images/icon/key_add.gif" /> 复制添加</asp:LinkButton>
<asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" OnClick="btnEdit_Click"
                        OnClientClick="return CheckEdit()"><img src="images/icon/key_edit.gif" /> 编辑</asp:LinkButton>
<asp:LinkButton ID="btnDel" runat="server" ForeColor="#4B6888" OnClick="btnDel_Click"
                        OnClientClick="return CheckDel()"><img src="images/icon/key_delete.gif" /> 删除</asp:LinkButton>
                    <asp:LinkButton ID="btnUp" runat="server" ForeColor="#4B6888" OnClick="btnUp_Click"
                        OnClientClick="return CheckUp()"><img src="images/icon/key_top.gif" /> 向上</asp:LinkButton>
<asp:LinkButton ID="btnDown" runat="server" ForeColor="#4B6888" OnClick="btnDown_Click"
                        OnClientClick="return CheckDown()"><img src="images/icon/key_down.gif" /> 向下</asp:LinkButton>
<asp:LinkButton ID="btnAddVirutalCard" runat="server" ForeColor="#4B6888" OnClientClick="return CheckEdit()"
                        OnClick="btnAddVirutalCard_Click"><img src="images/icon/key_add2.gif" /> 补货</asp:LinkButton>
<asp:LinkButton ID="btnRelatedProduct" runat="server" ForeColor="#4B6888" OnClientClick="return CheckEdit()"
                        OnClick="btnRelatedProduct_Click"><img src="images/icon/key_copy.gif" /> 相关商品</asp:LinkButton>
<asp:LinkButton ID="btnRelatedArticle" runat="server" ForeColor="#4B6888" OnClientClick="return CheckEdit()"
                        OnClick="btnRelatedArticle_Click"><img src="images/icon/key_copy.gif" /> 相关文章</asp:LinkButton>
                    <asp:DropDownList ID="ddlPorperytyType" runat="server">
                    </asp:DropDownList>
                    <asp:Button ID="btnExecute" runat="server" CssClass="button" OnClick="btnExecute_Click"
                        Text="确定" OnClientClick="return CheckSelect()" /></div>
                <div class="listborder">
          
                    <V5Shop:NewV5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" CssClass="datalist" HeaderStyle-Height="18px" HeaderStyle-ForeColor="#000"
                        EmptyDataText="没有查询到任何记录" PageSize="12" BorderWidth="0px" GridLines="None" Width="100%">
                        <Columns>
                            <asp:TemplateField>
                                <itemstyle horizontalalign="Center" width="3%" />
                                <itemtemplate>
                            <input runat="server" Value='<%# Eval("ID") %>' ID="CheckBoxID" type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" mouse="out" class="checkbox">
</itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="商品名称" SortExpression="Name">
                                <itemstyle width="25%" />
                                <itemtemplate>
 [<%#Eval("Number") %>]<a href="../product.aspx?id=<%#Eval("ID") %>" target="_blank"><asp:Label runat="server" Text='<%#Eval("Name") %>' id="ProductName"></asp:Label></a>
</itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="图片" SortExpression="SrcDetail">
                                <itemstyle width="5%" />
                                <itemtemplate>
<img src="images/icon-viewpic.gif" onMouseOver="javascript:ddrivetip('<img src=../<%#GetTmpImg(Eval("SrcDetail").ToString()) %>>','#ffffff',100)" onMouseOut="hideddrivetip()" />
</itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="CategoryName" SortExpression="CategoryId" HeaderText="商品分类">
                                <itemstyle width="10%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Storage" SortExpression="Storage" HeaderText="库存">
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="MemberPrice" SortExpression="MemberPrice" HeaderText="价格">
                                <itemstyle width="8%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="ReviewCount" SortExpression="ReviewCount" HeaderText="评论">
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="BuyCount" SortExpression="BuyCount" HeaderText="购买">
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CollectCount" SortExpression="CollectCount" HeaderText="收藏">
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="HitCount" SortExpression="HitCount" HeaderText="点击">
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="架" SortExpression="IsOnSale">
                                <itemstyle width="3%" />
                                <itemtemplate>
<asp:Label runat="server" Text='<%# FormatProductProperty(DataBinder.Eval(Container,"DataItem(IsOnSale)","{0}")) %>' id="IsOnSale"></asp:Label>
</itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="虚" SortExpression="IsVirtual">
                                <itemstyle width="3%" />
                                <itemtemplate>
<asp:Label runat="server" Text='<%# FormatProductProperty(DataBinder.Eval(Container,"DataItem(IsVirtual)","{0}")) %>' id="IsVirtual"></asp:Label>
</itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="荐" SortExpression="IsRecommond">
                                <itemstyle width="3%" />
                                <itemtemplate>
<asp:Label runat="server" Text='<%# FormatProductProperty(DataBinder.Eval(Container,"DataItem(IsRecommond)","{0}")) %>' id="IsRecommond"></asp:Label>
</itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="特" SortExpression="IsSpecialOffer">
                                <itemstyle width="3%" />
                                <itemtemplate>
<asp:Label runat="server" Text='<%# FormatProductProperty(DataBinder.Eval(Container,"DataItem(IsSpecialOffer)","{0}")) %>' id="IsSpecialOffer"></asp:Label>
</itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="新" SortExpression="IsNew">
                                <itemstyle width="3%" />
                                <itemtemplate>
<asp:Label runat="server" Text='<%# FormatProductProperty(DataBinder.Eval(Container,"DataItem(IsNew)","{0}")) %>' id="IsNew"></asp:Label>
</itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="热" SortExpression="IsHot">
                                <itemstyle width="3%" />
                                <itemtemplate>
<asp:Label runat="server" Text='<%# FormatProductProperty(DataBinder.Eval(Container,"DataItem(IsHot)","{0}")) %>' id="IsHot"></asp:Label>
</itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="OrderID" HeaderText="排序" SortExpression="OrderID">
                                <itemstyle width="5%" />
                            </asp:BoundField>
                        </Columns>
                        <PagerSettings Mode="NumericFirstLast" />
                        <HeaderStyle CssClass="category" ForeColor="Black" Height="18px" />
                    </V5Shop:NewV5ShopGridView>
                <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
                <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
                  
                </div>
            </div>
            <div id="hiddenfield">
                <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
                <uc1:HiddenField ID="Alert" runat="server" />
                
                
                                
                <!--记录搜索状态-->
                <asp:HiddenField ID="SearchRecord" runat="server" Value="0" />

                <script language="javascript">
                CheckSearchRecord();
                            //日历控件
        Calendar.setup({
	        inputField     :    "txtStartDate",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "sltStart",
	        align          :    "Br",
	        singleClick    :    true
        });
        Calendar.setup({
	        inputField     :    "txtEndDate",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "sltEnd",
	        align          :    "Br",
	        singleClick    :    true
        }); 
                </script>

            </div>
            <uc2:PageBottom ID="PageBottom1" runat="server" />
        </div>
    </form>
</body>
</html>
