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

<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 Rate Jurisdiction
                    <div class="pull-right">
                        <%--<asp:button text="Save" CssClass="btn btn-info" ID="btn_save" Width="120px"
                            ValidationGroup="save" runat="server" onclick="btn_save_Click" />--%>
                        <asp:button text="Tax Account" CssClass="btn btn-info" ID="btn_taxact" Width="120px"
                            runat="server" onclick="btn_taxact_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" style="padding-top:10px">
                        <asp:HiddenField ID="hid_taxrateid" runat="server" />

                        <asp:HiddenField ID="hid_taxregimecode" runat="server" />
                        <label class="control-label col-md-2">Tax Regime Code</label>
                        <div class="col-md-3">
                            <div class="input-group">                                
                                <asp:TextBox CssClass="form-control" ID="txt_taxregimecode" runat="server"></asp:TextBox>
                                <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                    id="req_taxregimecode" controltovalidate="txt_taxregimecode"
                                    errormessage="Tax Regime Code is Required!" />--%>
                                <span class="input-group-btn">
                                    <button id="btn_lov_taxregimecode" type="button" disabled="disabled" runat="server" class="btn btn-white"
                                        onserverclick="btn_lov_taxregimecode_Click"><i class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>

                        <label class="col-md-2 control-label">Tax Regime Name</label>
                        <div class="col-md-3">
                            <asp:TextBox CssClass="form-control" ID="txt_taxregimename" runat="server"></asp:TextBox>
                        </div>
                    </div>

                    <div class="row" style="padding-top:10px">
                        <asp:HiddenField ID="hid_configowner" runat="server" />
                        <label class="col-md-2 control-label">Configuration Owner</label>
                        <div class="col-md-3">
                            <div class="input-group">
                                <asp:TextBox ID="txt_configowner" runat="server" CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                    id="req_configowner" controltovalidate="txt_configowner"
                                    errormessage="Configuration Owner is Required!" />
                                <span class="input-group-btn">
                                    <button id="btn_lov_configowner" type="button" runat="server" class="btn btn-white"
                                        onserverclick="btn_lov_configowner_Click"><i class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>

                        <label class="col-md-2 control-label">Rate Type</label>
                        <div class="col-md-3">
                            <asp:DropDownList ID="ddl_Ratetype" runat="server" CssClass="form-control" 
                                OnSelectedIndexChanged="ddl_Ratetype_SelectedIndexChanged" AutoPostBack="true">
                                    <asp:ListItem Selected= "True" Text="--- Select ---" Value="0"></asp:ListItem>
                                    <asp:ListItem  Text="Quantity" Value="1"></asp:ListItem>
                                    <asp:ListItem  Text="Percentage" Value="2"></asp:ListItem>
                            </asp:DropDownList>
                            <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                id="req_Ratetype" controltovalidate="ddl_Ratetype" errormessage="Loan Amount is Required!" />--%>                            
                        </div>
                    </div>

                    <div class="row" style="padding-top:10px">
                        <asp:HiddenField ID="hid_geographytype" runat="server" />
                        <asp:HiddenField ID="hid_geographytypename" runat="server" />
                        <label class="control-label col-md-2">Geography Type</label>
                        <div class="col-md-3">
                            <div class="input-group">
                                <asp:TextBox CssClass="form-control" ID="txt_geographytype"  runat="server">
                                </asp:TextBox>
                                <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                    id="req_geographytype" controltovalidate="txt_geographytype"
                                    errormessage="Geography Type is Required!" />--%>
                                <span class="input-group-btn">
                                    <button id="btn_lov_geographytype" type="button" runat="server"
                                        class="btn btn-white" disabled="disabled"
                                        onserverclick="btn_lov_geographytype_Click"><i
                                            class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>
                        <label class="col-md-2 control-label">Geography Type Name</label>
                        <div class="col-md-3">
                            <div class="input-group">
                                <asp:TextBox CssClass="form-control" ID="txt_geographytypename"  runat="server">
                                </asp:TextBox>
                                <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save"
                                    runat="server" id="req_geographytypename" controltovalidate="txt_geographytypename"
                                    errormessage="Geography Type Name is Required!" />--%>
                                <span class="input-group-btn">
                                    <button id="btn_lov_geographytypename" type="button" runat="server"
                                        class="btn btn-white" disabled="disabled"
                                        onserverclick="btn_lov_geographytypename_Click"><i
                                            class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>
                    </div>

                    <div class="row" style="padding-top:10px">
                        <asp:HiddenField ID="hid_geographycode" runat="server" />
                        <asp:HiddenField ID="hid_geographyname" runat="server" />
                        <label class="control-label col-md-2">Geography Code</label>
                        <div class="col-md-3">
                            <div class="input-group">
                                <asp:TextBox CssClass="form-control" ID="txt_geographycode"  runat="server">
                                </asp:TextBox>
                                <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                    id="req_geographycode" controltovalidate="txt_geographycode"
                                    errormessage="Geography Code is Required!" />--%>
                                <span class="input-group-btn">
                                    <button id="btn_lov_geographycode" type="button" runat="server"
                                        class="btn btn-white" disabled="disabled"
                                        onserverclick="btn_lov_geographycode_Click"><i
                                            class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>
                        <label class="col-md-2 control-label">Geography Name</label>
                        <div class="col-md-3">
                            <div class="input-group">
                                <asp:TextBox CssClass="form-control" ID="txt_geographyname"  runat="server">
                                </asp:TextBox>
                                <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save"
                                    runat="server" id="req_geographyname" controltovalidate="txt_geographyname"
                                    errormessage="Geography Name is Required!" />--%>
                                <span class="input-group-btn">
                                    <button id="btn_lov_geographyname" type="button" runat="server"
                                        class="btn btn-white" disabled="disabled"
                                        onserverclick="btn_lov_geographyname_Click"><i
                                            class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>
                    </div>

                    <div class="row" style="padding-top:10px">
                        <asp:HiddenField ID="hid_tax" runat="server" />
                        <label class="col-md-2 control-label">Tax</label>
                        <div class="col-md-3">
                            <div class="input-group">
                                <asp:TextBox ID="txt_taxcode" runat="server"  CssClass="form-control"></asp:TextBox>
                                <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                    id="req_taxcode" controltovalidate="txt_taxcode" errormessage="Tax is Required!" />--%>
                                <span class="input-group-btn">
                                    <button id="btn_lov_taxcode" type="button" runat="server" disabled="disabled" class="btn btn-white"
                                        onserverclick="btn_lov_taxcode_Click"><i class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>
                        <label class="col-md-2 control-label">Tax Name</label>
                        <div class="col-md-3">
                            <asp:TextBox ID="txt_taxname" runat="server"  CssClass="form-control"></asp:TextBox>
                        </div>
                    </div>

                    <div class="row" style="padding-top:10px">
                        <asp:HiddenField ID="hid_taxstatuscode" runat="server" />                        
                        <label class="col-md-2 control-label">Tax Status Code</label>
                        <div class="col-md-3">
                            <div class="input-group">
                                <asp:TextBox ID="txt_taxstatuscode" runat="server" CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                    id="req_taxstatuscode" controltovalidate="txt_taxstatuscode"
                                    errormessage="Tax Status Code is Required!" />
                                <span class="input-group-btn">
                                    <button id="btn_lov_taxstatuscode" type="button" runat="server" class="btn btn-white"
                                        onserverclick="btn_lov_taxstatuscode_Click"><i class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>

                        <label class="col-md-2 control-label">Tax Status Name</label>
                        <div class="col-md-3 text-right">
                            <asp:TextBox ID="txt_taxstatusname" runat="server"  CssClass="form-control"></asp:TextBox>
                        </div>
                    </div>

                    <div class="row" style="padding-top:10px">
                        <asp:HiddenField ID="hid_jurisdictioncode" runat="server" />
                        <label class="col-md-2 control-label">Tax Jurisdiction Code</label>
                        <div class="col-md-3">
                            <div class="input-group">
                                <asp:TextBox ID="txt_jurisdictioncode" runat="server"  CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                    id="req_jurisdictioncode" controltovalidate="txt_jurisdictioncode"
                                    errormessage=" Jurisdiction Code is Required!" />
                                <span class="input-group-btn">
                                    <button id="btn_lov_jurisdictioncode" type="button" runat="server" disabled="disabled" class="btn btn-white"
                                        onserverclick="btn_lov_jurisdictioncode_Click"><i class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>

                        <label class="col-md-2 control-label">Tax Jurisdiction Name</label>
                        <div class="col-md-3 text-right">
                            <asp:TextBox ID="txt_jurisdictionname" runat="server"  CssClass="form-control"></asp:TextBox>
                            <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server"
                                id="RequiredFieldValidator1" controltovalidate="txt_Jurisdiction"
                                errormessage=" Jurisdiction Code is Required!" />--%>
                        </div>
                    </div>
                    
                    <div class="row" style="padding-top:10px">                        
                        <label class="control-label col-md-2">Tax Rate Code</label>
                        <div class="col-md-3">
                            <asp:TextBox ID="txt_taxratecode" runat="server" CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save"
                                    runat="server" id="req_taxratecode" controltovalidate="txt_taxratecode"
                                    errormessage="Tax Rate Code is Required!" />
                        </div>
                    </div>                   

                    <hr />

                    <div class="row" style="padding-top:10px">
                        <div class="col-md-offset-1">
                            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
                                CssClass="table table-striped table-bordered table-hover" CellPadding="0" Width="90%"
                                OnRowCommand="GridView2_RowCommand" OnRowDataBound="GridView2_RowDataBound" >
                                <Columns>
                                    <asp:TemplateField HeaderText="Unit Of Measurement" HeaderStyle-Width="20%">
                                        <ItemTemplate>                                            
                                            <asp:DropDownList ID="ddl_uom" runat="server" CssClass="form-control" >
                                                <asp:ListItem Selected= "True" Text="--- Select ---" Value="0" ></asp:ListItem>
                                                <asp:ListItem  Text="Kilogram" Value="1"></asp:ListItem>
                                                <asp:ListItem  Text="Liter" Value="2"></asp:ListItem>
                                                <asp:ListItem  Text="UOM" Value="3"></asp:ListItem>
                                            </asp:DropDownList>
                                            <%--<asp:DropDownList ID="ddl_rolebounding" runat="server" CssClass="form-control"></asp:DropDownList>--%>
                                        </ItemTemplate>

                                    <HeaderStyle Width="20%"></HeaderStyle>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Quantity Rate" HeaderStyle-Width="20%">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_qntyrate" runat="server"
                                                    CssClass="form-control text" Text='<%#Bind("QUANTITY_RATE") %>'>
                                            </asp:TextBox>
                                        </ItemTemplate>

                                    <HeaderStyle Width="20%"></HeaderStyle>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Percentage Rate" HeaderStyle-Width="20%">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_pertgerate" runat="server"
                                                    CssClass="form-control text" Text='<%#Bind("PERCENTAGE_RATE") %>'>
                                            </asp:TextBox>
                                        </ItemTemplate>

                                    <HeaderStyle Width="20%"></HeaderStyle>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Effective From" HeaderStyle-Width="15%">
                                            <ItemTemplate>
<%--                                            <asp:HiddenField ID="hid_jurdid" runat="server"
                                                Value='<%#Bind("TAX_JURISDICTION_ID")%>' />--%>

                                                <asp:HiddenField ID="hid_rate_id" runat="server"
                                                Value='<%#Bind("TAX_RATE_ID")%>' />
                                                <asp:HiddenField ID="hid_uom_id" runat="server"
                                                Value='<%#Bind("UOM_CODE")%>' />
                                                <asp:TextBox ID="txt_efffrom" runat="server"
                                                    CssClass="form-control datetime" Text='<%#Bind("EFFECTIVE_FROM") %>'>
                                                </asp:TextBox>
                                                <%--<asp:RequiredFieldValidator SetFocusOnError="true"
                                                    ValidationGroup="d_save" runat="server" id="req_rcv_date"
                                                    controltovalidate="txt_rcv_date"
                                                    errormessage="Receive Date is Required!" />--%>
                                            </ItemTemplate>

                                        <HeaderStyle Width="15%"></HeaderStyle>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Effective To" HeaderStyle-Width="15%">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txt_efffrto" runat="server"
                                                    CssClass="form-control datetime" Text='<%#Bind("EFFECTIVE_TO") %>'>
                                                </asp:TextBox>
                                                <%--<asp:RequiredFieldValidator SetFocusOnError="true"
                                                    ValidationGroup="d_save" runat="server" id="req_rcv_date"
                                                    controltovalidate="txt_rcv_date"
                                                    errormessage="Receive Date is Required!" />--%>
                                            </ItemTemplate>

                                        <HeaderStyle Width="15%"></HeaderStyle>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Rate Details" HeaderStyle-Width="5%" Visible="false">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_ratedetails" runat="server"
                                                    CssClass="form-control text" > <%--Text='<%#Bind("QUANTITY_RATE") %>'--%>
                                            </asp:TextBox>
                                        </ItemTemplate>

                                        <HeaderStyle Width="20%"></HeaderStyle>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Tax Account" HeaderStyle-Width="5%" Visible="false">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_taxaccount" runat="server"
                                                    CssClass="form-control text" > <%--Text='<%#Bind("Tax Account") %>'--%>
                                            </asp:TextBox>
                                        </ItemTemplate>

                                        <HeaderStyle Width="10%"></HeaderStyle>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Details Accounts" HeaderStyle-Width="5%" Visible="false">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_duplicateaccount" runat="server"
                                                    CssClass="form-control text" > <%--Text='<%#Bind("Tax Account") %>'--%>
                                            </asp:TextBox>
                                        </ItemTemplate>

                                        <HeaderStyle Width="10%"></HeaderStyle>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Action" ItemStyle-Width="6%">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="linkedit" runat="server" Visible="false"
                                                    CommandName="gEdit"><i class="fa fa-pencil"
                                                        style="font-size:20px !important;"></i></asp:LinkButton>
                                                <asp:LinkButton ID="lnk_add" ValidationGroup="d_save" runat="server"
                                                    CommandName="gadd"><i class="fa fa-plus"
                                                        style="font-size:20px !important;"></i></asp:LinkButton>
                                                <asp:linkbutton ID="linkdlt" CausesValidation="false"
                                                    CommandName="gDelete" runat="server"
                                                    OnClientClick="return confirm('Are you sure to delete?')"><i
                                                        class="fa fa-trash" 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>
                    </div>

                    <hr />   
                    
                    <div class="row" style="padding-top:10px">
                                <asp:HiddenField ID="hid_ledger" runat="server" />

                                <label class="control-label col-md-2">Ledger</label>
                                <div class="col-md-3">
                                    <div class="input-group">
                                        <asp:TextBox CssClass="form-control" ID="txt_ledger" runat="server">
                                        </asp:TextBox>
                                        <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save"
                                            runat="server" id="req_ledger" controltovalidate="txt_ledger"
                                            errormessage="Ledger is Required!" />--%>
                                        <span class="input-group-btn">
                                            <button id="btn_lov_ledger" type="button" runat="server"
                                                class="btn btn-white" onserverclick="btn_lov_ledger_Click"><i
                                                    class="fa fa-search"></i></button>
                                        </span>
                                    </div>
                                </div>

                                <label class="control-label col-md-2"></label>
                                <div class="col-md-3">
                                    <%--<asp:button text="Create" CssClass="btn btn-info" ID="btn_create" Width="120px"
                                        ValidationGroup="Create" runat="server" onclick="btn_Create_Click" />--%>
                                    <%--onclick="btn_save_Click"--%>
                                </div>
                      </div>

                    <hr />

                    <div class="row" style="padding-top:10px">
                                <div class="col-md-offset-1">
                            <asp:GridView ID="GridView3" AutoGenerateColumns="false" runat="server"
                             CssClass="table table-striped table-bordered table-hover" CellPadding="0" Width="90%"
                             onrowcommand="GridView3_RowCommand">
                                <Columns>
                                    <asp:BoundField DataField="LEDGER_DESC" HeaderText="Ledger" />
                                    <asp:BoundField DataField="LEDGER_DESC" HeaderText="Description" />
                                    
                                    <asp:TemplateField HeaderText="Action">
                                        <ItemTemplate>
                                            <asp:HiddenField ID="hid_taxAct_id" runat="server" Value='<%#Bind("TAX_ACCOUNT_ID")%>' />
                                            <asp:HiddenField ID="hid_taxRat_id" runat="server" Value='<%#Bind("TAX_RATE_ID")%>' />
                                            <asp:HiddenField ID="hid_taxLeg_id" runat="server" Value='<%#Bind("LEDGER_ID")%>' />
                                            <asp:HiddenField ID="hid_taxJud_id" runat="server" Value='<%#Bind("TAX_JURISDICTION_ID")%>' />
                                            <asp:HiddenField ID="hid_tax_id" runat="server" Value='<%#Bind("TAX_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>
                                <script src="/ThemeScrips/Datatables/media/js/jquery.js" type="text/javascript"></script>
                                 <script src="/ThemeScrips/Datatables/media/js/jquery.datatables.min.js" type="text/javascript"></script>
                                 <script src="/ThemeScrips/Datatables/media/js/jquery.Datatables.js" type="text/javascript"></script>
                                 <script src="/ThemeScrips/Datatables/media/js/GridviewFix.js" type="text/javascript"></script>
                                 <script type="text/javascript">
                                     $("#ContentPlaceHolder1_GridView1").GridviewFix().dataTable();
                                </script>
                                 </div>
                            </div>

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

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