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

<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" style="padding-bottom:30px">
                           <span class="label label-primary">Design Voucher Templates</span>
                    
                    <div class="pull-right">
                        <asp:Button text="Save" CssClass="btn btn-info" ID="btn_save" runat="server" ValidationGroup="save"
                            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_v_template" runat="server" />
                                <label class="control-label col-md-2">Title</label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="txt_title" runat="server" CssClass="form-control"></asp:TextBox>
                                    <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_title" controltovalidate="txt_title" errormessage="Title is Required!" />
                                </div>

                                <label class="control-label col-md-2">Voucher Type</label>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddl_type" runat="server" CssClass="form-control"></asp:DropDownList>
                                    <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_type" controltovalidate="ddl_type" errormessage="Type is Required!" />
                                </div>
                           </div>

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


                           <hr />


                           <asp:GridView ID="GridView1" runat="server" CellPadding="0" Border="0"
                                        AutoGenerateColumns="False" onrowdatabound="GridView1_RowDataBound" CssClass="display"
                                        onrowcommand="GridView1_RowCommand" >
                                        <Columns>
                                            <asp:TemplateField HeaderText="Account" ControlStyle-Width="230px" ItemStyle-Width="100px">
                                               <ItemTemplate>
                                               <asp:HiddenField ID="hid_comb" runat="server" Value='<%#Bind("CODE_COMBINATION_ID") %>' />
                                               <asp:Label ID="lbl_id" runat="server" Visible="false" Text='<%#Bind("VOUCHER_TEMP_DETAIL_ID") %>'></asp:Label>
                                                    <div class="input-group">
                                                        <asp:HiddenField ID="hid_acc" runat="server" />
                                                            <asp:TextBox ID="txt_acc" runat="server" CssClass="form-control" Text='<%#Bind("ACCOUNT_ID") %>'></asp:TextBox>
                                                                <span class="input-group-btn">
                                                                    <button id="btn_lov" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_Click"><i class="fa fa-search"></i></button>
                                                                    <%--<button id="btn_desc" type="button" runat="server" class="btn btn-white" onserverclick="btn_desc_Click"><i class="fa fa-info"></i></button>--%>
                                                                </span>
                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Debit" ControlStyle-Width="100px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txt_debit" style="text-align:right" Width="100px"  CssClass="form-control col-md-1"  runat="server" onkeypress="return numbersOnly(event)" Text='<%#Bind("ACCOUNTED_DR") %>' OnTextChanged="txt_debit_TextChanged" AutoPostBack="true"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                             <asp:TemplateField HeaderText="Credit" ControlStyle-Width="100px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txt_credit" style="text-align:right"  Width="100px" CssClass="form-control col-md-1" onkeypress="return numbersOnly(event)"   runat="server" Text='<%#Bind("ACCOUNTED_CR") %>' AutoPostBack="true" OnTextChanged="txt_credit_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            
                                             <asp:TemplateField HeaderText="Description">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txt_a_desc" CssClass="form-control"  runat="server" Text='<%#Bind("DESCRIPTION") %>'></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Action" ItemStyle-Width="80px">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnk" CommandName="g_add" runat="server"><i class="fa fa-plus" style="font-size:20px !important"></i></asp:LinkButton>
                                                    &nbsp;
                                                    <asp:LinkButton ID="lnk_dlt"  CommandName="g_dlt" runat="server" OnClientClick="return confirm('Are you sure to delete?')" ><i class="fa fa-remove" style="font-size:20px !important"></i></asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                       
                                       <FooterStyle CssClass="footerStyle" />
                            <HeaderStyle CssClass="headerStyle" />
                            <RowStyle CssClass="rowStyle" />
                                    </asp:GridView>

                                        <div class="row">
                                    <div class="col-md-1" style="margin-left:300px">
                                        <%--<asp:Label ID="txt_dr"  CssClass="control-label" runat="server"></asp:Label>--%>
                                        <asp:TextBox ID="txt_dr" runat="server" style="border: none;background-color:transparent" Enabled="false"></asp:TextBox>
                                    </div>

                                    <div class="col-md-1" style="margin-left:20px">
                                   <%-- <asp:Label ID="txt_cr" CssClass="control-label" Text="" runat="server"></asp:Label>--%>
                                        <asp:TextBox ID="txt_cr" runat="server" style="border: none;background-color:transparent"  Enabled="false"></asp:TextBox>
                                    </div>
                                    </div>
                    </div>
            </section>
            </div>
        </div>
    </div>
</asp:Content>
