<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManagerResumeList.aspx.cs"
    Inherits="Admin_Job_ManagerResumeList" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>
<!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">
    <title>简历管理</title>
    <link rel="stylesheet" href="../skin/style.css" type="text/css" />

    <script type="text/javascript" src="../../js/jquery-cn.js"></script>

    <script type="text/javascript" src="../../js/jquery.js"></script>

    <script type="text/javascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
          
    function checkbox(){
        // 找到所有的 input 元素
        var ctllist = window.document.form1.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm("确定要删除吗？");
        }    
    }  
    function checkbox4(){
        // 找到所有的 input 元素
        var ctllist = window.document.form1.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm("确定要取消推荐吗？");
        }    
    }  
     function checkbox1(){
        // 找到所有的 input 元素
        var ctllist = window.document.form1.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm("确定要将此条信息审核通过吗？");
        }    
    }  
    
    function checkbox2(){
        // 找到所有的 input 元素
        var ctllist = window.document.form1.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm("确定要将此条信息审核未通过吗？");
        }    
    }
    
        function checkbox3(){
        // 找到所有的 input 元素
        var ctllist = window.document.form1.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm("确定要将此条信息推荐吗？");
        }    
    }
       function checkbox4(){
        // 找到所有的 input 元素
        var ctllist = window.document.form1.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm("确定要将此条信息推荐吗？");
        }    
    }
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="itemtitle">
            <h3>
                管理员简历管理</h3>
        </div>
        <div class="itemtitle_tect">
            <ul>
                <li>通过简历管理，您可以进行编辑信息审核、推荐、修改和删除等操作；</li>
            </ul>
        </div>
        <div class="clr">
        </div>
        <div class="partition">
            <div class="Option">
                <asp:Label ID="Label5" runat="server"><a href="ManagerResumeList.aspx?Verify=0"><strong>所有信息</strong> </a></asp:Label>
                <asp:Label ID="Label1" runat="server"><a href="ManagerResumeList.aspx?Verify=3">未审核</a></asp:Label>
                <asp:Label ID="Label2" runat="server"><a href="ManagerResumeList.aspx?Verify=1">已审核</a></asp:Label>
                <asp:Label ID="Label3" runat="server"><a href="ManagerResumeList.aspx?Verify=2">推荐</a></asp:Label>
            </div>
            <div class="search">
                姓名：<asp:TextBox ID="txtName" runat="server" Width="130"></asp:TextBox>
                人才类型：<asp:DropDownList ID="dropTypeID" runat="server">
                </asp:DropDownList>
                <asp:Button ID="btnSelect" runat="server" Text="立即查询" CssClass="i_button" OnClick="btnSelect_Click">
                </asp:Button>
            </div>
        </div>
        <div class="clr">
        </div>
        <div class="talbe_border">
            <asp:GridView ID="grdJob" DataKeyNames="ID" runat="server" AutoGenerateColumns="False"
                CellPadding="0" CssClass="talbe_list" OnRowDeleting="grdJob_RowDeleting" OnRowDataBound="grdJob_RowDataBound"
                GridLines="None">
                <EmptyDataTemplate>
                    <%--  <table width="100%">
                        <tr>
                            <td>
                                选项
                            </td>
                            <td>
                                姓名
                            </td>
                            <td>
                                登陆名
                            </td>
                            <td>
                                截止时间
                            </td>
                            <td>
                                人才类型
                            </td>
                            <td>
                                最高学历
                            </td>
                            <td>
                                等级时间
                            </td>
                            <td>
                                审核状态
                            </td>
                            <td>
                                推荐状态
                            </td>
                            <td>
                                简历状态
                            </td>
                            <td>
                                修改
                            </td>
                            <td>
                                删除
                            </td>
                        </tr>
                    </table>--%>
                    <span style="text-align: left">
                        <asp:Label ID="Label4" runat="server" ForeColor="red" Text="暂无数据"></asp:Label>
                    </span>
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="选项">
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="th20 tou" />
                        <ItemStyle CssClass="nolet" Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="姓名">
                        <ItemTemplate>
                            <%# Eval("Name")%>
                        </ItemTemplate>
                        <ItemStyle CssClass="left2" Width="11%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="登录名">
                        <ItemTemplate>
                            <%# Eval("LoginName")%>
                        </ItemTemplate>
                        <ItemStyle CssClass="th80" Width="14%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="人才类型">
                        <ItemTemplate>
                            <%# getNameById(Convert.ToInt32(Eval("TalentType")))%>
                        </ItemTemplate>
                        <ItemStyle CssClass="th80" Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="最高学历">
                        <ItemTemplate>
                            <%# Eval("HighestEducation")%>
                        </ItemTemplate>
                        <ItemStyle CssClass="th80" Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="登记时间">
                        <ItemTemplate>
                            <%# GetShortDate(DataBinder.Eval(Container.DataItem, "AddDate").ToString())%>
                        </ItemTemplate>
                        <ItemStyle CssClass="th80" Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="审核状态">
                        <ItemTemplate>
                            <%# turncn(Convert.ToInt32(Eval("verify")))%>
                        </ItemTemplate>
                        <ItemStyle CssClass="th80" Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="推荐状态">
                        <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "isRecommend").ToString()== "True" ? "已推荐" : "未推荐"%>
                        </ItemTemplate>
                        <ItemStyle CssClass="th80" Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="简历状态">
                        <ItemTemplate>
                            <%# RelaseState(Convert.ToBoolean(Eval("isEnable")))%>
                        </ItemTemplate>
                        <ItemStyle CssClass="th80" Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:LinkButton ID="BtnDelete" runat="server">修改</asp:LinkButton>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <a style="text-decoration: inherit; border-bottom-color: Red;" href='ManagerResumeEdit.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID") %>'>
                            修改
                        </ItemTemplate>
                        <ItemStyle CssClass="th80" Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:LinkButton ID="BtnDelete" runat="server">删除</asp:LinkButton>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="BtnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                                OnClientClick="return confirm('确认要删除此条信息吗？')">删除</asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle CssClass="th80" Width="5%" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="header" />
            </asp:GridView>
            <div class="Paging">
                <p>
                    <uc1:PageNo ID="PageNo1" runat="server" />
                </p>
                <input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" />
                全选
                <asp:Button ID="btnDelete" CssClass="i_button1" runat="server" OnClientClick="return checkbox();"
                    Text="批量删除" OnClick="btnDelete_Click" />
                <asp:Button ID="ButEigible" runat="server" Text="审核通过" CssClass="i_button1" OnClientClick="return checkbox1();"
                    OnClick="ButEigible_Click" />
                <asp:Button ID="ButDisqualification" runat="server" Text="审核未通过" CssClass="i_button1"
                    OnClientClick="return checkbox2();" OnClick="ButDisqualification_Click" />
                <asp:Button ID="BtnRecord" runat="server" Text="推荐" CssClass="i_button" OnClientClick="return checkbox3();"
                    OnClick="BtnRecord_Click" />
                    <asp:Button ID="Button1" runat="server" Text="取消推荐" CssClass="i_button" OnClientClick="return checkbox4();"
                    OnClick="Button1_Click" />
            </div>
        </div>
        <asp:HiddenField ID="HiddenField1" runat="server" />
    </form>
</body>
</html>
