<%@ Page Language="C#" AutoEventWireup="true" MaintainScrollPositionOnPostback="true" CodeBehind="ViewJobs.aspx.cs" Inherits="HRMS.Portal.ViewJobs" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <style>
        body, html {
            margin: 0;
            padding: 0;
            overflow: hidden;
        }

        .container-fluid {
            margin: 0;
            padding: 0;
        }

        .left {
            height: 400px;
            overflow: hidden;
            overflow-y: auto;
        }

        .right {
            height: 400px;
            overflow: hidden;
            overflow-y: auto;
        }


        /* width */
        ::-webkit-scrollbar {
            width: 5px;
        }

        /* Track */
        ::-webkit-scrollbar-track {
            box-shadow: inset 0 0 5px grey;
            border-radius: 10px;
        }

        /* Handle */
        ::-webkit-scrollbar-thumb {
            background:steelblue ;
            border-radius: 10px;
        }

            /* Handle on hover */
            ::-webkit-scrollbar-thumb:hover {
                background: #b30000;
            }                                                         
    </style>


    <link href="../../ThemeScrips/a_data/bootstrap.css" rel="stylesheet" type="text/css" />
    <%--    <script src="../../ThemeScrips/a_data/jquery.js" type="text/javascript"></script>
    <script src="../../ThemeScrips/a_data/bootstrap.min.js" type="text/javascript"></script>--%>
    <link href="../../ThemeScrips/a_data/style.css" rel="stylesheet" type="text/css" />
    <link href="../../ThemeScrips/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <script src="../../ThemeScrips/a_data/jquery_004.js"></script>
    <script src="../../ThemeScrips/a_data/bootstrap.js"></script>
    <script src="../../ThemeScrips/a_data/jquery_003.js"></script>
    <title>Job Portal::.</title>
    <link href="/ThemeScrips/a_data/bootstrap-reset.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="main-panel " style="background-color: ghostwhite;">
            <div class="row ">
                <div class="col-md-12">
                    <section class="panel">
                        <header class="panel-heading">
                            <div class="row">
                                <div class="col-md-6">
                                    <img width="203" height="40" class="img-responsive" src="../Images/logo-dark.png" />
                                </div>

                                <div class="col-md-6" style="padding-top: 25px">
                                    <asp:LinkButton ID="lnk" runat="server" CssClass="btn btn-primary pull-right" Text="Sign In"></asp:LinkButton>
                                </div>
                            </div>

                            <hr />


                            <div class="row">
                                <label class="control-label col-md-1 col-md-offset-1">Job Type</label>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddl_job" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                </div>

                                <label class="control-label col-md-1">Location</label>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddl_loc" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                </div>

                                <div class="col-md-3">
                                    <asp:Button ID="btn_search" runat="server" CssClass="btn btn-primary" Text="Find Jobs" OnClick="btn_search_Click" />
                                </div>

                            </div>


                        </header>
                    </section>
                </div>
            </div>



            <asp:Label ID="Label3" CssClass="msg" runat="server"></asp:Label>

            <div class="span6">
                <div id="div1" runat="server" visible="false" class="alert alert-info alert-dismissable">
                    <asp:Label Text="This file is too big" ID="Label2" CssClass="msg" runat="server"></asp:Label>
                </div>
            </div>




            <div class="row">
                <div class="col-md-5 col-md-offset-1">
                    <asp:Label ID="lbl_date" runat="server" CssClass="control-label" Font-Bold="true" Font-Size="X-Large"></asp:Label>
                </div>
            </div>
            <br />


            <div class="container-fluid">
                <div class="col-md-5 col-md-offset-1 left">
                    <asp:Repeater ID="rpt_jobs" runat="server" OnItemDataBound="rpt_jobs_ItemDataBound">
                        <ItemTemplate>
                            <div class="panel panel-default" style="border-radius: 10px; border: groove;">
                                <div class="panel-body">
                                    <asp:HiddenField ID="bg_id" runat="server" Value='<%# Bind("BUSINESS_GROUP_ID") %>' />
                                    <asp:LinkButton ID="lnk_title" runat="server" Font-Size="Large" OnClick="lnk_title_Click" CommandName='<%#Bind("CITY_ID") %>' CommandArgument='<%#Bind("POSITION_ID") %>' Text='<%# Bind("Job_Title") %>'></asp:LinkButton>
                                    <%--<asp:Label ID="lbl_title" runat="server" CssClass="control-label" Font-Size="Large" Text='<%# Bind("Job_Title") %>'></asp:Label>--%>
                                    <br />
                                    <asp:Label ID="lbl_location" runat="server" CssClass="control-label" Text='<%# Bind("LOCATION") %>' Font-Size="Large"></asp:Label>
                                    <br />
                                    <asp:Label ID="lbl_salary_frm" Font-Bold="true" runat="server" CssClass="control-label" Text='<%# Bind("SALARY_RANGE_FROM") %>' Font-Size="Large"></asp:Label>

                                    <asp:Label ID="lbl_sal_to" Font-Bold="true" Visible='<%# bool.Parse(Eval("SALARY_RANGE_TO").ToString() != "" ? "True" : "False") %>' runat="server" CssClass="control-label" Text='<%# Bind("SALARY_RANGE_TO") %>' Font-Size="Large"></asp:Label>
                                    <br />
                                    <br />
                                    <asp:Label ID="Label1" Visible='<%# bool.Parse(Eval("DURATION").ToString() != "" ? "True" : "False") %>' runat="server" CssClass="control-label" Text="Duration"></asp:Label>
                                    <asp:Label ID="lbl_duration" Visible='<%# bool.Parse(Eval("DURATION").ToString() != "" ? "True" : "False") %>' runat="server" CssClass="control-label" Text='<%# Bind("DURATION") %>'></asp:Label>

                                    <br />
                                    <br />
                                    <p>
                                        <asp:Label ID="Label4" runat="server" CssClass="control-label" Text='<%# Bind("DESCRIPTION") %>'></asp:Label>
                                    </p>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>

                <div class="col-md-6 right">
                    <div class="panel panel-default" id="pnl_dtl" runat="server" visible="false" style="border-radius: 10px; border: groove;">
                        <div class="panel-heading">
                            <button type="button" class="close" onclick="PanelClose()">&times;</button>

                            <asp:Label ID="lbl_job_title" runat="server" CssClass="control-label" Font-Size="Large"></asp:Label>
                            <br />
                            <asp:Label ID="lbl_sal" runat="server" ForeColor="Black" Font-Size="Small" CssClass="control-label"></asp:Label>
                            <br />
                            <br />
                            <asp:HiddenField runat="server" ID="hid_position" />
                            <asp:Button ID="btn_apply" runat="server" CssClass="btn btn-primary col-md-3" Visible="false" Text="Apply Now" OnClick="btn_apply_Click" />
                            <a href="#" data-target="#reg" data-toggle="modal" onclick="PassValue()" style="color: White;" class="btn btn-primary col-md-3">Apply Now</a>
                            <br />
                            <br />
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-md-3">
                                    <asp:HiddenField ID="hid_req" runat="server" />
                                    <label class="control-label">Job Description</label>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-md-10 col-md-offset-1">
                                    <p>
                                        <asp:Label ID="lbl_desc" runat="server" CssClass="control-label"></asp:Label>
                                    </p>
                                </div>
                            </div>


                            <div class="row">
                                <div class="col-md-3">
                                    <label class="control-label">Skills Required</label>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-md-8 col-md-offset-1">
                                    <%--<asp:ListBox ID="lst_skill" CssClass="list" runat="server"></asp:ListBox>--%>


                                    <asp:ListView ID="ListView1" runat="server">
                                        <ItemTemplate>
                                            <li>
                                                <asp:Label ID="lbl_skill" runat="server" CssClass="control-label" Text='<%# Bind("DESCRIPTION") %>'></asp:Label>
                                            </li>
                                        </ItemTemplate>

                                    </asp:ListView>
                                </div>
                            </div>


                            <div class="row" style="padding-top: 15px">
                                <div class="col-md-3">
                                    <label class="control-label">Career Level</label>
                                </div>

                                <div class="col-md-4">
                                    <asp:Label ID="lbl_career" runat="server" CssClass="control-label"></asp:Label>
                                </div>
                            </div>


                            <div class="row" style="padding-top: 10px">
                                <div class="col-md-3">
                                    <label class="control-label">Working Hours</label>
                                </div>

                                <div class="col-md-2">
                                    <asp:Label ID="lbl_wrk_hr" runat="server" CssClass="control-label"></asp:Label>
                                </div>
                            </div>





                            <div class="row" style="padding-top: 10px">
                                <div class="col-md-3">
                                    <label class="control-label">No of Vacancies</label>
                                </div>

                                <div class="col-md-2">
                                    <asp:Label ID="lbl_no_vac" runat="server" CssClass="control-label"></asp:Label>
                                </div>
                            </div>



                            <div class="row" style="padding-top: 10px">
                                <div class="col-md-3">
                                    <label class="control-label">Gender</label>
                                </div>

                                <div class="col-md-3">
                                    <asp:Label ID="lbl_gender" runat="server" CssClass="control-label"></asp:Label>
                                </div>

                            </div>


                            <div class="row" style="padding-top: 10px">
                                <div class="col-md-3">
                                    <label class="control-label">Education</label>
                                </div>

                                <div class="col-md-4">
                                    <asp:Label ID="lbl_education" runat="server" CssClass="control-label"></asp:Label>
                                </div>
                            </div>


                            <div class="row" style="padding-top: 10px">
                                <div class="col-md-3">
                                    <label class="control-label">Travel Required</label>
                                </div>

                                <div class="col-md-4">
                                    <asp:Label ID="lbl_trvl_req" runat="server" CssClass="control-label"></asp:Label>
                                </div>
                            </div>


                            <div class="row" style="padding-top: 10px">
                                <div class="col-md-3">
                                    <label class="control-label">Job Shift</label>
                                </div>

                                <div class="col-md-4">
                                    <asp:Label ID="lbl_job_shft" runat="server" CssClass="control-label"></asp:Label>
                                </div>
                            </div>


                            <div class="row" style="padding-top: 10px">
                                <div class="col-md-3">
                                    <label class="control-label">Last Date Of Apply</label>
                                </div>

                                <div class="col-md-4">
                                    <asp:Label ID="lbl_lst_doa" runat="server" CssClass="control-label"></asp:Label>
                                </div>
                            </div>


                            <div class="row" style="padding-top: 10px">
                                <div class="col-md-3">
                                    <label class="control-label">Location</label>
                                </div>

                                <div class="col-md-4">
                                    <asp:Label ID="lbl_loc" runat="server" CssClass="control-label"></asp:Label>
                                </div>
                            </div>

                        </div>
                    </div>

                </div>
            </div>










            <div class="modal fade" id="reg" role="dialog">
                <div class="modal-dialog modal-dialog-center" style="width: 500px">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal">
                                &times;</button>
                            <h3 class="modal-title">
                                <asp:Label CssClass="control-label" runat="server" ID="lbl"></asp:Label>
                            </h3>
                        </div>
                        <div class="modal-body">
                            <div class="form-group">
                                <asp:HiddenField ID="hid_vac" runat="server" />
                                <label class="control-label col-md-3" style="margin-left: 25px; color: Black">First Name</label>
                                <div class="row">
                                    <div class="col-md-10 col-md-offset-1">
                                        <asp:TextBox ID="txt_fname" runat="server" Height="40px" CssClass="form-control"></asp:TextBox>
                                        <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                            ID="req_txt_name" ControlToValidate="txt_fname" ErrorMessage="First Name is Required!" />
                                    </div>
                                </div>
                                <label class="control-label col-md-3" style="margin-left: 25px; color: Black; padding-top: 15px">
                                    Last Name</label>
                                <div class="row">
                                    <div class="col-md-10 col-md-offset-1">
                                        <asp:TextBox ID="txt_lname" runat="server" Height="40px" CssClass="form-control col-md-2"></asp:TextBox>
                                        <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                            ID="Req_txt_email" ControlToValidate="txt_lname" ErrorMessage="Last Name is Required!" />
                                    </div>
                                </div>
                                <label class="control-label col-md-4" style="margin-left: 25px; color: Black; padding-top: 15px">
                                    Current Salary</label>
                                <label class="control-label col-md-4" style="margin-left: 55px; color: Black; padding-top: 15px">
                                    Expected Salary</label>
                                <div class="row">
                                    <div class="col-md-5 col-md-offset-1">
                                        <asp:TextBox ID="txt_curr_sal" runat="server" Height="40px" CssClass="form-control col-md-2"></asp:TextBox>
                                        <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                            ID="Req_txt_cmp_name" ControlToValidate="txt_curr_sal" ErrorMessage="Current Salary is Required!" />
                                    </div>

                                    <div class="col-md-5">
                                        <asp:TextBox ID="txt_exp_sal" runat="server" Height="40px" CssClass="form-control col-md-2"></asp:TextBox>
                                        <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                            ID="RequiredFieldValidator1" ControlToValidate="txt_exp_sal" ErrorMessage="Expected Salary is Required!" />
                                    </div>

                                </div>
                                <label class="control-label col-md-4" style="margin-left: 24px; color: Black; padding-top: 15px">Notice Period (Days)</label>
                                <label class="control-label col-md-4" style="margin-left: 55px; color: Black; padding-top: 15px">Date Of Birth</label>
                                <div class="row">
                                    <div class="col-md-5 col-md-offset-1">
                                        <asp:TextBox ID="txt_notice_pr" runat="server" Height="40px" CssClass="form-control col-md-2"></asp:TextBox>
                                        <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                            ID="Req_txt_cmp_cat" ControlToValidate="txt_notice_pr" ErrorMessage="Notice Period is Required!" />
                                    </div>


                                    <div class="col-md-5">
                                        <asp:TextBox ID="txt_dob" runat="server" Height="40px" CssClass="form-control col-md-2"></asp:TextBox>
                                        <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                            ID="RequiredFieldValidator2" ControlToValidate="txt_dob" ErrorMessage="Date Of Birth is Required!" />
                                    </div>
                                </div>
                                <label class="control-label col-md-5" style="margin-left: 25px; color: Black; padding-top: 15px;">Mobile Number</label>
                                <label class="control-label col-md-5" style="margin-left: 15px; color: Black; padding-top: 15px;">Email</label>
                                <div class="row">
                                    <div class="col-md-5 col-md-offset-1">
                                        <asp:TextBox ID="txt_mob" runat="server" Height="40px" CssClass="form-control col-md-2"></asp:TextBox>
                                        <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                            ID="Req_txt_emp" ControlToValidate="txt_mob" ErrorMessage="Mobile No. is Required!" />
                                    </div>

                                    <div class="col-md-5">
                                        <asp:TextBox ID="txt_email" runat="server" Height="40px" CssClass="form-control col-md-2"></asp:TextBox>
                                        <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                            ID="RequiredFieldValidator3" ControlToValidate="txt_email" ErrorMessage="Email is Required!" />
                                    </div>
                                </div>

                                <label class="control-label col-md-5" style="margin-left: 25px; color: Black; padding-top: 15px;">Upload Your CV</label>

                                <div class="row">
                                    <div class="col-md-10 col-md-offset-1">
                                        <asp:FileUpload CssClass="form-control" ID="FileUpload1" runat="server" Height="40px" onchange="validateFileSize();" />
                                        <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                            ID="RequiredFieldValidator4" ControlToValidate="FileUpload1" ErrorMessage="CV is Required!" />
                                    </div>
                                </div>
                                <div class="row" style="padding-top: 10px">
                                    <asp:Button ID="btn_save" runat="server" CssClass="btn btn-success col-md-7" Style="margin-left: 100px"
                                        Text="Apply Now" ValidationGroup="save" OnClick="btn_save_Click"></asp:Button>
                                </div>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <div class="span6">
                                <div id="diverrmessage" style="display: none; text-align: left;" runat="server" class="alert alert-danger alert-dismissable">
                                    <asp:Label Text="This file is too big" ID="lbl_err_msg" CssClass="msg" runat="server"></asp:Label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


        </div>

        <script type="text/javascript">
            function PanelClose() {
                document.getElementById("<%=pnl_dtl.ClientID %>").style.display = "none";
            }


            function PassValue() {
                document.getElementById("<%=lbl.ClientID %>").innerText = document.getElementById("<%=lbl_job_title.ClientID %>").innerText;
            }
        </script>


        <script type="text/javascript">
            function validateFileSize() {
                var uploadControl = document.getElementById('<%= FileUpload1.ClientID %>');
                if (uploadControl.files[0].size / 1024 > 512) {
                    document.getElementById('diverrmessage').style.display = "block";
                    document.getElementById('<%= btn_save.ClientID %>').disabled = true;
                    document.getElementById('<%= FileUpload1.ClientID %>').value = null;
                    return false;
                }
                else {
                    document.getElementById('diverrmessage').style.display = "none";
                    document.getElementById('<%= btn_save.ClientID %>').disabled = false;
                    return true;
                }
            }
        </script>






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

    </form>
</body>
</html>
