<%@ Page Title="Fourth Level COA" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="FourthLevelCOA.aspx.cs" Inherits="ZFJINV.Accounts.FourthLevelCOA" %>
<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%;">Fourth Level COA</span>

            </div>


            <asp:UpdatePanel runat="server">
                <ContentTemplate>
                    <div class="portlet-body">
                        <div class="tabbable-line">
                            <ul class="nav nav-tabs ">
                                <li class="active">
                                    <a href="#tab_addProduct" data-toggle="tab"
                                        style="font-size: 13px; color: #2E4053; font-weight: 700;">Add Fourth Level COA</a>
                                </li>
                                <li>
                                    <a href="#tab_productList" onclick="" data-toggle="tab"
                                        style="font-size: 13px; color: #2E4053; font-weight: 700;">Fourth Level List</a>
                                </li>

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

                                            <div class="col-md-3">
                                                <label class="lbStyle">ID:</label>
                                                <asp:TextBox ID="txtFourthLeveCOAID" CssClass="myInput" runat="server" title="Fourth Leve COA ID"></asp:TextBox>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">Name:</label>
                                                <asp:TextBox ID="txtFourthLeveCOAName" runat="server" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>

                                             <div class="col-md-3">
                                                
                                                <label class="lbStyle">Third Level COA:</label>
                                                <asp:DropDownList ID="txtCOACategory" runat="server" class="select2 form-control "  required="required"></asp:DropDownList>
                                               
                                            </div>

                                            <img src="../assets/global/img/default.gif" style="display: none" id="loaderCity" />

                                            <div class="col-md-6">
                                                <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" CssClass="btn green-meadow" 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_productList">
                                    <asp:TextBox ID="search_textbox" runat="server" CssClass="myInput" onkeyup="Search_Gridview(this, 'gvTest')"></asp:TextBox><br />
                                    <div class="rounded-corners">
                                        <div style="width: 100%; overflow: auto;">
                                            <asp:GridView ID="grdFourthLevelCOA" runat="server" AllowPaging="False" AllowSorting="False"
                                                AutoGenerateColumns="False"
                                                DataKeyNames="FourthLevelCOAID"
                                                GridLines="Horizontal"
                                                BorderColor="#ECF0F1"
                                                
                                                BorderRadius="15px"
                                                AlternatingRowStyle-BackColor="#F2F3F4"
                                                RowStyle-Wrap="false"
                                                HeaderStyle-Wrap="false"
                                                RowStyle-BorderColor="#e8e8ec"
                                                CssClass="gridviewdesign "
                                                RowStyle-CssClass="GV"
                                                OnSelectedIndexChanged="grdFourthLevelCOA_SelectedIndexChanged"
                                                OnRowCommand="grdFourthLevelCOA_RowCommand"
                                                OnRowDeleting="grdFourthLevelCOA_RowDeleting"
                                                OnPageIndexChanging="grdFourthLevelCOA_PageIndexChanging"
                                                EmptyDataText="No Fourth Level COA 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="FourthLevelCOAID" HtmlEncode="False" Visible="true" HeaderText="Fourth Level COA ID" ReadOnly="True" SortExpression="Fourth Level COA ID" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="FourthLevelCOAName" HtmlEncode="False" HeaderText="Fourth Level COA Name" SortExpression="FourthLevelCOAName" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Category" HtmlEncode="False" HeaderText="Third Level COA" SortExpression="Category" 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="grdFourthLevelCOA" />
                </Triggers>
            </asp:UpdatePanel>
        </div>
    </div>

    <script type="text/javascript">
        function Search_Gridview(strKey, strGV) {
            var strGV = '<%= grdFourthLevelCOA.ClientID %>';
            var strData = strKey.value.toLowerCase().split(" ");
            var tblData = document.getElementById(strGV);
            var rowData;
            for (var i = 1; i < tblData.rows.length; i++) {
                rowData = tblData.rows[i].innerHTML;
                var styleDisplay = 'me';
                for (var j = 0; j < strData.length; j++) {
                    if (rowData.toLowerCase().indexOf(strData[j].toLowerCase()) != -1)
                        styleDisplay = '';
                    else {
                        styleDisplay = 'none';
                        break;
                    }
                }
                tblData.rows[i].style.display = styleDisplay;
            }
        }
    </script>
    <%--  <script type="text/javascript">
        $(function () {
            $('.search_textbox').each(function (i) {
                $(this).quicksearch("[id*=GridView1] tr:not(:has(th))", {
                    'testQuery': function (query, txt, row) {
                        return $(row).children(":eq(" + i + ")").text().toLowerCase().indexOf(query[0].toLowerCase()) != -1;
                    }
                });
            });
        });
</script>--%>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="footerContent" runat="server">
</asp:Content>
