<%@ Page Language="C#" AutoEventWireup="true" CodeFile="keyWord.aspx.cs" Inherits="webXabara_shop_keyWord" %>

<!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="../InClude/StyleSheet.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body
        {
            margin: 8px 8px 0px 0px;
        }
    </style>
    <script src="/Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="/Scripts/all.js" type="text/javascript"></script>
    <script type="text/javascript">

        function CheckAll(e, itemname) {
            var aa = document.getElementsByName(itemname);
            if (aa == undefined) return;
            for (var i = 0; i < aa.length; i++) aa[i].checked = e.checked;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="divWidth">
        <div class="titleBg">
            管理商品 <asp:DropDownList 
                ID="classID" runat="server" CssClass="inputText" AutoPostBack="True" 
                onselectedindexchanged="classID_SelectedIndexChanged">
                <asp:ListItem Value="">== 分类 ==</asp:ListItem>
            </asp:DropDownList>
        &nbsp;</div>
        <div class="height10px">
        </div>
        <div runat="server" id="listNews">
            <asp:Repeater ID="RepeaterList" runat="server">
            <HeaderTemplate>
                <table width="100%" class="tableLine">
                    <tr>
                        <td class="trTitleBG">
                            <input name="chkall" value="1" type="checkbox" onclick="CheckAll(this,'batDel')" />
                        </td>
                        <td class="trTitleBG">
                            分类
                        </td>
                        <td class="trTitleBG">
                            关键词
                        </td>
                        <td class="trTitleBG">
                            搜索范围
                        </td>
                        <td class="trTitleBG">
                            用途
                        </td>
                        <td class="trTitleBG">
                            价格范围
                        </td>
                        <td class="trTitleBG">
                            状态
                        </td>
                        <td class="trTitleBG">
                            同步时间
                        </td>
                        <td class="trTitleBG">
                            操作
                        </td>
                    </tr>                    
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td style="text-align:center;"><input name="batDel" type="checkbox" value='<%# Eval("id").ToString().Trim()%>' /></td>
                    <td><%# getTreeName(Eval("treeID").ToString().Trim())%></td>
                    <td>
                        <%# Eval("wordName").ToString().Trim()+" <span style=\"color:red;\">"+Eval("keywords").ToString().Trim()+"</span>"%>
                    </td>
                    <td style="text-align:center;">
                        <%# Eval("isTmall").ToString().Trim().Equals("true")?"淘宝商城":"全淘宝"%>
                    </td>
                    <td style="text-align:center;">
                        <%# Eval("useType").ToString().Trim().Equals("pp")?"品牌":"标签"%>
                    </td>
                    <td style="text-align:center;">
                        <%# Eval("startPrice").ToString().Trim() + " - " + Eval("endPrice").ToString().Trim()%>
                    </td>
                    <td style="text-align:center;">
                       <%# Eval("isBad").ToString().Trim().Equals("0")?"启用":"禁用"%>
                    </td>                    
                    <td style="text-align:center;">
                         <%# Convert.ToDateTime(Eval("updateDate")).ToString("yy-MM-dd")%>
                    </td>
                    <td style="text-align:center;">
                        <a href="keyWordEdit.aspx?id=<%# Eval("id").ToString().Trim()%>" style="font-weight:bold;">修改</a>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr>
                    <td style="background-color: #E9F8FC; text-align:center;"><input name="batDel" type="checkbox" value='<%# Eval("id").ToString().Trim()%>' /></td>
                    <td style="background-color: #E9F8FC;"><%# getTreeName(Eval("treeID").ToString().Trim())%></td>
                    <td style="background-color: #E9F8FC;">
                         <%# Eval("wordName").ToString().Trim()+" <span style=\"color:red;\">"+Eval("keywords").ToString().Trim()+"</span>"%>
                    </td>
                    <td style="background-color: #E9F8FC; text-align:center;">
                        <%# Eval("isTmall").ToString().Trim().Equals("true")?"淘宝商城":"全淘宝"%>
                    </td>
                    <td style="background-color: #E9F8FC; text-align:center;">
                        <%# Eval("useType").ToString().Trim().Equals("pp")?"品牌":"标签"%>
                    </td>
                    <td style="text-align:center; background-color: #E9F8FC;">
                        <%# Eval("startPrice").ToString().Trim() + " - " + Eval("endPrice").ToString().Trim()%>
                    </td>
                    <td style="text-align:center;background-color: #E9F8FC;">
                        <%# Eval("isBad").ToString().Trim().Equals("0")?"启用":"禁用"%>
                    </td>
                    <td style=" text-align:center;background-color: #E9F8FC;">
                         <%# Convert.ToDateTime(Eval("updateDate")).ToString("yy-MM-dd")%>
                    </td>
                    <td style="text-align:center;background-color: #E9F8FC;">
                         <a href="keyWordEdit.aspx?id=<%# Eval("id").ToString().Trim()%>" style="font-weight:bold;">修改</a>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        </div>
        <div class="height5px">
        </div>
        <div id="errDiv" runat="server" class="tableAdminLine">
            <div style="height: 150px;">
            </div>
            <div style="text-align:center;">
                <asp:Label ID="errInfo" runat="server" ForeColor="#FF3300"></asp:Label></div>
            <div style="height: 150px;">
            </div>
        </div>
        <div class="height10px">
        </div>
        <div class="tableAdminLine" style="padding: 5px;" id="checkDiv" runat="server">
            <div style="text-align: center; height: 36px; line-height: 36px; background-color: White;">
                全选<input name="chkall" value="1" type="checkbox" onclick="CheckAll(this,'batDel')" />
                &nbsp;<asp:Button 
                    ID="del" runat="server" Text="删除" CssClass="inputBottom" 
                    CausesValidation="False" onclick="del_Click" />&nbsp;<asp:Button 
                    ID="good" runat="server" Text="上架" CssClass="inputBottom" 
                    CausesValidation="False" onclick="good_Click" />&nbsp;<asp:Button 
                    ID="unGood" runat="server" Text="下架" CssClass="inputBottom" 
                    CausesValidation="False" onclick="unGood_Click" />&nbsp;</div>
        </div>
        <div class="height10px">
        </div>
        <div>
            <a name="foot" id="foot"></a><asp:Literal ID="lblCurrentPage" runat="server"></asp:Literal>
        </div>
    </div>
    </form>
</body>
</html>
