<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="TaxGrp.aspx.cs" Inherits="HRMS.TaxGrp" %>
<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">
                        Tax Group
                           <div class="pull-right">
                            <asp:button text="Save" CssClass="btn btn-info" ID="btn_save"   ValidationGroup="save"
                                runat="server" onclick="btn_save_Click"/>
                            <asp:button text="Back" CssClass="btn btn-info" ID="btn_cancel" runat="server" onclick="btn_cancel_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">
                            <asp:HiddenField ID="hid_grp" runat="server" />
                            <label class="control-label col-md-2">Name</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_name" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>

                            <label class="control-label col-md-2">Description</label>
                            <div class="col-md-4">
                                <asp:TextBox ID="txt_desc" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>

                        <div class="row">
                            <label class="control-label col-md-2">Inactive On</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_date" runat="server" CssClass="form-control datetime"></asp:TextBox>
                            </div>
                        </div>

                        <hr />

                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  Visible="false"
                        CssClass="table table-striped table-bordered table-hover" CellPadding="0" onrowcommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound">
                                <Columns>
                                <asp:TemplateField HeaderStyle-Width="10px">
                                    <ItemTemplate>
                                        <asp:HiddenField ID="hid_grp_dtl" runat="server" Value='<%# Bind("GROUP_DTL_ID") %>' />
                                        <asp:HiddenField ID="hid_org" runat="server" Value='<%# Bind("ORG_ID") %>' />
                                        
                                    </ItemTemplate>
                                </asp:TemplateField>    

                            <asp:TemplateField HeaderText="Operating Unit">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="ddl_ou" runat="server" CssClass="form-control"></asp:DropDownList>
                                        <asp:RequiredFieldValidator runat="server" ID="rq1" ControlToValidate="ddl_ou" ErrorMessage="Operating Unit is required." setfocusonerror="true" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Rank" HeaderStyle-Width="100px">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_rank" runat="server" CssClass="form-control" Text='<%#Bind("RANK") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq3" ControlToValidate="txt_rank" ErrorMessage="Rank is required." setfocusonerror="true" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>


                                <asp:TemplateField HeaderText="Tax Code" HeaderStyle-Width="260px">
                                    <ItemTemplate>
                                        <div class="input-group">
                                            <asp:HiddenField ID="hid_taxcode" runat="server" Value='<%#Bind("TAX_NAME") %>' />
                                                            <asp:TextBox ID="txt_tax_code" runat="server" CssClass="form-control" Text='<%# Bind("TAX_NAME") %>'></asp:TextBox>
                                                                <span class="input-group-btn">
                                                                     <button id="btn_lov" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_ServerClick"><i class="fa fa-search"></i></button>
                                                                </span>
                                                    </div>
                                        <%--<asp:RequiredFieldValidator runat="server" ID="rq2" ControlToValidate="ddl_taxcode" ErrorMessage="Tax Code is required." setfocusonerror="true" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>--%>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                

                                

                                <asp:TemplateField HeaderText="Name">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_name" Enabled="false" runat="server" CssClass="form-control"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Site">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_site" Enabled="false" runat="server" CssClass="form-control"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                
                                    <asp:TemplateField HeaderText="Action" ItemStyle-Width="6%">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="linkedit" Visible="false" runat="server" CommandName="gEdit"><i class="fa fa-pencil" style="font-size:20px !important;"></i></asp:LinkButton>
                                            <asp:linkbutton ID="lnkadd" CommandName="gAdd" runat="server" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'><i class="fa fa-plus" style="font-size:20px !important"></i></asp:linkbutton>
                                        </ItemTemplate>
                                            <ItemStyle Width="6%"></ItemStyle>
                                    </asp:TemplateField>
                                </Columns>
                                    <%--<FooterStyle CssClass="footerStyle" />
                                    <HeaderStyle CssClass="headerStyle" />
                                    <RowStyle CssClass="rowStyle" />--%>
                            </asp:GridView>
                    </div>

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