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

<!DOCTYPE html>

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

    <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></title>
</head>
<body>
    <form id="form1" runat="server">
       <div class="container">
            <div class="row" style="padding-top: 4%;">
                <div class="panel panel-default" style="width: 80%; margin: auto;">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-md-5">
                                <h4>Job's Bank</h4>
                            </div>
                        </div>
                    </div>
                    <div class="panel-body">
                        <hr class="divider" />
                        <div class="panel panel-primary">
                            <div class="panel-heading">
                                All Jobs.
                            </div>
                            <div class="panel-body">
                                <asp:GridView ID="GridView1" CssClass="table table-striped table-bordered table-hover" CellPadding="0" Border="0"
                                    AutoGenerateColumns="false" runat="server" OnRowCommand="GridView1_RowCommand" >
                                    <Columns>
                                        <asp:TemplateField >
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hid_job_tit" runat="server" Value='<%#Bind("Job_Title")%>' />
                                                <asp:HiddenField ID="hid_pos_id" runat="server" Value='<%#Bind("POSITION_ID")%>' />
                                                <asp:LinkButton runat="server" ID="lbDetail"
                                                    OnClientClick="openModalpopup()"
                                                    OnClick="lbDetail_Click" data-ID='<%# Eval("POSITION_ID") %>' data-myData='<%# Eval("Job_Title") %>' CommandName='<%# Bind("REQUESITION_HEADER_ID") %>' >
                                                    <i class="fa fa-info" style="font-size:20px !important"></i>
                                                </asp:LinkButton>

                                                <%--<a href="<%#Eval("POSITION_ID")%>" id="lnkpopup" class="fa fa-plus" data-toggle="modal" data-target="#myModal2"></a>--%>

                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="Job_Title" HeaderText="Job Title" />                            
                                        <asp:BoundField DataField="GENDER" HeaderText="Gender" />
                                        <asp:BoundField DataField="NO_OF_VACANCIES" HeaderText="No Of Vacancies" />
                                        <asp:BoundField DataField="POSITION_DUE_DATE" HeaderText="Lat Date Of Apply" />  

                                       <%-- <asp:TemplateField HeaderText="Action">
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hid_requesitionid" runat="server"
                                                    Value='<%#Bind("REQUESITION_HEADER_ID")%>' />
                                                <asp:HiddenField ID="hid_Organizationid" runat="server"
                                                    Value='<%#Bind("BUSINESS_GROUP_ID")%>' />
                                                <asp:LinkButton ID="lnk_edit" CausesValidation="false" CommandName="gedit"
                                                    runat="server"><i class="fa fa-pencil" style="font-size:20px !important"></i>
                                                </asp:LinkButton>
                                                <asp:LinkButton ID="lnk_dlt" CausesValidation="false" CommandName="gdlt"
                                                    OnClientClick="return confirm('Are you sure to delete?')" runat="server"><i
                                                        class="fa fa-trash" style="font-size:20px !important"></i></asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>--%>
                                    </Columns>
                                    <FooterStyle CssClass="footerStyle" />
                                    <HeaderStyle CssClass="headerStyle" />
                                    <RowStyle CssClass="rowStyle" />
                                </asp:GridView>

                                <%--<a href="#" data-toggle="modal" data-target="#modalTC">terms and conditions</a>--%>

                                <asp:HiddenField runat="server" ID="hidPopup" Value="0" />

                                <!-- The Model Popup -->
                                  <div class="modal fade" id="myModal2">
                                    <div class="modal-dialog modal-lg">
                                      <div class="modal-content">
      
                                        <!-- Modal Header -->
                                        <div class="modal-header">
                                          <h4 class="modal-title">Job View</h4>
                                          <%--<button type="button" class="close" data-dismiss="modal">&times;</button>--%>
                                        </div>
        
                                        <!-- Modal body style="overflow-y: scroll;" -->
                                        <div class="modal-body" > 
                                            
                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label"  style="font-weight:bold"><span>Job Category :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_JobCategory" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px" runat="server" visible="false">                                                  
                                                  <label class="col-md-3 control-label"><span>Job ID :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_JobID" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">
                                                <asp:HiddenField runat="server" ID="hid_pos_text" />
                                                  <asp:HiddenField runat="server" ID="hid_position" />
                                                <asp:HiddenField runat="server" ID="hid_req" />
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>Career Level :</span></label>
                                                <div class="col-md-5">
                                                    <%--<asp:TextBox  CssClass="form-control" ID="txt_CarrerLvl" runat="server"></asp:TextBox>--%>
                                                    <label id="lbl_CarrerLvl" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>Working Hours :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_WorkHours" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>No Of Vacancies :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_NoOfVacancies" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>Gender :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_Gender" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>Maximum Age :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_MaxAge" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>Minimum Age :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_MinAge" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>Minimum Education :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_MaxEducation" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>Required Travel :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_ReqTravel" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>Job Shift :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_JobShift" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-3 control-label" style="font-weight:bold"><span>Last Date Of Apply :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_LastDateApply" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>

                                            <div class="row" style="padding-top:05px">                                                  
                                                  <label class="col-md-2 control-label" style="font-weight:bold"><span>Location :</span></label>
                                                <div class="col-md-5">                                                    
                                                    <label id="lbl_Location" runat="server" style="font-size:small;"></label>
                                                </div>                           
                                            </div>                                            

                                        </div>
                                        <!-- Modal footer -->
                                        <div class="modal-footer">
                                          <asp:Button ID="btn_app" runat="server" CssClass="btn btn-info" Text="Apply" OnClick="btn_app_Click" />
                                          <button type="button" class="btn btn-info" data-dismiss="modal">Close</button>
                                          <%--<asp:button text="Close" CssClass="btn btn-info" ID="clspopup" runat="server" onclick="clspopup_Click" />--%>                                    
                                        </div>
        
                                      </div>
                                    </div>
                                 </div>
                        <!-- Model Popup -->


                            </div>
                        </div>
                        <div class="span6">
                            <div id="divMessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                <i class="icon-check-sign"></i>
                                <asp:Label ID="lblMessage" class="msg" runat="server" Text=""></asp:Label>
                            </div>
                            <div class="span6">
                                <div id="diverrorMessage" runat="server" visible="false" class="alert alert-danger alert-dismissable">
                                    <i class="icon-check-sign"></i>
                                    <asp:Label ID="lblerrorMessage" class="msg" runat="server" Text=""></asp:Label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

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


<script type="text/javascript">

    $(document).ready(function () {

        var popup = document.getElementById('<%= hidPopup.ClientID%>').value;
        if (popup == "1") {
            $("#myModal2").modal();
            //alert(popup);
        } else {
            $("#myModal2").modal('hide');
            //alert(popup);
        }

        //$("#myModal2").modal();

        //$("#myModal2").modal();
        //$("#myModal2").modal('show');
        //$("#myModal2").modal('toggle');

        //$(function () {
        //    $('#lnkpopup').click(function () {            
        //        var a_href = $("#lnkpopup").attr("href");
        //        //alert(a_href);
        //    });
        //});

        //$('#lbDetail').click(function () {
        //    $('#myModal2').modal('show');
        //    //alert(''W-Doucment-lb');
        //});

    }); 

    function openModalpopup() {
        $("#myModal2").modal();
        $('[id*=myModal2]').modal('show');
        $('[id*=myModal2]').modal('toggle');

        document.getElementById('<%= hidPopup.ClientID%>').value = "1";
        //alert('W-Doucment-No');
    }

</script>
