<%@ page language="C#" autoeventwireup="true" inherits="Admin_GoodsManagement_ManageGoods, ShopWe" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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 runat="server">
    <title>商品管理</title>
    <link href="../css/my.css" rel="stylesheet" type="text/css" />
    <link href="../JS/TableSort/tablesort.css" rel="stylesheet" type="text/css" />
    <link href="../css/volti.css" rel="stylesheet" type="text/css" />
    <link href="../Themes/Default/Plugin/ThickBox/thickbox.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../css/jquery.js"></script>

    <script type="text/javascript" src="../css/admin.js"></script>

    <script type="text/javascript" src="../Themes/Default/Plugin/ThickBox/thickbox.js"></script>

    <style type="text/css"> 

html,body{ 
    height:100%; 
} 
</style>
</head>
<body>
    <form id="form1" runat="server">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="name">
            <tr>
                <td style="width: 305px">
                    <div class="name_noe">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="center" style="height: 22px">
                                    默认操作</td>
                            </tr>
                            <tr>
                                <td align="center">
                                    <asp:Button ID="DeleteSelectGoods" runat="server" Text="删除" OnClick="DeleteSelectGoods_Click"
                                        CssClass="butt_tle" Height="22px" Width="40px" />
                                    <asp:Button ID="GoodsNoSell" runat="server" Text="下架" OnClick="GoodsNoSell_Click"
                                        CssClass="butt_tle" Height="22px" Width="40px" />
                                    <asp:Button ID="UpdateGoodsOrder" runat="server" Text="更新排序" OnClick="UpdateGoodsOrder_Click"
                                        CssClass="butt_tle" Height="22px" Width="65px" />
                                    <input type="button" value="批量添加" onclick="window.location.href='AddGoodsList.aspx'"
                                        class="butt_tle" style="height: 22px; width: 65px" />
                                    <input type="button" value="批量编辑" onclick="window.location.href='EditList.aspx'"
                                        class="butt_tle" style="height: 22px; width: 65px" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td style="width: 165px">
                    <div class="name_noe">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="center" style="height: 22px">
                                    导入导出</td>
                            </tr>
                            <tr>
                                <td align="center">
                                    <asp:Button ID="WriteCsvAllButton" runat="server" Text="全部导出" CssClass="butt_tle"
                                        Height="22px" Width="65px" OnClick="WriteCsvAllButton_Click" />
                                    <asp:Button ID="WriteCsvButton" runat="server" Text="导出" CssClass="butt_tle" OnClick="WriteCsvButton_Click"
                                        Height="22px" Width="40px" />
                                    <input type="button" value="导入" onclick="window.location.href='ReadCsv.aspx'" class="butt_tle"
                                        style="height: 22px; width: 40px" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td style="width: 340px">
                    <div class="name_noe">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="center" style="height: 22px">
                                    搜索商品</td>
                            </tr>
                            <tr>
                                <td align="center">
                                    <asp:TextBox ID="TextBoxGoodsName" runat="server" Width="100px" Height="15px" Text="商品名称或货号"
                                        CssClass="input_tle"></asp:TextBox>
                                    <asp:DropDownList ID="GoodsGroup" runat="server" Width="110px" Height="22px" CssClass="input_tle">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="SearchGoodsTag" runat="server" Width="50px" Height="22px" CssClass="input_tle">
                                        <asp:ListItem>全部</asp:ListItem>
                                        <asp:ListItem>最新</asp:ListItem>
                                        <asp:ListItem>热卖</asp:ListItem>
                                        <asp:ListItem>推荐</asp:ListItem>
                                        <asp:ListItem>促销</asp:ListItem>
                                        <asp:ListItem>配件</asp:ListItem>
                                        <asp:ListItem>精品</asp:ListItem>
                                        <asp:ListItem>潮流</asp:ListItem>
                                        <asp:ListItem>畅销</asp:ListItem>
                                        <asp:ListItem>创意</asp:ListItem>
                                        <asp:ListItem>特价</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:Button ID="SearchButton" runat="server" Text="搜索" OnClick="SearchButton_Click"
                                        CssClass="butt_tle" Height="22px" Width="45px" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
        <div id="all">
            <div class="k_all3">
                <table width="100%" cellpadding="0" cellspacing="0" id="bk">
                    <thead>
                        <tr>
                            <th style="width: 30px; height: 20px;">
                                <input id="ChkAll" type="checkbox" onclick="Check(this,'CheckBoxSelect','RepeaterGoods')" />
                            </th>
                            <th style="width: 40px; height: 20px;">
                                <img src="../css/images/icoi.gif" alt="排序" /><asp:LinkButton ID="CreateSort" CssClass="blue"
                                    runat="server" OnClick="CreateSort_Click">排序</asp:LinkButton>
                            </th>
                            <th style="width: 45px; height: 20px;">
                                图片
                            </th>
                            <th style="width: 370px; height: 20px;">
                                名称
                            </th>
                            <th style="width: 50px; height: 20px;">
                                价格
                            </th>
                            <th style="width: 65px; height: 20px;">
                                修改信息
                            </th>
                            <th>
                                修改详细信息
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:Repeater ID="RepeaterGoods" runat="server" OnItemCommand="RepeaterGoods_ItemCommand">
                            <ItemTemplate>
                                <tr>
                                    <td>
                                        <asp:CheckBox ID="CheckBoxSelect" runat="server" ToolTip='<%# Eval("GoodsGuid") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="GoodsOrder" Width="30px" Text='<%# Eval("GoodsOrder") %>' runat="server"></asp:TextBox></td>
                                    <td style="width: 54px">
                                        <asp:Image ID="GoodsImage" Width="54px" Height="54px" BorderWidth="0" BorderStyle="None"
                                            runat="server" ImageUrl='<%# GetGoodsImage(new Guid(Eval("GoodsGuid").ToString())) %>'
                                            CssClass="img_sx" />
                                    </td>
                                    <td>
                                        <p>
                                            <a href="../../Product.aspx?id=<%# Eval("GoodsGuid") %>" class="blue" target="_blank">
                                                <asp:Label ID="LabelGoodsName" Text='<%# GetSubGoodsName(Eval("GoodsName").ToString())%>'
                                                    runat="server" ToolTip='<%# Eval("GoodsName").ToString()%>'></asp:Label>
                                            </a>&nbsp;分类：<a href='../../GoodsList.aspx?id=<%#Eval("ClassGuid") %>' class="grey"
                                                target="_blank"><%# GetClassName(new Guid(Eval("ClassGuid").ToString())) %></a>&nbsp;库存：<%# GetStock(new Guid(Eval("GoodsGuid").ToString())) %>
                                        </p>
                                        <p>
                                            <asp:LinkButton ID="ButtonNew" CommandName="New" CommandArgument='<%# Eval("GoodsGuid") %>'
                                                CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"最新") %>' runat="server">最新</asp:LinkButton><asp:LinkButton
                                                    ID="ButtonHot" CommandName="Hot" CommandArgument='<%# Eval("GoodsGuid") %>' CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"热卖") %>'
                                                    runat="server">热卖</asp:LinkButton><asp:LinkButton ID="ButtonCommend" CommandName="Commend"
                                                        CommandArgument='<%# Eval("GoodsGuid") %>' CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"推荐") %>'
                                                        runat="server">推荐</asp:LinkButton><asp:LinkButton ID="ButtonPromotion" CommandName="Promotion"
                                                            CommandArgument='<%# Eval("GoodsGuid") %>' CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"促销") %>'
                                                            runat="server">促销</asp:LinkButton><asp:LinkButton ID="ButtonFitting" CommandName="Fitting"
                                                                CommandArgument='<%# Eval("GoodsGuid") %>' CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"配件") %>'
                                                                runat="server">配件</asp:LinkButton>
                                            <asp:LinkButton ID="ButtonChoicest" CommandName="Choicest" CommandArgument='<%# Eval("GoodsGuid") %>'
                                                CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"精品") %>' runat="server">精品</asp:LinkButton><asp:LinkButton
                                                    ID="ButtonTide" CommandName="Tide" CommandArgument='<%# Eval("GoodsGuid") %>'
                                                    CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"潮流") %>' runat="server">潮流</asp:LinkButton><asp:LinkButton
                                                        ID="ButtonBestSeller" CommandName="BestSeller" CommandArgument='<%# Eval("GoodsGuid") %>'
                                                        CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"畅销") %>' runat="server">畅销</asp:LinkButton><asp:LinkButton
                                                            ID="ButtonInnovation" CommandName="Innovation" CommandArgument='<%# Eval("GoodsGuid") %>'
                                                            CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"创意") %>' runat="server">创意</asp:LinkButton><asp:LinkButton
                                                                ID="ButtonDiscount" CommandName="Discount" CommandArgument='<%# Eval("GoodsGuid") %>'
                                                                CssClass='<%# TagState(new Guid(Eval("GoodsGuid").ToString()),"特价") %>' runat="server">特价</asp:LinkButton>
                                        </p>
                                    </td>
                                    <td class="ys_1">
                                        <%# GetPrice(new Guid(Eval("GoodsGuid").ToString())) %>
                                    </td>
                                    <td>
                                        <p>
                                            <img src="../Themes/Default/Images/shop_xl4.png" alt="修改基本信息" />
                                            <a href='UpdateGoods.aspx?id=<%# Eval("GoodsGuid") %>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=780'
                                                class="thickbox" title="修改商品基本信息">基本信息</a></p>
                                        <p>
                                            <img src="../Themes/Default/Images/18.png" alt="复制商品" />
                                            <a href='AddGoods.aspx?CopyID=<%# Eval("GoodsGuid") %>' class="grey" title="复制商品信息">
                                                复制商品</a></p>
                                    </td>
                                    <td>
                                        <p>
                                            <img src="../Themes/Default/Images/46.png" alt="商品属性" />
                                            <a href='UpdateAttribute.aspx?id=<%# Eval("GoodsGuid") %>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=740'
                                                class="thickbox" title="修改商品属性">属性</a>
                                            <img src="../Themes/Default/Images/38.png" alt="商品附加" />
                                            <a href='UpdateOption.aspx?id=<%# Eval("GoodsGuid") %>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=740'
                                                class="thickbox" title="修改商品附加">附加</a>
                                            <p>
                                                <img src="../Themes/Default/Images/fuwei.png" alt="商品参数" />
                                                <a href='UpdateParameter.aspx?id=<%# Eval("GoodsGuid") %>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=740'
                                                    class="thickbox" title="修改商品参数">参数</a>&nbsp;<img src="../Themes/Default/Images/shop_xl3.png"
                                                        alt="相关商品" />
                                                <a href='RelatedGoods.aspx?id=<%# Eval("GoodsGuid") %>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=740'
                                                    class="thickbox" title="修改相关商品">相关</a>
                                            </p>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
            </div>
            <div id="bk_line">
                <div class="txte">
                    <img src="../Themes/Default/Images/bj.png" alt=" " />
                    <asp:Label ID="GoodsCount" runat="server" Text="0"></asp:Label>
                </div>
                <webdiyer:AspNetPager ID="AspNetPagerGoods" runat="server" CssClass="yahoo2" OnPageChanged="AspNetPagerGoods_PageChanged"
                    AlwaysShow="True" UrlPaging="True">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </form>
</body>
</html>
