<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_FeeManagement_FeeAdmin, App_Web_41e5tdim" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="DPC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="FeeAdminUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="167"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="row whiteboxpaddingleft">
                    <div class="himssuHeader2WireBox">
                        <div class="contentHolder">
                            <div class="himssuHeader1WireBox card card-box">

                                <%--      <div class="col-md-12 pTop5">
                                    <div class="alert alert-info col-md-12">
                                        <%-- <asp:Label ID="NoteLabel1" runat="server" Text="Only Admin can perform the actions on this page"
                                Font-Size="X-Small"></asp:Label><br />
                            <asp:Label ID="NoteLabel2" runat="server" Text="Make sure you are aware of functionality, Changes are irrversible"
                                Font-Size="X-Small"></asp:Label><br />
                                       <div><i class="material-icons pos-rel">info</i> | &nbsp;<asp:Label ID="NoteLabel1" runat="server" Text=" Only Admin can perform the actions on this page"></asp:Label></div>
                                        <div>
                                            <i class="material-icons pos-rel">info</i> |&nbsp;
                                                        <asp:Label ID="NoteLabel2" runat="server" Text=" Make sure you are aware of functionality, Changes are irrversible"></asp:Label>
                                        </div>
                                    </div>
                                </div>--%>
                                <div class="himsBoxHeader card-head">
                                    <asp:Panel ID="SearchHeaderPanel" runat="server" meta:resourcekey="SearchHeaderPanelResource1">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                                <header>
                                                    <i class="fas fa-search"></i>
                                                    <asp:Label ID="SearchHeaderLabel" runat="server" Text="Search"></asp:Label>
                                                </header>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </div>

                                <div class="himsBoxContent card-body">
                                    <asp:Panel ID="DetailPanel" runat="Server">
                                        <div class="contentHolder">
                                            <asp:Panel ID="SearchCriteriaPanel" runat="Server">

                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="DepositLabel" Text="Source" runat="server" CssClass="mandatory"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList ID="DepositDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                            onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList"
                                                            OnSelectedIndexChanged="DepositDropDownList_SelectedIndexChanged" CssClass="form-control">
                                                            <asp:ListItem Selected="True" Text="- Select -" Value="-1" />
                                                            <asp:ListItem Text="Deposit Add" Value="1" />
                                                            <asp:ListItem Text="Deposit Adjustment" Value="2" />
                                                            <asp:ListItem Text="Deposit Refund" Value="3" />
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchDepositHeadLabel" Text="Deposit Head" runat="server"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList ID="SearchDepositHeadIdDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                            onmouseenter="showHideTooltip()" AutoPostBack="false" SkinID="CustomWidthDropDownList"
                                                            class="form-control">
                                                        </asp:DropDownList>
                                                        <asp:HiddenField ID="DetailHiddenField" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchOrganizationLabel" Text="Organization" runat="server" CssClass="mandatory"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList ID="SearchOrganizationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                            onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList" OnSelectedIndexChanged="SearchOrganizationDropDownList_SelectedIndexChanged"
                                                            class="form-control">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ClassLabel" runat="server" Text="Class" CssClass="mandatory"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList"
                                                            class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            AutoPostBack="true" OnSelectedIndexChanged="ClassDropDownList_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="DivisionLabel" runat="server" Text="Division"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="DivisionDropDownList" SkinID="CustomWidthDropDownList"
                                                            class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchIdNoLabel" runat="server" Text="Id No"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="SearchIdNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server"> </asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3" id="ExpenseTypeDiv" runat="server" visible="false">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchExpenseLabel" runat="server" Text="Expense  Type"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList ID="SearchExpenseTypeDropDownList" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthDropDownList" runat="server" class="form-control">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="alignCenter pTop5 col-md-12 pTop5">
                                                    <asp:Button ID="SearchButton" runat="Server" OnClick="SearchButton_Click" Text="&#xf002; Search" SkinID="0" CssClass="btn-search btn fas" />
                                                    <asp:Button ID="DeleteButton" runat="Server"
                                                        OnClick="DeleteButton_Click" SkinID="0" Text="&#xf2ed; Delete" CssClass="btn-delete btn fas" />
                                                    <asp:HiddenField ID="ReceiptHiddenField" runat="server" />
                                                    <asp:Button ID="ResetButton" runat="Server"
                                                        Visible="true" OnClick="ResetButton_Click" SkinID="0" Text="&#xf0e2; Reset" CssClass="btn-reset btn fas" />
                                                </div>

                                            </asp:Panel>
                                        </div>
                                    </asp:Panel>

                                    <div id="FeeHeadDiv" runat="server" visible="false">

                                        <asp:Panel ID="Feemainpanel" runat="server">
                                            <div class="himsBoxContent  col-md-12">
                                                <div class="contentHolder">
                                                    <div class="himssuHeader6WireBox">
                                                        <div class="himsBoxContent">
                                                            <div id="DepositAddDiv" runat="server" visible="false">
                                                                <asp:GridView ID="DepositAddGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                    AllowPaging="false" PageSize="5" SkinID="" PagerSettings-Visible="false" EmptyDataText="No Records Found !!"
                                                                    DataKeyNames="Id,AcademicId,DepositHeadId" CssClass="table table-striped table-bordered">
                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText="Select">
                                                                            <HeaderTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="HeaderSelectCheckBox" runat="server" Enabled="true" AutoPostBack="true"
                                                                                        Visible="true" OnCheckedChanged="HeaderSelectCheckBox_CheckedChanged" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </HeaderTemplate>
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                            <ItemStyle HorizontalAlign="Center" Width="3%" Wrap="True" />
                                                                            <ItemTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="SelectCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="SelectCheckBox_CheckedChanged" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="DepositHeadName" HeaderText="Deposit Head Name" ItemStyle-Width="15%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:BoundField DataField="StudentName" HeaderText="Student Name" ItemStyle-Width="25%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:TemplateField HeaderText="Code" ItemStyle-Width="10%">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="IdNoCodeLabel" runat="server" Text='<%#Eval("Code") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:BoundField DataField="ClassDivisionName" HeaderText="Class" ItemStyle-Width="10%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:BoundField DataField="Amount" HeaderText="Amount" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:TemplateField HeaderText="Deposit Date" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="DepositDate" runat="server" Text='<%# Bind("DepositDate", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                            <div id="DepositAdjustmentDiv" runat="server" visible="false" class="table-responsive">
                                                                <asp:GridView ID="DepositAdjustmentGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                    AllowPaging="false" PageSize="5" SkinID="" PagerSettings-Visible="false" EmptyDataText="No Records Found !!"
                                                                    DataKeyNames="Id,AcademicId,DepositHeadId,StudentId" CssClass="table table-striped table-bordered table-hover">
                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText="Select">
                                                                            <HeaderTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="DepositAdjustmentHeaderSelectCheckBox" runat="server" Enabled="true" AutoPostBack="true"
                                                                                        Visible="true" OnCheckedChanged="DepositAdjustmentHeaderSelectCheckBox_CheckedChanged" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </HeaderTemplate>
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                            <ItemStyle HorizontalAlign="Center" Width="3%" Wrap="True" />
                                                                            <ItemTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="DepositAdjustmentSelectCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="DepositAdjustmentSelectCheckBox_CheckedChanged" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="DepositHeadName" HeaderText="Deposit Head Name" ItemStyle-Width="15%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:BoundField DataField="StudentName" HeaderText="Student Name" ItemStyle-Width="25%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:TemplateField HeaderText="ID No / Code" ItemStyle-Width="10%">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="IdNoCodeLabel" runat="server" Text='<%#Eval("Code") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:BoundField DataField="ClassDivisionName" HeaderText="Class" ItemStyle-Width="10%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:BoundField DataField="FeeDepositExpenseType" HeaderText="ExpenseType" ItemStyle-Width="10%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:BoundField DataField="Amount" HeaderText="Amount" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:TemplateField HeaderText="Adjustment Date" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="DepositDate" runat="server" Text='<%# Bind("AdjustmentDate", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                            <div id="DepositRefundDiv" runat="server" visible="false" class="table-responsive">
                                                                <asp:GridView ID="DepositRefundGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                    AllowPaging="false" PageSize="5" SkinID="" PagerSettings-Visible="false" EmptyDataText="No Records Found !!"
                                                                    DataKeyNames="AcademicId,DepositHeadId,Id" CssClass="table table-striped table-bordered table-hover">
                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText="Select">
                                                                            <HeaderTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="DepositRefundHeaderSelectCheckBox" runat="server" Enabled="true" AutoPostBack="true"
                                                                                        Visible="true" OnCheckedChanged="DepositRefundHeaderSelectCheckBox_CheckedChanged" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </HeaderTemplate>
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                            <ItemStyle HorizontalAlign="Center" Width="3%" Wrap="True" />
                                                                            <ItemTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="DepositRefundSelectCheckBox" runat="server" AutoPostBack="true"
                                                                                        OnCheckedChanged="DepositRefundSelectCheckBox_CheckedChanged" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="DepositHeadName" HeaderText="Deposit Head Name" ItemStyle-Width="15%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:BoundField DataField="StudentName" HeaderText="Student Name" ItemStyle-Width="25%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:TemplateField ItemStyle-Width="10%">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="IdNoCodeLabel" runat="server" Text='<%#Eval("Code") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:BoundField DataField="ClassDivisionName" HeaderText="Class" ItemStyle-Width="10%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:BoundField DataField="RefundAmount" HeaderText="Refund Amount" ItemStyle-Width="15%"
                                                                            HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:TemplateField HeaderText="Refund Date" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="DepositDate" runat="server" Text='<%# Bind("RefundDate", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--   <script data-main="../../JavaScript/rjs/encrypt/fee-admin-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/fee-admin")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>

    <script type="text/javascript">
        function checkAllRows(obj) {
            var objGridview = obj.closest('table');
            var list = objGridview.getElementsByTagName("input");
            for (var i = 0; i < list.length; i++) {
                var objRow = list[i].parentNode.parentNode;
                if (list[i].type == "checkbox" && obj != list[i]) {
                    if (obj.checked) {
                        list[i].checked = true;
                    }
                    else {
                        list[i].checked = false;
                    }
                }
            }
        }
        function checkUncheckHeaderCheckBox(obj) {
            var objRow = obj.parentNode.parentNode;
            var objGridView = obj.closest('table');
            var list = objGridView.getElementsByTagName("input");
            for (var i = 0; i < list.length; i++) {
                var objHeaderChkBox = list[0];
                var checked = true;
                if (list[i].type == "checkbox" && list[i] != objHeaderChkBox) {
                    if (!list[i].checked) {
                        checked = false;
                        break;
                    }
                }
            }
            objHeaderChkBox.checked = checked;
        }
    </script>

</asp:Content>
