<%@ Page Title="COA" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="COA.aspx.cs" Inherits="ZFJINV.Accounts.COA" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="row">
        <div class="col-md-12 mySpace">

            <div class="caption">
                <span class="caption-subject font-blue sbold" style="font-size: 150%;">COA</span>
            </div>

            <asp:UpdatePanel ID="upanel" runat="server">
                <ContentTemplate>

                    <div class="portlet-body">

                        <div class="tabbable-line">
                            <ul class="nav nav-tabs" id="myTabs">
                                <li class="active">   
                                    <a href="#tab_addCOA" data-toggle="tab" aria-controls="tab_addCOA"
                                        style="font-size: 13px; color: #2E4053; font-weight: 700;">Add COA</a>
                                </li>
                                <li>
                                    <a href="#tab_COAList" data-toggle="tab" aria-controls="tab_COAList"
                                        style="font-size: 13px; color: #2E4053; font-weight: 700;">COA List</a>
                                </li>

                            </ul>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab_addCOA">
                                    <div class="ui segment">
                                        <div class="ui stackable form">


                                            <div class="col-md-3">
                                                <label class="lbStyle">COA Code:</label>
                                                <asp:TextBox ID="txtCOAID" runat="server" title="COA ID" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">COA Name:</label>
                                                <asp:TextBox ID="txtCOAName" runat="server" title="COA Name" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>
                                            <%--<div class="col-md-3">
                                                <label class="lbStyle">COA Level:</label>
                                                <asp:TextBox ID="txtCOALevel" runat="server" title="myInput" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">Supplier/Customer ID:</label>
                                                <asp:DropDownList ID="txtSupplierID" runat="server" AppendDataBoundItems="true" class="select2 form-control " ></asp:DropDownList>
                                            </div>--%>
                                            <div class="col-md-3">
                                                <label class="lbStyle">COA Opening Balance:</label>
                                                <asp:TextBox ID="txtCOAOpening" runat="server" title="Remarks" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>

                                            <div class="col-md-3">
                                                <label class="lbStyle">COA Credit/Debit:</label>
                                                <asp:DropDownList ID="txtCreditDebit" AutoPostBack="false" runat="server" CssClass="select2 form-control " required="required"
                                                    AppendDataBoundItems="true">
                                                    <asp:ListItem Text=""></asp:ListItem>
                                                    <asp:ListItem Text="Credit"></asp:ListItem>
                                                    <asp:ListItem Text="Debit"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>


                                            <div class="col-md-3">
                                                <label class="lbStyle">First Level COA</label>

                                                <asp:DropDownList ID="txtCoaCategory" AutoPostBack="true" runat="server" CssClass="select2 form-control " required="required"
                                                    AppendDataBoundItems="true" OnSelectedIndexChanged="txtCoaCategory_SelectedIndexChanged1">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">Second Level COA</label>
                                                <asp:DropDownList ID="txtCoaSubCategory" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="txtCoaSubCategory_SelectedIndexChanged" class="select2 form-control"></asp:DropDownList>
                                            </div>

                                            <div class="col-md-3">
                                                <label class="lbStyle">Third Level COA</label>
                                                <asp:DropDownList ID="txtThirdLevelCOA" runat="server" AutoPostBack="true" AppendDataBoundItems="true" class="select2 form-control" OnSelectedIndexChanged="txtThirdLevelCOA_SelectedIndexChanged"></asp:DropDownList>
                                            </div>

                                            <div class="col-md-3">
                                                <label class="lbStyle">Fourth Level COA</label>
                                                <asp:DropDownList ID="txtFourthLevelCOA" runat="server" AppendDataBoundItems="true" class="select2 form-control"></asp:DropDownList>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">Particulars/Description:</label>
                                                <asp:TextBox ID="txtRemarks" runat="server" title="Remarks" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>

                                            <div class="col-md-3">
                                                <label class="lbStyle"></label>

                                            </div>
                                            <div class="newButton">
                                                <img src="../assets/global/img/ripples.gif" style="display: none; padding: 0;" id="loaderButton" />
                                                <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" class="btn green" Text="Save" OnClientClick="showLoader('Button')" />
                                                <asp:Button ID="btnCancel" runat="server" formnovalidate="formnovalidate" CssClass="btn red-mint " Text="Cancel" OnClick="btnCancel_Click" />
                                            </div>

                                            <div class="row">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-8 ">
                                        <div class="messagealert" id="alert_container">
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane" id="tab_COAList">

                                    <div class="rounded-corners">
                                        <div style="width: 100%; overflow: auto;">
                                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="False" AutoGenerateColumns="False" GridLines="Horizontal" BorderColor="#ECF0F1" AlternatingRowStyle-BackColor="#F2F3F4" RowStyle-Wrap="false"
                                                HeaderStyle-Wrap="false" RowStyle-BorderColor="#e8e8ec" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
                                                CssClass="gridviewdesign " RowStyle-CssClass="GV" PageSize="10"
                                                OnRowCommand="GridView1_RowCommand"
                                                OnRowDeleting="GridView1_RowDeleting"
                                                OnPageIndexChanging="GridView1_PageIndexChanging"
                                                EmptyDataText="No chart of accounts to display">
                                                <Columns>
                                                    <asp:CommandField
                                                        HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody"
                                                        ButtonType="Image"
                                                        HeaderText="Actions"
                                             
                                                        SelectImageUrl="~/assets/global/img/edit.png"
                                               
                                                        ShowHeader="True"
                                                        ShowSelectButton="True" />
                                                    <asp:BoundField DataField="COA ID" HeaderText="COA ID" ReadOnly="True" SortExpression="COA ID" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="COA Name" HeaderText="COA Name" SortExpression="COA Name" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="COA Level" HeaderText="COA Level" SortExpression="COA Level" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Category" HeaderText="First Level" SortExpression="Category" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="SubCategory" HeaderText="Second Level" SortExpression="SubCategory" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    
                                                    <asp:BoundField DataField="ThirdLevelCOAName" HeaderText="Third Level" SortExpression="SubCategory" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="FourthLevelCOAName" HeaderText="Fourth Level" SortExpression="SubCategory" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />

                                                    <asp:BoundField DataField="CreditDebit" HeaderText="Credit/Debit" SortExpression="CreditDebit" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="COA Opening" HeaderText="COA Opening" SortExpression="COA Opening" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Supplier ID" HeaderText="Supplier" SortExpression="Supplier ID" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Remarks" HeaderText="Remarks" SortExpression="Remarks" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />

                                                </Columns>
                                                <PagerStyle CssClass="pagination-ys" />
                                            </asp:GridView>
                                        </div>
                                    </div>
                                    <br />

                                </div>



                            </div>

                        </div>

                    </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="GridView1" />
                </Triggers>
            </asp:UpdatePanel>
        </div>

    </div>
    <asp:HiddenField ID="hidTAB" runat="server" Value="tab_addCOA" />
</asp:Content>
