<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="TotCms.Web.Admin.Shop.List" %>

<%@ Register src="../UI/main_top.ascx" tagname="main_top" tagprefix="uc1" %>

<%@ Register assembly="TotCms.Controls" namespace="TotCms.Controls" tagprefix="cc1" %>

<!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">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>商品管理</title>
    <link href="../style/global.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../js/jquery-ui-1.8.10/js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
    <link href="../../js/jquery-ui-1.8.10/css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
      $(function () {
        $("#dialog:ui-dialog").dialog("destroy");
        $("#dialog-win").dialog({
          autoOpen: false,
          height: 350,
          width: 400,
          modal: true,
          buttons: {
            "确定": function () {
              $(this).dialog("close");
            },
            "取消": function () {
              $(this).dialog("close");
            }
          },
          close: function () {

          }
        });

        $("#selclass").click(function () {
          $("#dialog-win").dialog("open");
        });
      });
      function CloseFrame() {
        $("#dialog-win").dialog("close");
      }
    </script>
</head>

<body>
   <div id="dialog-win" title="选择分类" style="display:none;">
	  <iframe src="../Category/Get_Tree.aspx?datamodule=<%=(int)TotCms.FrameWork.Enums.DataModule.Shop %>" width="370" height="350" frameborder="0" scrolling="auto"></iframe>	
   </div>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
    
      <uc1:main_top ID="main_top1" runat="server" />
    
    </div>
    <table cellpadding="0" cellspacing="1" border="0" width="100%">
      <tr>
        <td class="topic">
        <span class="right">
        <a href="List.aspx">全部</a>
        <a href="?categoryid=<%=id %>&isrem=1">推荐</a>        
        <a href="?categoryid=<%=id %>&istop=1">置顶</a>
        <a href="?categoryid=<%=id %>&ishot=1">热点</a>
        关键字：<asp:TextBox ID="tbKey" runat="server"></asp:TextBox>
          <asp:Button ID="Button1" runat="server" Text="搜索" onclick="Button1_Click" />
        </span>
        商品管理 <a href="Add.aspx">添加</a> </td>
      </tr>   
      </table>
      <table cellpadding="0" cellspacing="1" border="0" width="100%">
      <asp:Repeater ID="RepeatList" runat="server" OnItemCommand="RepeatList_ItemCommand">
        <HeaderTemplate>
          <tr class="suphead">
              <td>Id</td>
              <td>名称</td>
              <td>出版社</td>
              <td>价格</td>
              <td>推荐</td>
              <td>置顶</td>
              <td>日期</td>
              <td>操作</td>
          </tr>
        </HeaderTemplate>
        <ItemTemplate>
          <tr class="lines">
            <td>
              <asp:UpdatePanel ID="UpdatePanel1" runat="server">
              <ContentTemplate>
              <asp:CheckBox ID="ChkId" runat="server" Checked="false" /><%# Eval("id") %>
              </ContentTemplate>
              <Triggers>
              <asp:AsyncPostBackTrigger ControlID="BtnSelect" EventName="Click" /> 
              </Triggers>
              </asp:UpdatePanel>
              <asp:TextBox ID="ChkTxt" runat="server" CssClass="hidden" Text='<%# Eval("id") %>'></asp:TextBox>              
              </td>
            <td><div align="left">&nbsp;
            <a href="/Goods/Show.aspx?id=<%# Eval("id") %>" target="_blank">
            <img src='<%# Eval("ViewImg")%>' width="90" height="90" border="0" alt="" /><br />
            <%# Eval("Title")%></a>
            </div></td>
            <td><%# Eval("Press")%></td>
            <td><%# Eval("Price")%></td>
            <td><%# Convert.ToInt32(Eval("IsRem")) == 0 ? "否" : "是"%></td>
            <td><%# Convert.ToInt32(Eval("IsTop")) == 0 ? "否" : "是"%></td>
            
            <td><%# Eval("ModDate")%></td>
            <td>
            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="edit" CommandArgument='<%# Eval("id") %>'>编辑</asp:LinkButton>
			|
			<asp:LinkButton ID="LinkButton2" OnLoad="Delete_Load" runat="server" CommandName="delete" CommandArgument='<%# Eval("id") %>'>删除</asp:LinkButton>		
			</td>
          </tr>
         </ItemTemplate>
         </asp:Repeater>
         <tr>
          <td colspan="6" align="center">
            <asp:Button ID="BtnSelect" runat="server" Text="反选" onclick="BtnSelect_Click" />
            <asp:DropDownList ID="BatRunType" runat="server" OnLoad="BatRunTypeLoad">
            <asp:ListItem Text="==选择操作选项==" Value="" ></asp:ListItem>
            <asp:ListItem Text="批量推荐" Value="recommend"></asp:ListItem>
            <asp:ListItem Text="取消推荐" Value="unrecommend"></asp:ListItem>            
            <asp:ListItem Text="批量置顶" Value="top"></asp:ListItem>
            <asp:ListItem Text="取消置顶" Value="untop"></asp:ListItem>
            <asp:ListItem Text="批量热点" Value="hot"></asp:ListItem>
            <asp:ListItem Text="取消热点" Value="unhot"></asp:ListItem> 
            <asp:ListItem Text="批量删除" Value="delete"></asp:ListItem>
            <asp:ListItem Text="批量移动" Value="remove"></asp:ListItem>
            </asp:DropDownList>            
            <asp:TextBox ID="CategoryId" runat="server" CssClass="hidden"></asp:TextBox>            
            <asp:Label ID="CategoryTitle" runat="server" Text=" "></asp:Label>
            <input id="selclass" name="selclass" type="button" value="请选择" class="hidden" />
            <asp:Button ID="BtnRun" runat="server" Text="执行操作" onclick="BtnRun_Click" OnClientClick="return confirm('确定执行吗?')" />
          </td>
         </tr>
      
    </table>
    <cc1:Pager ID="Pager1" runat="server" GenerateFirstLastSection="True" 
      GenerateGoToSection="True" GenerateHiddenHyperlinks="False" 
      QueryStringParameterName="CurrentPage" OnCommand="pager_Command" 
      GoToStyle="text" OfClause="/" PageClause="页" PageSize="15" />
      <div class="info"><span style="font-size:12px; font-weight:100;">执行用时:<asp:Label ID="LbUserTime" runat="server"></asp:Label>S</span>
&nbsp;[提示]：点击中间“栏目导航”中的栏目名称，本窗口将快速定位至所选栏目的视频列表。</div>
    </form>
    <script language="javascript" type="text/javascript"> 
      function SeleAct(obj){
	      if(obj=="remove"){
	        document.getElementById("selclass").className = 'selclass';
	      }
	      else{
	        document.getElementById("selclass").className = 'hidden';		      
	      }
      }
     </script>

</body>
</html>
