<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="EmployeeContact.aspx.cs" Inherits="HRMS.EmployeeContact" %>
<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">
                        Contact
                        <div class="pull-right">
                            <asp:Button ID="btn_save" runat="server" CssClass="btn btn-info" Text="Save" ValidationGroup="save" OnClick="btn_save_Click" />
                            <asp:Button ID="btn_bck" runat="server" CssClass="btn btn-info" Text="Back" OnClick="btn_bck_Click" />
                        </div>
                    </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="col-md-2 control-label">Employee Name</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="emp_name" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox>
                            </div>
                        </div>


                        <div class="row">
                            <label class="col-md-2 control-label">Title</label>
                            <div class="col-md-3">
                                <asp:HiddenField ID="hid_contact" runat="server" />
                                <asp:DropDownList ID="ddl_title" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="ddl_title" ErrorMessage="Title is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                            </div>
                        </div>


                     



                        <div class="row">
                            <label class="col-md-2 control-label">First Name</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_first_name" CssClass="form-control" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="txt_first_name" ErrorMessage="First Name is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                            </div>

                               <label class="col-md-2 control-label">Birth Date</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_dob" CssClass="form-control datetime" onchange="DateSelectionChanged()" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="txt_dob" ErrorMessage="Birth Date is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                            <div class="row">
                                 <label class="col-md-2 control-label">Middle Name</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_mid_name" CssClass="form-control" runat="server"></asp:TextBox>
                            </div>


                          

                              <label class="col-md-2 control-label" runat="server" visible="false">Age</label>
                            <div class="col-md-2" runat="server" visible="false">
                                <asp:TextBox ID="txt_age" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox>
                            </div>
                        </div>




                         <div class="row">
                                 <label class="col-md-2 control-label">Last Name</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_lst_name" CssClass="form-control" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="txt_lst_name" ErrorMessage="Last Name is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                            </div>

                              <label class="col-md-2 control-label">Gender</label>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_gender" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator6" ControlToValidate="ddl_gender" ErrorMessage="Gender is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                            </div>
                        </div>



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

                              <label class="col-md-2 control-label">Mobile No</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_mob" runat="server" CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator8" ControlToValidate="txt_mob" ErrorMessage="Mobile No is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                            </div>
                        </div>


                      <ul class="nav nav-tabs">
      <li class="active"><a data-toggle="tab" href="#Personal">Personal</a></li>
    </ul>


                        <div class="tab-content">
         <div id="Personal" class="tab-pane fade in active">
           <br />
           <br />

          <div class="row">
                        <label  class="control-label col-md-2">Relationship</label>
                        <div class="col-md-3">
                            <asp:DropDownList ID="ddl_rel" runat="server" CssClass="form-control select2"></asp:DropDownList>
                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="ddl_rel" ErrorMessage="Relationship is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                        </div>
                           
            </div>
          <div class="row">
                            <label  class="control-label col-md-2">Start Reason</label>
                        <div class="col-md-3">
                            <asp:textbox id="txt_strt_reason" runat="server" cssclass="form-control"></asp:textbox>
                        </div>


                            <label class="control-label col-md-2">End Reason</label>
                        <div class="col-md-3">
                            <asp:textbox id="txt_end_reason" runat="server" cssclass="form-control"></asp:textbox>
                        </div>
            </div>
         <br />
             <div class="row">
                 <div class="col-md-3 col-md-offset-2">
                     <asp:CheckBox ID="chk_prim_cont" runat="server" CssClass="checkbox" Text="Primary Contact" />
                 </div>

                 <div class="col-md-2">
                     <asp:CheckBox ID="chk_pay_rcp" runat="server" CssClass="checkbox" Text="Payment Recipient" />
                 </div>

                  <div class="col-md-2">
                     <asp:CheckBox ID="chk_shared_resd" runat="server" CssClass="checkbox" Text="Shared Residence" />
                 </div>
                 
             </div>


             <div class="row">
                 <div class="col-md-3 col-md-offset-2">
                     <asp:CheckBox ID="chk_pr" runat="server" CssClass="checkbox" Text="Personal Relationship" />
                 </div>

                 <div class="col-md-2">
                     <asp:CheckBox ID="chk_benf" runat="server" CssClass="checkbox" Text="Beneficiary" />
                 </div>

                  <div class="col-md-2">
                     <asp:CheckBox ID="chk_dep" runat="server" CssClass="checkbox" Text="Dependent" />
                 </div>
                 
             </div>
           <hr />
             <div class="row">
                 <label class="control-label col-md-2">Start Date</label>
                 <div class="col-md-3">
                     <asp:TextBox ID="txt_strt_date" runat="server" CssClass="form-control datetime"></asp:TextBox>
                     <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator7" ControlToValidate="txt_strt_date" ErrorMessage="Start Date is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                 </div>

                  <label class="control-label col-md-2">End Date</label>
                 <div class="col-md-3">
                     <asp:TextBox ID="txt_end_date" runat="server" CssClass="form-control datetime"></asp:TextBox>
                 </div>
             </div>
           
           

        </div>
         
        

    </div>

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

    <script type="text/javascript">
        function DateSelectionChanged() {
            var today = new Date();
            var dob = new Date(document.getElementById('<%=txt_dob.ClientID%>').value);
            var months = (today.getMonth() - dob.getMonth() + (12 * (today.getFullYear() - dob.getFullYear())));
            document.getElementById('<%=txt_age.ClientID%>').value = Math.round(months / 12);
        }
    </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>
</asp:Content>
