<%@ Page language="c#" Codebehind="Category.aspx.cs" AutoEventWireup="false" Inherits="wqeshop.Admin.Category" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Category</title>
<LINK href="inc/style.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
  <table width="100%" height="550" style="border:1px #619ADF solid; border-left:0;margin-top:6px; margin-right:7px;background:#F2F7FD;" cellspacing="0" cellpadding="0">
    <tr>
      <td valign="top"><div class="top">
          <table width="100%" align="center" cellspacing="0" cellpadding="0">
            <tr>
              <td class="tl"></td>
              <td class="tm"><span class="tt">商品类别管理</span></td>
              <td class="tm2">每页显示
                <asp:DropDownList ID="showSum" runat="server" AutoPostBack="True" Width="40px">
                  <asp:ListItem>5</asp:ListItem>
                  <asp:ListItem>10</asp:ListItem>
                  <asp:ListItem>15</asp:ListItem>
                  <asp:ListItem>20</asp:ListItem>
                  <asp:ListItem>25</asp:ListItem>
                  <asp:ListItem>30</asp:ListItem>
                  <asp:ListItem>35</asp:ListItem>
                  <asp:ListItem>40</asp:ListItem>
                  <asp:ListItem>45</asp:ListItem>
                  <asp:ListItem>50</asp:ListItem>
                </asp:DropDownList>
                个一级分类</td>
              <td class="tr"></td>
            </tr>
          </table>
        </div>
        <div class="mframe">
          <table width="100%" align="center" cellspacing="0" cellpadding="0">
            <tr>
              <td class="tl"></td>
              <td class="tm"><div class="tt">&nbsp; 商品管理</div></td>
              <td class="tr"></td>
            </tr>
          </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td class="ml"></td>
              <td  class="mm" bgcolor="#EBF3FE" valign="top" style=" border-right:1px #77ABE5 solid;"><table class="tableBorder" cellSpacing="0" cellPadding="0" width="640" align="center" border="0">
                  <tr>
                    <td height="23" class="forumRowHighlight"><asp:datagrid id="dgCategoryList" runat="server" AllowPaging="False" PagerStyle-Mode="NumericPages"
							AutoGenerateColumns="False" DataKeyField="CategoryID" Width="100%" HorizontalAlign="Center"
							HeaderStyle-CssClass="summary-title">
                        <HeaderStyle Font-Bold="True"></HeaderStyle>
                        <Columns>
                        <asp:TemplateColumn HeaderText="分类ID" ItemStyle-Width="40" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                          <HeaderStyle></HeaderStyle>
                          <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "CategoryID") %> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="排序" ItemStyle-Width="30" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                          <HeaderStyle></HeaderStyle>
                          <ItemTemplate> <a href='Actions.aspx?Action=ChangeCatSort&Type=D&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'> <img src="images/a_down.gif" border="0" style='VISIBILITY:<%# GetVisibility(DataBinder.Eval(Container.DataItem, "Sort").ToString(),DataBinder.Eval(Container.DataItem, "ParentID").ToString(),"D") %>'></a> <a href='Actions.aspx?Action=ChangeCatSort&Type=U&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'> <img src="images/a_up.gif" border="0" style='VISIBILITY:<%# GetVisibility(DataBinder.Eval(Container.DataItem, "Sort").ToString(),DataBinder.Eval(Container.DataItem, "ParentID").ToString(),"U") %>'></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="类别名称(商品数量)" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                          <ItemTemplate> <img src="../images/empty.gif" width='<%#10*(int)DataBinder.Eval(Container.DataItem,"Depth")%>' height="1" align="absmiddle">├<a href='Category.aspx?Keyword=&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&Page=<%=Request.QueryString["Page"] %>&PageSize=<%=Request.QueryString["PageSize"] %>'><%# DataBinder.Eval(Container.DataItem, "Name") %></a> (<%# wqeshop.WebUtils.ProductNum(DataBinder.Eval(Container.DataItem, "CategoryID").ToString()) %>) </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="顶部显示" ItemStyle-Width="60" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                          <HeaderStyle></HeaderStyle>
                          <ItemTemplate> <a href='Actions.aspx?Action=ChangeInBar&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "InBar") %>'> <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "InBar") %>.png' border="0"></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="左边显示" ItemStyle-Width="60" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                          <HeaderStyle></HeaderStyle>
                          <ItemTemplate> <a href='Actions.aspx?Action=ChangeInNav&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "InNav") %>'> <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "InNav") %>.png' border="0"></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="在子类列表中显示" ItemStyle-Width="60" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                          <HeaderStyle></HeaderStyle>
                          <ItemTemplate> <a href='Actions.aspx?Action=ChangeIsShow&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "IsShow") %>'> <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsShow") %>.png' border="0"></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="是否发布" ItemStyle-Width="60" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                          <HeaderStyle></HeaderStyle>
                          <ItemTemplate> <a href='Actions.aspx?Action=ChangeCatActive&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "IsActive") %>'> <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsActive") %>.png' border="0"></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="子分类查看" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="70px">
                          <ItemTemplate> <a href='Category.aspx?Keyword=&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&Page=<%=Request.QueryString["Page"] %>&PageSize=<%=Request.QueryString["PageSize"] %>'>子分类查看</a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="商品" ItemStyle-Width="30" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                          <HeaderStyle></HeaderStyle>
                          <ItemTemplate> <a href='Product.aspx?Keyword=&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'> 查看</a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="" ItemStyle-Width="30" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                          <HeaderStyle></HeaderStyle>
                          <ItemTemplate> <a href='CategoryAdd.aspx?CategoryID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'> 修改</a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:ButtonColumn ItemStyle-Width="30" ItemStyle-HorizontalAlign="Center" Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('真的要删除吗？此操作将删除属于该类别的所有商品！')&quot;&gt;删除&lt;/div&gt;"
									HeaderText="" CommandName="Delete"></asp:ButtonColumn>
                        </Columns>
                      </asp:datagrid>
                      <!-- 翻页开始-->
                      <asp:Panel ID="li" Visible="true" runat="server">
                        <table width="100%">
                          <tr>
                            <td><asp:hyperlink id="hplPrev" runat="server">上一页</asp:hyperlink>
                              [&nbsp;
                              <asp:label id="lbPage" Runat="server"></asp:label>
                              &nbsp;]
                              <asp:hyperlink id="hplNext" runat="server">下一页</asp:hyperlink></td>
                            <td align="right">共
                              <asp:label id="lblTotalPage" runat="server"></asp:label>
                              当前类别为<B>
                              <asp:label id="lblCurrentPage" runat="server"></asp:label>
                              </B> &nbsp;跳转第
                              <asp:textbox class="inputbg" id="txtGOPage" Runat="server" size="1"></asp:textbox>
                              页
                              <asp:button id="btnGo" Runat="server" Text="Go"></asp:button></td>
                          </tr>
                        </table>
                        </asp:Panel>
                      <!-- 翻页结束-->
                    </td>
                  </tr>
                  <tr>
                    <td class="forumRowHighlight"><asp:LinkButton runat="server" id="lee" Visible="true"><span style="color:Blue">　返回一级商品类别</span></asp:LinkButton></td>
                  </tr>
                </table></td>
            </tr>
          </table>
          <table width="100%" align="center" cellspacing="0" cellpadding="0">
            <tr>
              <td class="bl"></td>
              <td class="bm">&nbsp;</td>
              <td class="br"></td>
            </tr>
          </table>
        </div></td>
      <td  class="mr"></td>
    </tr>
  </table>
  <table width="100%" align="center" cellspacing="0" cellpadding="0">
    <tr>
      <td class="bl"></td>
      <td class="bm">&nbsp;</td>
      <td class="br"></td>
    </tr>
  </table>
  </div>
  </td>
  </tr>
  </table>
</form>
</body>
</HTML>
