<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_SecUrl, WebApp_deploy" title="域名管理" debug="true" %>

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

<table class="adminheading" width="100%">
    <tr>
       <th valign="middle" class="shoppage" align="left">
           域名管理</th>
       <td align="right"></td>
       <td class="rtdw"></td>
     </tr>
 </table>
     

    <table class="nick"><tr><td colspan="4" class="tit">店铺查找</td></tr>
    <tr>
      <td class="ltd">快速查找：</td><td class="rtd" style="width:30%">
         <asp:DropDownList ID="QuickSearch" runat="server" CssClass="text_area" OnSelectedIndexChanged="QuickSearch_SelectedIndexChanged"  AutoPostBack="true">
           <asp:ListItem Text="所有店铺" Value="all" />        
           <asp:ListItem Text="所有已经关闭的店铺" Value="close" />
           <asp:ListItem Text="所有正常的店铺" Value="normal" />         
           <asp:ListItem Text="所有暂停营业的店铺" Value="pause" />
           <asp:ListItem Text="三天内的新开的店铺" Value="three_day_open" />
           <asp:ListItem Text="商品数量大于10的店铺" Value="more_then_ten" />
         </asp:DropDownList>
         <asp:DropDownList ID="ShopSearchClass" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataTextField="ClassName" DataValueField="ClassID" CssClass="text_area" OnSelectedIndexChanged="ShopSearchClass_SelectedIndexChanged">
          <asp:ListItem Value="-1">请选择</asp:ListItem>
      </asp:DropDownList>
      </td>
      <td class="ltd">高级查找：</td>
      <td class="rtd">
      <asp:DropDownList ID="DetailSearchType" runat="server" CssClass="text_area">
         <asp:ListItem Text="店铺名称" Value="shop_name" />
         <asp:ListItem Text="店长名称" Value="saler_name" />
         <asp:ListItem Text="主营项目" Value="operate_item" />                
      </asp:DropDownList>
      <asp:TextBox ID="DetailSearchName" runat="server" Width="150"/>
      <asp:Button ID="SearchButton" runat="server" Text=" 查 询 " OnClick="SearchButton_Click" />
      </td>
    </tr>
    </table>
     
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  CssClass="adminlist" RowStyle-HorizontalAlign="Center"  DataKeyNames="ShopID" OnRowDataBound="GridView1_RowDataBound"  style="word-break:break-all;">
            <Columns>
              <asp:TemplateField >
                 <ItemTemplate>
                    <input type="checkbox" name="chk_select" value='<%# Eval("ShopID") %>' />
                 </ItemTemplate>
                 <HeaderTemplate>
                    <input id="chkAll" onclick="SelectAllCheckboxes(this);" runat="server" type="checkbox" />
                 </HeaderTemplate>
                  <ItemStyle Width="4%" />
              </asp:TemplateField> 
              <asp:HyperLinkField HeaderText="域名名称" DataTextField="SecUrl" DataNavigateUrlFormatString="../Store/ShopIndex.aspx?ShopID={0}" DataNavigateUrlFields="ShopID" Target="_blank" >
                  <HeaderStyle Width="18%" />
                  <ItemStyle Width="30%" />
              </asp:HyperLinkField>
              <asp:HyperLinkField HeaderText="店铺名称" DataTextField="ShopName" DataNavigateUrlFormatString="Admin_UserDetail.aspx?UserID={0}" DataNavigateUrlFields="ShopOwnerID" >
                  <HeaderStyle Width="8%" />
                  <ItemStyle Width="30%" />
              </asp:HyperLinkField>
              <asp:BoundField HeaderText="用户名称" DataField="ShopOwnerName">
                  <HeaderStyle Width="10%" />
                  <ItemStyle Width="30%" />
              </asp:BoundField>                 
              <asp:TemplateField  HeaderText="状态">
                 <ItemTemplate>
                    <asp:Literal ID="ShopStatus" Text='<%# (Eval("IsUseSecUrl").ToString()=="1")?"正常":"关闭"%>' runat="server" />
                 </ItemTemplate>
                 <HeaderStyle Width="4%" />
                  <ItemStyle Width="8%" />
              </asp:TemplateField>
              
            </Columns>
            <EmptyDataTemplate>
                  <tr>
                     <th>选中</th>
                     <th>域名名称</th>
                     <th>店铺名称</th>
                     <th>用户名称</th>
                     <th>状态</th>                  
                  </tr>
                  <tr><td colspan="5">暂无数据！</td></tr>
            </EmptyDataTemplate>
            <RowStyle HorizontalAlign="Center" />
        </asp:GridView>
        
    <div style="padding:10px;" align="center">
        <asp:Label runat="server" ID="PagePanel" />&nbsp;</div>


    <div style="width:100%; padding:5px 0 5px 0;text-align:center;" >  
       <asp:Button ID="DeleteBtn" runat="server" Text="删除域名" CommandName="DeleteUrl"  OnCommand="btnOpeCommand" OnClientClick="return confirm('您确定要删除吗？此操作将删除所有跟删除店铺相关联的数据，并且删除后不能恢复?')"/>
       <asp:Button ID="Close_Button" runat="server" Text="禁用域名" CommandName="CloseUrl" OnCommand="btnOpeCommand" />
        <asp:Button ID="btn_openSecUrl" runat="server" OnCommand="btnOpeCommand"
            Text="开启域名" CommandName="OpenUrl" /></div>
         
</asp:Content>

