<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="CateList.aspx.cs" Inherits="web.admin.CateList" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Category</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet">
		<script language="JavaScript">
<!--
//By Dicky 2005-2-17 11:16:49
function Window_Load(Flag)
{

if (Flag == 0)
{

  parent.document.all['Loading'].style.display = 'block';
  parent.document.all['Loading'].style.width = '500';
   parent.document.all['Loading'].style.height = '60';
  //show the window
}
else
{
  parent.document.all['Loading'].style.display = 'none';
  
  //hide the window
}
}
//-->
</script>

	</HEAD>
	<body rightmargin="0" leftmargin="0" topmargin="0" onload="Window_Load(1);">
	
		<form id="Form1" method="post" runat="server" onsubmit="Window_Load(0);">
  <table width="100%" height="550" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td valign="top">
<div class="top">
          <table width="100%" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" bgcolor="#EDF6FF">
            <tr>
		      <td class="tl" style="height: 33px"></td>
		<td class="tm" style="height: 33px"><span class="tt">优惠信息管理 &gt;&gt; 类别管理</span></td>
		      <td class="tm2" style="height: 33px"><span class="tt"></span></td>
		<td class="tr" style="height: 33px"></td>
	</tr>
</table>
</div>
        <div class="mframe">
          <table width="97%" border="0" align="center" cellpadding="3">
            <tr> 
              <td>&nbsp;&nbsp; <asp:Button ID="btdel" runat="server" Text="批量删除" OnClick="btdel_Click" /> 
                  <asp:Button ID="BtCre" runat="server" OnClick="BtCre_Click" Text="批量生成HTML" />
                  <span style="color: #ff0033">（请勾选后再进行批量操作）</span></td>
            </tr>
            <tr>
              <td>请选择分类查看：<%=lb %></td>
            </tr>
          </table>
   
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td class="ml"></td>
    <td  class="mm" align="left" valign="top">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td bgcolor="#FFFFFF" valign="top" > 
                      <table width="99%" align="center" cellpadding="0"  cellspacing="0">
                        <tr>
		<td class="ml1"></td>
		<td class="mm1">
						<asp:datagrid id="dgCategoryList" runat="server" PagerStyle-Mode="NumericPages"
							AutoGenerateColumns="False" DataKeyField="CategoryID" Width="100%" HorizontalAlign="Center"
							HeaderStyle-CssClass="summary-title" BorderColor="#E0E0E0" BorderWidth="1px" CssClass="mytable" >
							<HeaderStyle Font-Bold="True" BackColor="#EDF6FF" CssClass="head" Height="35px"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn HeaderText="分类ID">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="30px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="排序">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeCatSort&Type=D&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&zhi=<%=Request.QueryString["zhi"].ToString()%>'>
											<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='Cz.aspx?Action=ChangeCatSort&Type=U&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&zhi=<%=Request.QueryString["zhi"].ToString()%>'>
											<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>
                                    <ItemStyle HorizontalAlign="Center" Width="30px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="类别名称(店铺数)(信息数)">
									<ItemTemplate>
										<img src="../img/empty.gif" width='<%#10*(int)DataBinder.Eval(Container.DataItem,"Depth")%>' height="1" align="absmiddle">├<a href='ProductList.aspx?stat=1&Keyword=&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'><%# DataBinder.Eval(Container.DataItem, "Name") %></a>
										(<%# web.WebUtils.ProductNum(DataBinder.Eval(Container.DataItem, "CategoryID").ToString()) %>)		(<%# web.WebUtils.ProductNumh(DataBinder.Eval(Container.DataItem, "CategoryID").ToString()) %>)
									</ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" Width="570px" />
                                    <ItemStyle HorizontalAlign="Left" />
								</asp:TemplateColumn>
					
							     <asp:TemplateColumn HeaderText="推荐">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeInNav&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "InNav") %>&zhi=<%=Request.QueryString["zhi"].ToString() %>'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "InNav") %>.png' border="0"></a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
								</asp:TemplateColumn>
							
								<asp:TemplateColumn HeaderText="是否发布">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeCatActive&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "IsActive") %>&zhi=<%=Request.QueryString["zhi"].ToString()%>'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsActive") %>.png' border="0"></a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="优惠信息">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='ProductList.aspx?stat=1&Keyword=&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>'>
											查看</a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn>
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cate.aspx?CategoryID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&zhi=<%=Request.QueryString["zhi"].ToString()%>'>
											修改</a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="30px" />
								</asp:TemplateColumn>
								<asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('真的要删除吗？此操作将删除属于该类别的所有优惠信息！')&quot;&gt;删除&lt;/div&gt;" CommandName="Delete">
                                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                                </asp:ButtonColumn>
                                   <asp:TemplateColumn HeaderText="生成HTML">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='CreateList.aspx?CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&zhi=<%=Request.QueryString["zhi"].ToString() %>'>
											生成HTML</a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="100px" />
								</asp:TemplateColumn>
                                <asp:TemplateColumn>
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox1_CheckedChanged" Text="全/反选" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="ckitem" runat="server" />
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" Width="80px" />
                                    <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
                                </asp:TemplateColumn>
							</Columns>
                            <PagerStyle Mode="NumericPages" />
                            <ItemStyle Height="30px" />
						</asp:datagrid>
		</td>
		<td class="mr1"></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>
</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>
