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

<%@ 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 src="../../js/jquery-ui-1.8.10/js/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
    <script type="text/javascript">
      $(function () {
        $(".dates").datepicker({
          changeMonth: true,
          changeYear: true,
          regional: 'zh-CN'
        });      
        $("#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;">
	  
   </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="Basket.aspx?paystatus=-1&sendstatus=-1">全部</a>
        <a href="?paystatus=0">未付款</a>        
        <a href="?paystatus=1">已付款</a>
        <a href="?sendstatus=0">未发货</a>
        <a href="?sendstatus=1">已发货</a> 会员ID：<asp:TextBox ID="tbuserid" 
            runat="server" Width="68px"></asp:TextBox>
          日期：<asp:TextBox ID="dates" runat="server" CssClass="dates" Width="75px"></asp:TextBox>
          ~<asp:TextBox ID="datee" runat="server" CssClass="dates" Width="78px"></asp:TextBox>
        关键字：<asp:TextBox ID="tbKey" runat="server"></asp:TextBox>
          <asp:Button ID="Button1" runat="server" Text="搜索" onclick="Button1_Click" />
        </span>
        订单管理</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>
              <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="Basket_Detail.aspx?id=<%# Eval("id") %>&sessionid=<%# Eval("SessionId") %>"><%# Eval("ContactName")%></a></div></td>
            <td><%# Eval("Price")%></td>
            <td><%# Eval("Nums")%></td>
            <td><%# Eval("Mobile")%></td>
            <td><%# Convert.ToInt32(Eval("PayStatus")) == 0 ? "否" : "<span class=\"red\">是</span>"%></td>
            <td><%# Convert.ToInt32(Eval("SendStatus")) == 0 ? "否" : "<span class=\"red\">是</span>"%></td>
            <td><%# Eval("OrderDate")%></td>
            <td>            
			<asp:LinkButton ID="LinkButton2" OnLoad="Delete_Load" runat="server" CommandName="delete" CommandArgument='<%# Eval("id") %>'>删除</asp:LinkButton>		
			</td>
          </tr>
         </ItemTemplate>
         </asp:Repeater>
         <tr>
          <td colspan="9" 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="delete"></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> </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>

