<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="RecruitmentProc.aspx.cs" Inherits="HRMS.Recruitment.CandidateApplied.RecruitmentProc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="main-panel">
        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                   <header class="panel-heading" style="padding-bottom:30px">
                           <span class="label label-primary">Recruitment Process</span>
                        
                    </header>

                    <div class="panel-body">
                        <div class="span6">
                            <div id="divmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                <asp:Label Text="" ID="lbl_msg" CssClass="msg" runat="server"></asp:Label>
                            </div>
                        </div>

                        <div class="span6">
                            <div id="diverrmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                <asp:Label Text="" ID="lbl_err_msg" CssClass="msg" runat="server"></asp:Label>
                            </div>
                        </div>

                        <div class="row">
                            <label class="control-label col-md-2">Recruitment Plan</label>
                            <div class="col-md-5">
                                <asp:DropDownList ID="ddl_rec_pln" AutoPostBack="true" runat="server" CssClass="form-control select2" OnSelectedIndexChanged="ddl_rec_pln_SelectedIndexChanged">
                                </asp:DropDownList>
                            </div>
                        </div>



                        <div class="row" id="dv_act" runat="server" visible="false">
                            <label class="control-label col-md-2">Action</label>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_action" AutoPostBack="true" OnSelectedIndexChanged="ddl_action_SelectedIndexChanged" runat="server" CssClass="form-control select2">
                                </asp:DropDownList>
                            </div>
                        </div>


                        <hr />


                        <div class="row">
                            <div class="col-md-10 col-md-offset-1">
                                <asp:Repeater ID="rpt_candidate_dtl" runat="server" OnItemDataBound="rpt_candidate_dtl_ItemDataBound">
                                    <HeaderTemplate>

                                        <div class="table-responsive">
                                            <table class="table table-hover  table-bordered">
                                                <tr>
                                                    <td style="width: 11.5% !important; background-color: #2085B5; color: white">Source type
                                            </td>
                                                    <td style="width: 12.4% !important; background-color: #2085B5; color: white">Candidate Name
                                            </td>

                                                    <td style="width: 13% !important; background-color: #2085B5; color: white">Position
                                            </td>


                                                    <td style="width: 25% !important; background-color: #2085B5; color: white">Availability / Notice Period
                                            </td>

                                                </tr>
                                            </table>

                                        </div>


                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:HiddenField ID="vacancyID" Value='<%# Eval("VACANCY_APPLY_ID") %>' runat="server"></asp:HiddenField>
                                        <asp:HiddenField ID="hid_city" Value='<%# Eval("CITY_ID") %>' runat="server"></asp:HiddenField>
                                        <asp:HiddenField ID="hid_pos" Value='<%# Eval("POSITION_ID") %>' runat="server"></asp:HiddenField>
                                        <asp:HiddenField ID="hid_pln_hdr" Value='<%# Eval("REC_PLAN_HEADER_ID") %>' runat="server"></asp:HiddenField>
                                        <asp:HiddenField ID="hid_requisition" Value='<%# Eval("REQUESITION_HEADER_ID") %>' runat="server"></asp:HiddenField>
                                        <table class="table table-hover  table-bordered">
                                            <tr>
                                                <td style="width: 25% !important;">
                                                    <%# Eval("SOURCE_TYPE") %>  
                                           </td>
                                                <td style="width: 26.7% !important;">
                                                    <%# Eval("NAME") %>
                                            </td>

                                                <td style="width: 26.5% !important;">
                                                    <%# Eval("PositionName") %>
                                            </td>

                                                <td style="width: 25% !important;">
                                                    <%# Eval("NOTICE_PERIOD") %>
                                            </td>
                                                <td style="width: 25% !important;">
                                                    <a id="dtl_lnk" data-toggle="collapse" href="#<%# Eval("ROW_ID") %>"><i class="fa fa-angle-double-down" style="font-size: 20px !important"></i></a>
                                                </td>

                                                <td style="width: 25% !important;">
                                                    <a id="dtl_fac" data-toggle="collapse" href="#<%# Eval("ROW_No") %>">Remarks</a>
                                                </td>
                                                <td style="width: 25% !important;">
                                                    <asp:Button ID="btn_vw" OnClientClick='<%# String.Format("javascript:return Nextpage(\"{0}\")", HRMS.Global.Encrypt(Eval("PATH").ToString())) %>' runat="server" CssClass="btn btn-primary" CommandArgument='<%# Bind("PATH") %>' Text="View Cv" OnClick="btn_vw_Click" />
                                                </td>
                                            </tr>
                                        </table>
                                        <div class="collapse" id="<%# Eval("ROW_ID") %>">
                                            <div class="row">
                                                <div class="col-md-10 col-md-offset-1">
                                                    <asp:GridView ID="grd_candidate_dtl_valus" runat="server" AutoGenerateColumns="false" CssClass="table table-striped table-bordered table-hover">
                                                        <Columns>

                                                            <asp:BoundField DataField="Col" />
                                                            <asp:BoundField DataField="val" />
                                                            <%--<asp:BoundField HeaderText="Expected Salary" DataField="EXPECTED_SALARY"/>
                                                         <asp:BoundField HeaderText="Date Of Birth" DataField="DATE_OF_BIRTH"/>
                                                         <asp:BoundField HeaderText="Email" DataField="EMAIL"/>
                                                         <asp:BoundField HeaderText="Mobile No" DataField="MOBILE_NO"/>--%>
                                                        </Columns>
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </div>



                                        <div class="collapse" id="<%# Eval("ROW_No") %>">
                                            <div class="row">
                                                <div class="col-md-10 col-md-offset-1">

                                                    <asp:GridView ID="grd_fac" runat="server" AutoGenerateColumns="false" CssClass="table table-striped table-bordered table-hover">
                                                        <Columns>

                                                            <asp:BoundField HeaderText="Factors" DataField="TITLE" HeaderStyle-Width="20%" HeaderStyle-BackColor="#2085B5" HeaderStyle-ForeColor="White" />
                                                            <asp:BoundField HeaderText="Factor Type" DataField="type" HeaderStyle-Width="15%" HeaderStyle-BackColor="#2085B5" HeaderStyle-ForeColor="White" />
                                                            <asp:BoundField HeaderText="Total Marks" DataField="TOTAL_MARKS" HeaderStyle-Width="14%" HeaderStyle-BackColor="#2085B5" HeaderStyle-ForeColor="White" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" />
                                                            <asp:TemplateField HeaderText="Total Marks" HeaderStyle-Width="15%" HeaderStyle-BackColor="#2085B5" HeaderStyle-ForeColor="White">
                                                                <ItemTemplate>
                                                                    <asp:HiddenField ID="hid_cmt" runat="server" Value='<%#Bind("COMMENTS") %>' />
                                                                    <asp:HiddenField ID="hid_act_typ" runat="server" Value='<%#Bind("ACTION_TYPE") %>' />
                                                                    <asp:TextBox ID="txt_total" runat="server" CssClass="form-control" BorderStyle="None" Enabled="false" Text='<%# Bind("TOTAL_MARKS") %>'></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField HeaderText="Passing Marks" DataField="PASSING_MARKS" HeaderStyle-Width="15%" HeaderStyle-BackColor="#2085B5" HeaderStyle-ForeColor="White" />




                                                            <asp:TemplateField HeaderText="Mark Obtained" HeaderStyle-Width="15%" HeaderStyle-BackColor="#2085B5" HeaderStyle-ForeColor="White">
                                                                <ItemTemplate>
                                                                    <asp:HiddenField ID="hid_factor" runat="server" Value='<%# Bind("FACTOR_ID") %>' />
                                                                    <asp:TextBox ID="txt_mrk_obt" runat="server" CssClass="form-control" Text='<%#Bind("Mrk_Obt") %>' Enabled='<%#bool.Parse(Eval("status")+""=="Y"?"False":"True") %>'></asp:TextBox>
                                                                    <asp:RequiredFieldValidator runat="server" Visible="false" ControlToValidate="txt_mrk_obt" ID="Reqamt" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
                                                                    <asp:CompareValidator runat="server" ID="cmpNumbers" ControlToValidate="txt_mrk_obt" ControlToCompare="txt_total" Operator="LessThanEqual" Type="Integer" ErrorMessage="Mark Obtained should be less than OR equal to Total Marks!" />

                                                                </ItemTemplate>

                                                                <%-- <FooterTemplate>
                                                                        <asp:Button Width="100%" ID="btn_save_fac" runat="server" Text="Save" CssClass="btn btn-primary" OnClick="btn_save_fac_Click" />
                                                                    </FooterTemplate>--%>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>

                                                    <table class="table table-hover  table-bordered">
                                                        <tr>
                                                            <td>
                                                                <label class="control-label">Action Type</label>
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddl_status" runat="server" CssClass="form-control"></asp:DropDownList>
                                                            </td>
                                                            <td>
                                                                <label class="control-label">Comment</label>
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txt_comment" CssClass="form-control" runat="server" />
                                                            </td>

                                                            <td>
                                                                <asp:Button ID="btn_save_vac_dtl" Width="100%" runat="server" CssClass="btn btn-primary" Text="Save" OnClick="btn_save_vac_dtl_Click" />
                                                            </td>
                                                        </tr>
                                                    </table>

                                                    <%--   <div class="row">
                                                           <div class="col-md-8 col-md-offset-1" style="padding-bottom:20px">
                                                               <asp:Button ID="btn_save" Width="50%" runat="server" CssClass="btn btn-primary" Text="Save" />   
                                                           </div>
                                                        
                                                       </div>--%>
                                                </div>
                                            </div>
                                        </div>

                                    </ItemTemplate>
                                </asp:Repeater>
                            </div>
                        </div>

                        <script type="text/javascript">
                            function Nextpage(path) {

                                window.open('ViewCV.aspx?id=' + path); return false;
                            }
                        </script>



                        <script src="../../ThemeScrips/jquery.min.js"></script>
    <link href="../../ThemeScrips/select2.min.css"
        rel="stylesheet" />
    <script src="../../ThemeScrips/select2.min.js"></script>
    <%--<script src="/ThemeScrips/select2.min.js"></script>--%>
    <script>
        $('.select2').select2();
    </script>

                    </div>
                </section>
            </div>
        </div>
    </div>
</asp:Content>
