<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Plus.Group.KS_BBSSign" Codebehind="KS.BBSSign.aspx.cs" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
    <asp:Panel ID="listPanel" runat="server" Width="100%">
        <script>
            function SetDate() {
                var today = new Date();
                if ($("#showdate").is(":hidden")) {
                    $("#showdate").show();
                    $('#<%=TxtBeginDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-01');
                    $('#<%=TxtEndDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate());
                }
                else {
                    $("#showdate").hide();
                    $('#<%=TxtBeginDate.ClientID%>').val('');
                    $('#<%=TxtEndDate.ClientID%>').val('');
                }
            }

        </script>

        <div class="content-area mt20">
            <div class="myTitle">报名管理</div>
            <div class="clear"></div>
            <div class="quickSearch clearfix">
                <input type="button" class="fr mr20 button" id="backBtn" value="返回社群列表" onclick="history.back(-1);" />
                <div class="longquickSearch">
                    <div class="SearchBox fl">
                        <asp:DropDownList ID="Condition" runat="server" Style="margin-right:8px;">
                            <asp:ListItem Value="1">姓名</asp:ListItem>
                            <asp:ListItem Value="2">手机号码</asp:ListItem>
                            <asp:ListItem Value="3">昵称</asp:ListItem>
                        </asp:DropDownList>
                        <asp:TextBox Style="color: #ccc" CssClass="textbox" ID="KeyWord" runat="server" Width="180px">
                        </asp:TextBox>
                        <span onclick="SetDate()" class="link-color" style="cursor: pointer">日期范围？</span>
                        <span id="showdate" <%if (this.TxtBeginDate.Text == "")
                                              { %> style="display: none" <%} %>>
                            <asp:TextBox ID="TxtBeginDate" placeholder="格式：YYYY-MM-DD" Width="120px" runat="server"
                                onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate">
                            </asp:TextBox>至
                            <asp:TextBox ID="TxtEndDate" placeholder="格式：YYYY-MM-DD" Width="120px" runat="server"
                                onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate">
                            </asp:TextBox>
                        </span>
                        <asp:Button ID="Button4" runat="server" CssClass="button" Text="开始搜索" OnClick="Button4_Click" />
                    </div>
                    <div class="property">
                        <div class="name button ml15">筛选</div>
                        <div class="propertyBox">
                            <ul class="clearfix">
                                <span class="screen fl">状态：</span>
                                <li <%=KSCMS.S("Status")=="0"||KSCMS.S("Status")==""?" class='active'":string.Empty %>>
                                    <a href="KS.BBSSign.Aspx?boardid=<%=boardID%>">全部</a></li>
                                <li <%=KSCMS.S("Status")=="1"?" class='active'":string.Empty %>><a
                                        href="KS.BBSSign.Aspx?status=1&boardid=<%=boardID%>">待审核</a></li>
                                <li <%=KSCMS.S("Status")=="2"?" class='active'":string.Empty %>><a
                                        href="KS.BBSSign.Aspx?status=2&boardid=<%=boardID%>">报名成功</a></li>
                                <li <%=KSCMS.S("Status")=="3"?" class='active'":string.Empty %>><a
                                        href="KS.BBSSign.Aspx?status=3&boardid=<%=boardID%>">已拒绝</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div>
                <KS:KSGV ID="ListView" cssclass="CTable" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
                    GridLines="None" PagerType="CustomNumeric" Width="99%" EnableTheming="True" EmptyDataText="您还没有任何报名记录!">
                    <Columns>
                        <asp:TemplateField HeaderText="选择">
                            <itemstyle horizontalalign="Center" width="30px" />
                            <itemtemplate>

                                <input type="checkbox" name="ids" id="ids" value="<%#Eval("id") %>"
                                    <%#Utils.StrToInt(Eval("status").ToString())==1?"style='display:none'":"" %> />
                            </itemtemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="头像昵称">
                            <itemstyle horizontalalign="Center" />
                            <ItemTemplate>
                                <img src="/UploadFiles/avatar/<%#Eval("userid") %>.jpg"
                                    onerror="this.src='../../admin/images/nopic.png'" height="50" width="30" />
                                <%# Eval("username") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="姓名">
                            <itemstyle horizontalalign="Center" />
                            <ItemTemplate>
                                <%# Eval("realname") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="手机号码">
                            <itemstyle horizontalalign="Center" />
                            <ItemTemplate>
                                <%#Eval("mobile").ToString() %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="报名时间">
                            <ItemTemplate>
                                <%#Eval("adddate").ToString()==""?"":Utils.StrToDateTime(Eval("adddate").ToString()).ToString("yyyy-MM-dd HH:mm:ss") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="申请内容">
                            <ItemTemplate>
                                <%#Eval("remark") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="状态">
                            <ItemTemplate>
                                <%#GetStatus(Utils.StrToInt(Eval("status").ToString()))%>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="操作">
                            <itemstyle width="30px" horizontalalign="Center" />
                            <itemtemplate>
                                <%#GetActionStatus(Utils.StrToInt(Eval("status").ToString()),Utils.StrToInt(Eval("id").ToString()),boardID)%>
                            </itemtemplate>
                        </asp:TemplateField>

                    </Columns>
                    <HeaderStyle CssClass="CTitle" />
                    <EmptyDataRowStyle CssClass="emptycss" />
                </KS:KSGV>
                <br />
                <asp:Panel ID="Panel1" runat="server" Height="30px">
                    <div class="listedit">
                        <input type="checkbox" name="chkall" id="chkall" onclick="CheckAll(this.form);" /><label for="chkall">全选</label>
                        <asp:LinkButton ID="ExcelBtn" runat="server" Text="导出Excel" OnClick="ExcelBtn_Click" CssClass="button">导出Excel</asp:LinkButton>
                        <asp:Button ID="Button1" runat="server" Text="批量通过" OnClick="Button1_Click" class="button" />
                        <asp:Button ID="Button2" runat="server" Text="批量拒绝" OnClick="Button2_Click" class="button" />
                    </div>
                </asp:Panel>
            </div>
        </div>
        <asp:Label ID="LabPage" runat="server"></asp:Label>
        </div>
    </asp:Panel>


</asp:Content>