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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel runat="server" ID="upMain" UpdateMode="Conditional" ChildrenAsTriggers="true">
        <ContentTemplate>
            <div class="row">
                <div class="col-md-12">
                    <section class="panel">
                <header class="panel-heading">
                Tax Setup
                     <div class="pull-right">
                            <asp:Button CssClass="btn btn-info" ID="btn_save" Text="Save" runat="server" ValidationGroup="save"
                                onclick="btn_save_Click"/>
                            <asp:Button CssClass="btn btn-info" ID="btn_cancel" Text="Back" 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_tax" runat="server" />
                            <label id="Label1" class="control-label col-md-2" runat="server">Name</label>
                            <div class="col-md-3">
                            <asp:TextBox ID="txt_name" runat="server" CssClass="form-control"></asp:TextBox>
                             <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="Req_txt_name" controltovalidate="txt_name" errormessage="Name is Required!" />
                            </div>
                            <label class="control-label col-md-2" runat="server">City</label>
                            <div class="col-md-3">
                                <asp:DropDownList runat="server" ID="ddl_city" CssClass="form-control"></asp:DropDownList>
                            </div>
                         </div>

                         <div class="row" style="padding-top:05px">
                            <label class="col-md-2 control-label">Description</label>
                            <div class="col-md-4">
                                <asp:TextBox ID="txt_desc" runat="server" CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="Req_txt_desc" controltovalidate="txt_desc" errormessage="Description is Required!" />
                            </div>
                         </div>



                         <div class="row" style="padding-top:05px">
                            <label class="col-md-2 control-label">Start Date</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_strt_date" runat="server" CssClass="form-control datetime"></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="Req_txt_strt_date" controltovalidate="txt_strt_date" errormessage="Start Date is Required!" />
                            </div>

                            <label class="col-md-2 control-label">End Date</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_to_date" runat="server" CssClass="form-control datetime"></asp:TextBox>
                            </div>
                         </div>
                         <hr />
                         <div class="pull-right">
                            <asp:Button ID="btn_save_dtl" runat="server" CssClass="btn btn-info" 
                                 Text="Save Detail" onclick="btn_save_dtl_Click" />
                         </div>
                          <br />
                           <br /><br />
                         <div class="row">
                            <asp:GridView ID="GridView1" runat="server"  CellPadding="0" border="0" 
                                 AutoGenerateColumns="false" CssClass="display" 
                                 onrowcommand="GridView1_RowCommand">
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:HiddenField runat="server" ID="hid_tax_dtl" Value='<%#Bind("TAX_DETAIL_ID") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="From Amount">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_frm_amt" runat="server" CssClass="form-control" Text='<%#Bind("FROM_AMOUNT") %>'></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="To Amount">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_to_amt" runat="server" CssClass="form-control" Text='<%#Bind("TO_AMOUNT") %>'></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                     
                                    <asp:TemplateField HeaderText="Persentage" HeaderStyle-Width="100px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_per" runat="server" CssClass="form-control" Text='<%#Bind("PERSENTAGE") %>'></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Fix Amount" HeaderStyle-Width="150px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_fix_amt" runat="server" CssClass="form-control" Text='<%#Bind("FIX_AMOUNT") %>'></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="From Date">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_frm_date" runat="server" CssClass="form-control" Text='<%#Bind("FROM_DATE") %>'></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="To Date">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_to_date" runat="server" CssClass="form-control" Text='<%#Bind("TO_DATE") %>'></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Action">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnk" CommandName="g_add" runat="server"><i class="fa fa-pencil" style="font-size:20px !important"></i></asp:LinkButton>
                                                    <asp:LinkButton ID="lnk_dlt" CommandName="g_dlt" runat="server" OnClientClick="return confirm('Are you sure to delete?')"><i class="fa fa-trash" style="font-size:20px !important"></i></asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                </Columns>
                            </asp:GridView>
                         </div>

                </div>
            </section>
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="GridView1" EventName="RowCommand" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
