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

<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="FeeHeadMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">
                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="104"
                                Visible="true" runat="server" />
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box" runat="server" id="SearchDiv">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <asp:Label ID="FeeLabel" runat="server" Text="Set Optional Fee"></asp:Label>
                                        </header>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="OptionalPanel" runat="Server">
                                <div class="contentHolder">
                                    <div class="tableContainer">
                                        <cc1:TabContainer Width="100%" ID="OptionalTabContainer" runat="server"
                                            CssClass="ajax__myTab nav nav-tabs tabs-style-iconbox ajax__tab_container ajax__tab_default" AutoPostBack="true" meta:resourcekey="OptionalFeeTabContainerTabContainerResource1"
                                            ActiveTabIndex="0">
                                            <cc1:TabPanel Width="100%" ID="OptionalFee" runat="server" HeaderText="Optional Fee">
                                                <HeaderTemplate>
                                                    <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                        <li class="fancyTab"><a><i class="fas fa-filter"></i>Optional Fee</a></li>
                                                    </ul>
                                                </HeaderTemplate>
                                                <ContentTemplate>
                                                    <div class="himssuHeader1WireBox">
                                                        <asp:Panel ID="DetailPanel" runat="server">
                                                            <div class="contentHolder">
                                                                <div class="outerBox pTop5 col-md-3">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="OrganizationLabel" runat="server" Text="Organization" SkinID="MandatoryLabel"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:DropDownList ID="OrganizationDropDownList" runat="server" class="form-control"></asp:DropDownList>
                                                                    </div>
                                                                </div>
                                                                <div class="outerBox pTop5 col-md-3">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="FeeMainGroupLabel" runat="server" Text="Fee Main Group" SkinID="MandatoryLabel"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:DropDownList ID="FeeMainGroupDropDownList" runat="server" class="form-control" OnSelectedIndexChanged="FeeMainGroupDropDownList_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                                                    </div>
                                                                </div>
                                                                <div class="cBoth">
                                                                </div>
                                                                <div id="Div1" class="himssuHeader7WireBox" runat="server">
                                                                    <div id="FeeHeadMasterListDetailDiv" visible="true" runat="server">
                                                                        <div class="spacer">
                                                                            <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/spacer.gif" />
                                                                        </div>
                                                                        <div class="himsBoxTitle">
                                                                            <%--<div class="gridHeaderText">
                                                                                <header>
                                                                                    <asp:Label ID="GridViewLabel" Text="List" runat="server" />
                                                                                </header>
                                                                            </div>--%>
                                                                            <div class="fRight mt-27 pagination display-flex">
                                                                                <asp:Button ID="SaveButton" runat="server" OnClick="SaveButton_Click"
                                                                                    Text="&#xf0c7; Save" SkinID="0" CssClass="btn btn-save fas" Height="28px" />
                                                                                &nbsp;
                                                                                <asp:Button ID="ClearButton" Text="&#xf0e2; Clear" runat="server" Height="28px" OnClick="ClearButton_Click" SkinID="0" CssClass="btn btn-clear fas" />
                                                                                &nbsp;
                                                                            </div>
                                                                        </div>
                                                                        <div class="himsBoxContent box-body box-solid gridviewfont">
                                                                            <div id="Div5" runat="server" visible="true" class="table-responsive">
                                                                                <asp:GridView ID="FeeHeadMasterGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                                    AllowPaging="false" SkinID="" PagerSettings-Visible="false" EmptyDataText="No Records Found !!"
                                                                                    DataKeyNames="FeeId" CssClass="table table-striped table-bordered table-hover">
                                                                                    <Columns>
                                                                                        <asp:TemplateField HeaderText="Select">
                                                                                            <HeaderTemplate>
                                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                                    <asp:CheckBox ID="HEaderCheckBox" runat="server" onclick="Select(this);" />
                                                                                                    <span></span>
                                                                                                </label>
                                                                                            </HeaderTemplate>
                                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                                            <ItemStyle HorizontalAlign="Center" Width="2%" Wrap="True" />
                                                                                            <ItemTemplate>
                                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                                    <asp:CheckBox ID="SelectCheckBox" runat="server" Checked='<%#Convert.ToBoolean(Eval("chkd")) %>' />
                                                                                                    <span></span>
                                                                                                </label>
                                                                                            </ItemTemplate>
                                                                                        </asp:TemplateField>
                                                                                        <asp:TemplateField HeaderText="FeeId" ItemStyle-Width="7%"
                                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" Visible="false">
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="FeeIdLabel" runat="server" Text='<%#Eval("FeeId") %>'></asp:Label>
                                                                                            </ItemTemplate>
                                                                                        </asp:TemplateField>
                                                                                        <asp:TemplateField HeaderText="Fee" ItemStyle-Width="7%"
                                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="FeeLabel" runat="server" Text='<%#Eval("FeeTitle") %>'></asp:Label>
                                                                                            </ItemTemplate>
                                                                                        </asp:TemplateField>
                                                                                        <asp:TemplateField HeaderText="Fee Head Id" ItemStyle-Width="7%" Visible="false"
                                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="FeeHeadIdLabel" runat="server" Text='<%# Eval("FeeHeadId") %>'></asp:Label>
                                                                                            </ItemTemplate>
                                                                                        </asp:TemplateField>
                                                                                        <asp:TemplateField HeaderText="Fee Head" ItemStyle-Width="7%"
                                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="FeeHeadLabel" runat="server" Text='<%# Eval("FeeHeadTitle") %>'></asp:Label>
                                                                                            </ItemTemplate>
                                                                                        </asp:TemplateField>
                                                                                    </Columns>
                                                                                </asp:GridView>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </asp:Panel>
                                                    </div>
                                                </ContentTemplate>
                                            </cc1:TabPanel>
                                            <cc1:TabPanel Width="100%" ID="OptionalFeeHeadTabPanel" runat="server" HeaderText="Optional Fee Head">
                                                <HeaderTemplate>
                                                    <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                        <li class="fancyTab"><a><i class="fas fa-filter"></i></i>Optional Fee Head</a></li>
                                                    </ul>
                                                </HeaderTemplate>
                                                <ContentTemplate>
                                                    <div class="himssuHeader1WireBox">
                                                        <asp:Panel ID="Feemainpanel" runat="server">
                                                            <div class="himsBoxContent  box-body box-solid gridviewfont">
                                                                <div class="contentHolder">
                                                                    <div id="FeeSetupDetailDiv" runat="server" visible="false">
                                                                        <div class="spacer">
                                                                            <asp:Image ID="Image14" runat="server" ImageUrl="~/Images/spacer.gif" meta:resourcekey="Image14Resource1" />
                                                                        </div>
                                                                        <div class="himssuHeader6WireBox">
                                                                            <div class="himsBoxContent">
                                                                                <div id="Div2" runat="server" visible="true" class="table-responsive">
                                                                                    <asp:GridView ID="FeeMainGroupOrgGroupwiseGridView" runat="server" Width="100%" CssClass="table table-striped table-bordered table-hover"
                                                                                        AutoGenerateColumns="False" EmptyDataText="No Records Found !!" AllowPaging="False"
                                                                                        OnRowDataBound="FeeMainGroupOrgGroupwiseGridView_RowDataBound" DataKeyNames="FeeMainGroupId,FeeHeadId"
                                                                                        ShowHeader="True" ShowFooter="false">
                                                                                        <Columns>
                                                                                            <asp:BoundField DataField="FeeMainGroupName" HeaderText="Title" ItemStyle-Width="45%"
                                                                                                HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                                            <asp:TemplateField HeaderText="Fee Head" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="45%"
                                                                                                ItemStyle-Wrap="true">
                                                                                                <ItemStyle HorizontalAlign="Left" />
                                                                                                <ItemTemplate>
                                                                                                    <asp:DropDownList runat="server" ID="FeeHeadDropDownList" onmouseleave="showHideTooltip()"
                                                                                                        onmouseenter="showHideTooltip()" Enabled="false" class="form-control">
                                                                                                    </asp:DropDownList>
                                                                                                </ItemTemplate>
                                                                                            </asp:TemplateField>
                                                                                        </Columns>
                                                                                        <PagerSettings Visible="False" />
                                                                                    </asp:GridView>
                                                                                </div>
                                                                            </div>
                                                                            <div class="alignCenter">
                                                                                <asp:Button ID="SaveFeeHeadButton" Text="&#xf0c7; Save" Visible="true" runat="Server" SkinID="0"
                                                                                    CssClass="btn btn-save fas" OnClick="SaveFeeHeadButton_Click" />
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </asp:Panel>
                                                    </div>
                                                </ContentTemplate>
                                            </cc1:TabPanel>
                                        </cc1:TabContainer>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

    <script type="text/javascript" language="javascript">
        function Select(obj) {
            var GridView = document.getElementById("<%=FeeHeadMasterGridView.ClientID%>");
            var inputList = GridView.getElementsByTagName("input");
            for (var i = 0; i < inputList.length; i++) {
                var row = inputList[i].parentNode.parentNode;
                if (inputList[i].type == "checkbox" && obj != inputList[i]) {
                    if (obj.checked) {
                        inputList[i].checked = true;
                    }
                    else {
                        inputList[i].checked = false;

                    }
                }
            }
        }
    </script>

    <%--  <script data-main="../../JavaScript/rjs/encrypt/fee-head-master-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/set-fee-optional")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
