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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager ID="scriptManager" runat="server">
    </asp:ScriptManager>

     <asp:UpdatePanel runat="server" ID="upMain" UpdateMode="Conditional" ChildrenAsTriggers="true">
        <ContentTemplate>

<script type="text/javascript">
    function clearTextBox() {
        var elements = document.getElementsByTagName("input");
        for (var ii = 0; ii < elements.length; ii++) {
            if (elements[ii].type == "text") {
                elements[ii].value = "";
            }
        }
        document.getElementById('<%=hid_lgl_entity.ClientID %>').value = "";
        document.getElementById('<%=hid_lgl_add.ClientID %>').value = "";
        document.getElementById('<%=hid_reg_add.ClientID %>').value = "";
        document.getElementById('<%=hid_est_add.ClientID %>').value = "";
        

    }
    </script>

    <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">GL Legal Entity</span>
                    
                        <div class="pull-right">
                            <asp:Button CssClass="btn btn-info" ID="btn_save" Text="Save" runat="server" 
                                onclick="btn_save_Click" ValidationGroup="save"/>
                            <asp:Button CssClass="btn btn-info" ID="btn_cancel" Text="Back" runat="server" 
                                onclick="btn_cancel_Click"/>

                                <input type="button" value="Clear" class="btn btn-info" onclick="clearTextBox()" />

                        </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">
                                <asp:HiddenField ID="hid_lgl_entity" runat="server" />
                                <label class="control-label col-md-2" runat="server">Business Group</label>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddl_business_grp" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                </div>

                                <div class="col-md-3 col-md-offset-2">
                                    <asp:CheckBox ID="chk_flg" runat="server" CssClass="checkbox" Text="Active Flag" />
                                </div>

                            </div>

                            <div class="row" style="padding-top:05px">
                                <label id="Label1" class="control-label col-md-2" runat="server">Legal Entity Name</label>
                                <div class="col-md-3">
                                   <asp:TextBox ID="txt_lgl_name" runat="server" CssClass="form-control"></asp:TextBox>
                                   <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_lgl_name" controltovalidate="txt_lgl_name" errormessage="Legal Entity Name Required!" />
                                </div>

                                <label id="Label2" class="control-label col-md-2" runat="server">Legal Territory</label>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddl_lgl_teritory" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                </div>
                            </div>


                             <div class="row" style="padding-top:05px">
                                <label id="Label3" class="control-label col-md-2" runat="server">Legal Entity Identifier</label>
                                <div class="col-md-3">
                                   <asp:TextBox ID="txt_lgl_entity_identif" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>

                                <label id="Label4" class="control-label col-md-2" runat="server">Legal Entity Address</label>
                                <div class="col-md-3">
                                 <div class="input-group">
                                        <asp:HiddenField ID="hid_lgl_add" runat="server" />
                                        <asp:TextBox ID="txt_lgl_add" runat="server" CssClass="form-control"></asp:TextBox>
                                          <span class="input-group-btn">
                                                            <button id="btn_lov_lgl_add" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_lgl_add_Click">
                                                            <i class="fa fa-search"></i></button>
                                                          </span>
                                    </div>
                                   
                                </div>
                            </div>
                            <hr />

                            <div class="row">
                                <label id="Label7" class="control-label col-md-2" runat="server">Registration Code</label>
                                <div class="col-md-3">
                                   <asp:TextBox ID="txt_reg_code" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>

                                <label id="Label8" class="control-label col-md-2" runat="server">Registration Number</label>
                                <div class="col-md-3">
                                   <asp:TextBox ID="txt_reg_no" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>


                            <div class="row" style="padding-top:05px">
                                <label id="Label5" class="control-label col-md-2" runat="server">Registration Territory</label>
                                <div class="col-md-3">
                                   <asp:DropDownList ID="ddl_reg_ter" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                </div>

                                <label id="Label6" class="control-label col-md-2" runat="server">Registration Address</label>
                                <div class="col-md-3">
                                 <div class="input-group">
                                        <asp:HiddenField ID="hid_reg_add" runat="server" />
                                        <asp:TextBox ID="txt_reg_add" runat="server" CssClass="form-control"></asp:TextBox>
                                          <span class="input-group-btn">
                                                            <button id="btn_lov_reg_add" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_reg_add_Click">
                                                            <i class="fa fa-search"></i></button>
                                                          </span>
                                    </div>
                                   
                                </div>
                            </div>

                            <hr />

                             <div class="row">
                                <label id="Label9" class="control-label col-md-2" runat="server">Estabilishment Name</label>
                                
                                <div class="col-md-3">
                                   <asp:TextBox ID="txt_est_name" runat="server" CssClass="form-control"></asp:TextBox>
                                   <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_est_name" controltovalidate="txt_est_name" errormessage="Estabilishment Name Required!" />
                                </div>

                                <label id="Label10" class="control-label col-md-2" runat="server">Estabilishment Number</label>
                                <div class="col-md-3">
                                   <asp:TextBox ID="txt_est_no" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>

                              <div class="row" style="padding-top:05px">
                                <label id="Label12" class="control-label col-md-2" runat="server">Estabilishment Address</label>
                                <div class="col-md-3">
                                  <div class="input-group">
                                        <asp:HiddenField ID="hid_est_add" runat="server" />
                                        <asp:TextBox ID="txt_est_add" runat="server" CssClass="form-control"></asp:TextBox>
                                          <span class="input-group-btn">
                                                            <button id="btn_lov_est_add" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_est_add_Click">
                                                            <i class="fa fa-search"></i></button>
                                                          </span>
                                    </div>
                                   
                                </div>
                            </div>
                            <hr />

                             <div class="row">
                                <label id="Label11" class="control-label col-md-2" runat="server">Start Date</label>
                                <div class="col-md-3">
                                   <asp:TextBox ID="txt_strt_date" runat="server" CssClass="form-control form_datetime"></asp:TextBox>
                                   <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_strt_date" controltovalidate="txt_strt_date" errormessage="Start Date Required!" />
                                </div>

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


                </section>
            </div>
        </div>
    </div>
    </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btn_save" EventName="Click"/>
        </Triggers>
    </asp:UpdatePanel>

    <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>
