<%@ page title="" language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_TryApplication, WebApp_deploy" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <script type="text/javascript" src="../Js/My97DatePicker/WdatePicker.js"></script>
    <script src="../Js/My97DatePicker/config.js" type="text/javascript"></script>
   <script type="text/javascript">

       function Allselect1() {
           var GetCheckBox = document.getElementsByTagName('input');
           for (var i = 0; i < GetCheckBox.length; i++) {
               if (GetCheckBox[i].type == "checkbox") {
                   GetCheckBox[i].checked = true;
               }
           }
       }

       function AllNotSelect1() {
           var GetCheckBox = document.getElementsByTagName('input');
           for (var i = 0; i < GetCheckBox.length; i++) {
               if (GetCheckBox[i].type == "checkbox") {
                   GetCheckBox[i].checked = false;
               }
           }
       }
   </script>
    <table class="SearchTableStyle">
        <tbody style=" text-align:left;">
           <tr>
              <td style=" width:100px"></td>
              <td >
                 <span style=" font-size:16px; font-weight:bold">此活动</span>
                  <asp:DropDownList ID="DropProduct" runat="server" Width="200px" AutoPostBack="true" 
                      onselectedindexchanged="DropProduct_SelectedIndexChanged">
                      <asp:ListItem>请选择</asp:ListItem>
                  </asp:DropDownList>
                  <span style=" font-size:16px; font-weight:bold">共<font color="red"> <%=AppTotalCount%></font>份申请，已审核<font color="red"><%=IsThroughNum%></font>份，还剩<font color="red"><%=SurplusNum%></font>份，&nbsp;&nbsp;&nbsp;&nbsp;提供试用品<font color="red"><%=TotalProductNum%></font>份，已发货<font color="red"><%=IsConsignmentNum%></font>份，还剩<font color="red"><%=SurplusProductNum%></font>份</span>
              </td>
           </tr>
           
            <tr>
              <td style=" width:100px"></td>
              <td >
                 状态： <asp:DropDownList ID="DropStatus" runat="server" Width="200px" >
                    <asp:ListItem Selected="True" Value="0">请选择审核状态</asp:ListItem>
                    <asp:ListItem Value="1">待审核</asp:ListItem>
                    <asp:ListItem Value="2">已通过审核</asp:ListItem>
                    <asp:ListItem Value="3">未通过审核</asp:ListItem>
                  </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                 
              </td>
           </tr>
           
           <tr>
              <td style=" width:100px"></td>
              <td >
                <table>
                    <tr>
                       <td>用户名：<asp:TextBox ID="NicknameBox" runat="server" Text=""></asp:TextBox> (支持模糊查询)&nbsp;&nbsp;</td>
                      
                       <td>
                           时间段：
                           <input id="BeginDate" style=" border:#99CCFF 1px solid; background:#fff url(../Js/My97DatePicker/skin/datePicker.gif) no-repeat right; height:20px" name="BeginDate" type="text" onclick="WdatePicker()" />
                           至
                           <input id="EndDate" style=" border:#99CCFF 1px solid; background:#fff url(../Js/My97DatePicker/skin/datePicker.gif) no-repeat right; height:20px" name="EndDate" type="text" onclick="WdatePicker()" />
                           &nbsp&nbsp&nbsp <asp:Button ID="butSearch" runat="server" Text="搜索" Width="100px" OnClick="butSearch_Click" />
                       </td>
                    </tr>
                </table>
              </td>
           </tr>
           
        </tbody>
    </table>
    
    <asp:Repeater ID="Repeater1" runat="server">
        <HeaderTemplate>
       <table class="tableHead">
         <tr>
          <th scope="col" style="width:5%">选择</th>
          <th scope="col" style="width:10%">姓名</th>
          <th scope="col" style=" width:10%">联系电话</th>
          <th scope="col" style=" width:30%">申请理由</th>
          <th scope="col" style=" width:29%">地址</th>
          <th scope="col" style=" width:8%">审核操作</th>
          <th scope="col" style=" width:8%">发货操作</th>
       </tr>
    </table>
   </HeaderTemplate>
   
   <ItemTemplate>
        <table class="TryTable" style="border-collapse: collapse; border:solid 1px red"cellspacing="0" rules="all">
         <tbody>
         <tr>
          <td style="width:5%">
              <asp:CheckBox ID="CheckBox1" runat="server" />
              <asp:HiddenField ID="HiddenID" runat="server" Value='<%#Eval("ApplicationID") %>' />
              </td>
          <td style="width:10%"><%#GetTruename(Eval("AddressID").ToString())%></td>
          <td style=" width:10%"><%#GetPhone(Eval("AddressID").ToString())%></td>
          <td style=" width:30%"><%#SubString(Eval("ApplicationReason").ToString())%></td>
          <td style=" width:29%"><%#GetAddress((int)Eval("AddressID"))%></td>
          <td style=" width:8%">
              <asp:LinkButton ID="lbtThrough" runat="server" onclick="lbtThrough_Click" Text='<%#GetThroughStatus(Eval("Through").ToString())%>'></asp:LinkButton></td>
          <td style="width:8%">
              <asp:LinkButton ID="lbtDeliver" runat="server" onclick="lbtDeliver_Click" Text='<%#GetDeliverStatus(Eval("DeliverStatus").ToString())%>'></asp:LinkButton></td>
       </tr>
       </tbody>
    </table>
   </ItemTemplate>
    </asp:Repeater>
     <table style="width:98%; border:solid 1px red; margin-left:10px">
          <tr>
             <td style="text-align:center"> 
                 <input id="ButAllSelect" type="button" onclick="Allselect1()" value="全选" />
                 <input id="ButNotAllselect" type="button" onclick="AllNotSelect1()" value="反选" />
                 <asp:Button ID="ButThrough" runat="server" Text="审核通过" 
                     onclick="ButThrough_Click" />  
                 <asp:Button ID="ButNotThrough" runat="server" Text="拒绝" 
                     onclick="ButNotThrough_Click" /></td>
          </tr>
          <tr>
             <td style="text-align:center">
                 <asp:Label ID="lbPage" runat="server" Text=""></asp:Label></td>
          </tr>
       </table>
</asp:Content>

