<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_FeeManagement_AssignOptionalFeeUpdate, App_Web_bt3kc4fp" maintainscrollpositiononpostback="true" 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="AssignOptionalFeeUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage">
                <div style="width: 100%; padding: 2px; margin: 2px">
                    <table width="100%" border="0" style="vertical-align: top; margin-top: -1px; border-collapse: collapse;"
                        cellpadding="0" cellspacing="0">
                        <tr>
                            <td class="dashBoardLeftCont" valign="top">
                                <div class="himssuHeader3WireBox">
                                    <table width="0px" cellpadding="0" cellspacing="0">
                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="104"
                                            Visible="true" runat="server" />
                                    </table>
                                </div>
                            </td>
                            <td style="vertical-align: top;" width="100%" class="whiteboxpaddingleft">
                                <div class="himssuHeader1WireBox whitebox">
                                    <div class="himsBoxHeader note note1 box box-danger">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                                <asp:Label ID="Label1" runat="server" Text="Search"></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="himsBoxContent">
                                        <asp:Panel ID="Panel3" runat="Server">
                                            <div class="contentHolder">
                                                <div class="tableContainer">
                                                    <cc1:TabContainer Width="100%" ID="AssignOptionalFeeTabContainer" runat="server"
                                                        CssClass="ajax__myTab" AutoPostBack="true" meta:resourcekey="AssignOptionalFeeTabContainerResource1"
                                                        ActiveTabIndex="2">
                                                        <cc1:TabPanel Width="100%" ID="AssignOptionalFee" runat="server" HeaderText="Assign Optional Fee">
                                                            <HeaderTemplate>
                                                                <ul class="nav nav-tabs ajaxnavtabs">
                                                                    <li><a style="padding: 10px 15px !important;">Assign Optional Fee </a></li>
                                                                </ul>
                                                            </HeaderTemplate>
                                                            <ContentTemplate>
                                                                <div class="contentHolder">
                                                                    <div class="himssuHeader1WireBox">
                                                                        <asp:Panel ID="DetailPanel" runat="server">
                                                                            <div class="contentHolder">
                                                                                <div class="cBoth">
                                                                                </div>
                                                                                <asp:Panel ID="SearchCriteriaPanel" runat="server">
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="OrganizationLabel" Text="Organization" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList ID="OrganizationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                                                onmouseenter="showHideTooltip()" AutoPostBack="True" SkinID="CustomWidthDropDownList"
                                                                                                Width="154px" OnSelectedIndexChanged="OrganizationDropDownList_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="BatchLable" Text="Batch" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList ID="BatchDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" Width="154px"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="BatchDropDownList_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="AdmissionCategoryLabel" runat="server" SkinID="MandatoryLabel" Text="Fees Category"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="AdmissionCategoryDropDownList" SkinID="CustomWidthDropDownList"
                                                                                                onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="AdmissionCategoryDropDownList_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="DepartmentLabel" runat="server" SkinID="MandatoryLabel" Text="Department"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="DepartmentDropDownList" SkinID="CustomWidthDropDownList"
                                                                                                AutoPostBack="true" onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()"
                                                                                                OnSelectedIndexChanged="DepartmentDropDownList_SelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="ClassLabel" runat="server" Text="Class" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList"
                                                                                                Width="154px" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="ClassDropDownList_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="DivisionLabel" runat="server" Text="Division" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="DivisionDropDownList" SkinID="CustomWidthDropDownList"
                                                                                                Width="154px" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="DivisionDropDownList_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="OptionalFeeSetupLabel" runat="server" SkinID="MandatoryLabel" Text="Optional Fee"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="OptionalFeeSetupDropDownList" SkinID="CustomWidthDropDownList"
                                                                                                onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="OptionalFeeSetupDropDownList_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="fLeft pTop5" style="width: 500px;">
                                                                                            <asp:CheckBox ID="ApplyToDivisionCheckBox" runat="server" OnCheckedChanged="ApplyToDivisionCheckBox_CheckedChanged"
                                                                                                AutoPostBack="True" />
                                                                                            <asp:Label ID="ApplyToDivisionLabel" runat="server" Text="Apply To Division" class="pLeft5"></asp:Label>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                    <div id="DivDivisionCheckBoxList" class="outerBox pTop5" runat="server" visible="False"
                                                                                        style="width: 500px;">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:CheckBox ID="DivisionCheckBox" runat="server" AutoPostBack="True" OnCheckedChanged="DivisionCheckBox_CheckedChanged" />
                                                                                            <asp:Label ID="ApplyForAllDivisionLabel" runat="server" Text="Select All" class="pLeft5"></asp:Label>
                                                                                        </div>
                                                                                        <div id="DivisionDiv" runat="server" class="fLeft pRight5" style="overflow: auto; height: 100px; width: 150px; border-color: Silver; border-width: thin; border-style: ridge">
                                                                                            <asp:CheckBoxList ID="DivisionCheckBoxList" runat="server">
                                                                                            </asp:CheckBoxList>
                                                                                        </div>
                                                                                        <div>
                                                                                            <asp:Button ID="ApplyForSelectDivisionButton" runat="server" SkinID="0" OnClick="ApplyForSelectDivisionButton_Click"
                                                                                                Text="Apply For Select Division" Width="150px" CssClass="btn-primary" />
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                </asp:Panel>
                                                                                <div class="spacer">
                                                                                    <asp:Image ID="Image11" runat="server" ImageUrl="~/Images/spacer.gif" />
                                                                                </div>
                                                                                <div class="himssuHeader6WireBox">
                                                                                    <div id="AssignOptionalFeeDetailDiv" runat="server" visible="False">
                                                                                        <div class="spacer">
                                                                                            <asp:Image ID="Image14" runat="server" ImageUrl="~/Images/spacer.gif" meta:resourcekey="Image14Resource1" />
                                                                                        </div>
                                                                                        <div class="himsBoxHeader pTop5" id="GridViewPagerDiv" runat="server" visible="False">
                                                                                            <div class="leftdiv">
                                                                                            </div>
                                                                                            <div class="himsBoxTitle">
                                                                                                <div class="gridHeaderText">
                                                                                                    <asp:Label ID="GridViewLabel" Text="Available Student List" runat="server" />
                                                                                                </div>
                                                                                                <div class="fRight" style="vertical-align: top; margin-top: -30px; padding-right: 10px;">
                                                                                                    <asp:Button ID="SaveFeeButton" runat="server" Width="60px" class="buttonLBlue" OnClick="SaveFeeButton_Click"
                                                                                                        Text="Save" SkinID="0" CssClass="PrimaryButton" />
                                                                                                    <asp:Button ID="ClearFeeButton" Text="Clear" runat="server" OnClick="ClearFeeButton_Click" />
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="himsBoxContent box-body box-solid gridviewfont">
                                                                                            <div id="Div5" runat="server" visible="False">
                                                                                                <asp:GridView CssClass="table table-striped table-bordered" ID="AssignOptionalFeeGridView"
                                                                                                    runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="No Records Found !!"
                                                                                                    DataKeyNames="SourceId,FeeSetupId">
                                                                                                    <Columns>


                                                                                                        <asp:TemplateField HeaderText="Select">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:CheckBox ID="HeaderSelectCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="HeaderSelectCheckBox_checked" />
                                                                                                            </HeaderTemplate>
                                                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                                                            <ItemStyle HorizontalAlign="Center" Width="5%" Wrap="True" />
                                                                                                            <ItemTemplate>

                                                                                                                <asp:CheckBox runat="server" ID="SelectCheckBox" Checked='<%# Eval("Check") %>' onclick="Getdetail(this);" />
                                                                                                                <asp:HiddenField ID="sourceoidlabelfield" runat="server" Value='<%# Eval("SourceId") %>' />
                                                                                                                <%-- <asp:CheckBox ID="SelectCheckBox" runat="server" Checked='<%# Eval("Check") %>' OnCheckedChanged="SelectCheckBox_checked"
                                                                                                                    AutoPostBack="true"  />--%>
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:BoundField DataField="RollNo" HeaderText="Roll No.">
                                                                                                            <ItemStyle Width="10%" />
                                                                                                        </asp:BoundField>
                                                                                                        <asp:BoundField DataField="Code" HeaderText="Id No">
                                                                                                            <ItemStyle Width="15%" />
                                                                                                        </asp:BoundField>
                                                                                                        <asp:BoundField DataField="Name" HeaderText="Name">
                                                                                                            <ItemStyle Width="70%" />
                                                                                                        </asp:BoundField>
                                                                                                    </Columns>
                                                                                                    <PagerSettings Visible="False" />
                                                                                                </asp:GridView>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="spacer">
                                                                                    <asp:Image ID="Image4" runat="server" ImageUrl="~/Images/spacer.gif" />
                                                                                </div>
                                                                            </div>
                                                                        </asp:Panel>
                                                                    </div>
                                                                </div>
                                                            </ContentTemplate>
                                                        </cc1:TabPanel>
                                                        <cc1:TabPanel Width="100%" ID="AssignOptionalFeeHeadTabPanel" runat="server" HeaderText="Assign Optional Fee Head">
                                                            <HeaderTemplate>
                                                                <ul class="nav nav-tabs ajaxnavtabs">
                                                                    <li><a style="padding: 10px 15px !important;">Assign Optional Fee Head </a></li>
                                                                </ul>
                                                            </HeaderTemplate>
                                                            <ContentTemplate>
                                                                <div class="contentHolder">
                                                                    <div class="himssuHeader1WireBox">
                                                                        <asp:Panel ID="DetailPanel1" runat="server">
                                                                            <div class="contentHolder">
                                                                                <div class="cBoth">
                                                                                </div>
                                                                                <asp:Panel ID="SearchCriteriaPanel1" runat="server">
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="OrganizationLabel1" Text="Organization" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList ID="OrganizationDropDownList1" runat="server" onmouseleave="showHideTooltip()"
                                                                                                onmouseenter="showHideTooltip()" AutoPostBack="True" SkinID="CustomWidthDropDownList"
                                                                                                Width="154px" OnSelectedIndexChanged="OrganizationDropDownList1_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="BatchLable1" Text="Batch" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList ID="BatchDropDownList1" runat="server" onmouseleave="showHideTooltip()"
                                                                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" Width="154px"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="BatchDropDownList1_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="AdmissionCategoryLabel1" runat="server" SkinID="MandatoryLabel" Text="Fees Category"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="AdmissionCategoryDropDownList1" SkinID="CustomWidthDropDownList"
                                                                                                onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="AdmissionCategoryDropDownList1_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="DepartmentLabel1" runat="server" SkinID="MandatoryLabel" Text="Department"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="DepartmentDropDownList1" SkinID="CustomWidthDropDownList"
                                                                                                AutoPostBack="true" onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()"
                                                                                                OnSelectedIndexChanged="DepartmentDropDownList1_SelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="ClassLabel1" runat="server" Text="Class" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="ClassDropDownList1" SkinID="CustomWidthDropDownList"
                                                                                                Width="154px" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="ClassDropDownList1_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="DivisionLabel1" runat="server" Text="Division" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="DivisionDropDownList1" SkinID="CustomWidthDropDownList"
                                                                                                Width="154px" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="DivisionDropDownList1_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="OptionalFeeHeadSetupLabel" runat="server" SkinID="MandatoryLabel"
                                                                                                Text="Optional Fee Head"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="OptionalFeeHeadSetupDropDownList" SkinID="CustomWidthDropDownList"
                                                                                                onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="OptionalFeeHeadSetupDropDownList_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="fLeft pTop5" style="width: 500px;">
                                                                                            <asp:CheckBox ID="ApplyToDivisionCheckBox1" runat="server" OnCheckedChanged="ApplyToDivisionCheckBox1_CheckedChanged"
                                                                                                AutoPostBack="True" />
                                                                                            <asp:Label ID="ApplyToDivisionLabel1" runat="server" Text="Apply To Division" class="pLeft5"></asp:Label>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                    <div id="DivDivisionCheckBoxList1" class="outerBox pTop5" runat="server" visible="False"
                                                                                        style="width: 500px;">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:CheckBox ID="DivisionCheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="DivisionCheckBox1_CheckedChanged" />
                                                                                            <asp:Label ID="ApplyForAllDivisionLabel1" runat="server" Text="Select All" class="pLeft5"></asp:Label>
                                                                                        </div>
                                                                                        <div id="DivisionDiv1" runat="server" class="fLeft pRight5" style="overflow: auto; height: 100px; width: 150px; border-color: Silver; border-width: thin; border-style: ridge">
                                                                                            <asp:CheckBoxList ID="DivisionCheckBoxList1" runat="server">
                                                                                            </asp:CheckBoxList>
                                                                                        </div>
                                                                                        <div>
                                                                                            <asp:Button ID="ApplyForSelectDivisionButton1" runat="server" SkinID="0" OnClick="ApplyForSelectDivisionButton1_Click"
                                                                                                Text="Apply For Select Division" Width="150px" CssClass="btn-primary" />
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                </asp:Panel>
                                                                                <div class="spacer">
                                                                                    <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/spacer.gif" />
                                                                                </div>
                                                                                <div class="himssuHeader6WireBox">
                                                                                    <div id="AssignOptionalFeeDetailDiv1" runat="server" visible="False">
                                                                                        <div class="spacer">
                                                                                            <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/spacer.gif" meta:resourcekey="Image14Resource1" />
                                                                                        </div>
                                                                                        <div class="himsBoxHeader pTop5" id="GridViewPagerDiv1" runat="server" visible="False">
                                                                                            <div class="leftdiv">
                                                                                            </div>
                                                                                            <div class="himsBoxTitle">
                                                                                                <div class="gridHeaderText">
                                                                                                    <asp:Label ID="Label2" Text="Available Student List" runat="server" />
                                                                                                </div>
                                                                                                <div class="fRight" style="vertical-align: top; margin-top: -30px; padding-right: 10px;">
                                                                                                    <asp:Button ID="SaveFeeHeadButton" runat="server" Width="60px" class="buttonLBlue"
                                                                                                        OnClick="SaveFeeHeadButton_Click" Text="Save" SkinID="0" CssClass="PrimaryButton" />
                                                                                                    <asp:Button ID="ClearFeeHeadButton" Text="Clear" runat="server" OnClick="ClearFeeHeadButton_Click" />
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="himsBoxContent box-body box-solid gridviewfont">
                                                                                            <div id="Div6" runat="server" visible="False">
                                                                                                <asp:GridView CssClass="table table-striped table-bordered" ID="AssignOptionalFeeGridView1"
                                                                                                    runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="No Records Found !!"
                                                                                                    DataKeyNames="SourceId">
                                                                                                    <Columns>
                                                                                                        <asp:TemplateField HeaderText="Select">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:CheckBox ID="HeaderSelectCheckBox1" runat="server" AutoPostBack="true" OnCheckedChanged="HeaderSelectCheckBox1_checked" />
                                                                                                            </HeaderTemplate>
                                                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                                                            <ItemStyle HorizontalAlign="Center" Width="5%" Wrap="True" />
                                                                                                            <ItemTemplate>
                                                                                                                <asp:CheckBox ID="SelectCheckBox1" runat="server" />
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:BoundField DataField="RollNo" HeaderText="Roll No.">
                                                                                                            <ItemStyle Width="10%" />
                                                                                                        </asp:BoundField>
                                                                                                        <asp:BoundField DataField="Code" HeaderText="Id No">
                                                                                                            <ItemStyle Width="15%" />
                                                                                                        </asp:BoundField>
                                                                                                        <asp:BoundField DataField="Name" HeaderText="Name">
                                                                                                            <ItemStyle Width="70%" />
                                                                                                        </asp:BoundField>
                                                                                                    </Columns>
                                                                                                    <PagerSettings Visible="False" />
                                                                                                </asp:GridView>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="spacer">
                                                                                    <asp:Image ID="Image5" runat="server" ImageUrl="~/Images/spacer.gif" />
                                                                                </div>
                                                                            </div>
                                                                        </asp:Panel>
                                                                    </div>
                                                                </div>
                                                            </ContentTemplate>
                                                        </cc1:TabPanel>
                                                        <cc1:TabPanel Width="100%" ID="AssignOtherFeeTabPanel" runat="server" HeaderText="Assign Other Fee">
                                                            <HeaderTemplate>
                                                                <ul class="nav nav-tabs ajaxnavtabs">
                                                                    <li><a style="padding: 10px 15px !important;">Assign Other Fee</a></li>
                                                                </ul>
                                                            </HeaderTemplate>
                                                            <ContentTemplate>
                                                                <div class="contentHolder">
                                                                    <div class="himssuHeader1WireBox">
                                                                        <asp:Panel ID="DetailPanel2" runat="server">
                                                                            <div class="contentHolder">
                                                                                <div class="cBoth">
                                                                                </div>
                                                                                <asp:Panel ID="SearchCriteriaPanel2" runat="server">
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="OrganizationLabel2" Text="Organization" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList ID="OrganizationDropDownList2" runat="server" onmouseleave="showHideTooltip()"
                                                                                                onmouseenter="showHideTooltip()" AutoPostBack="True" SkinID="CustomWidthDropDownList"
                                                                                                Width="154px" OnSelectedIndexChanged="OrganizationDropDownList2_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="BatchLable2" Text="Batch" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList ID="BatchDropDownList2" runat="server" onmouseleave="showHideTooltip()"
                                                                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" Width="154px"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="BatchDropDownList2_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="AdmissionCategoryLabel2" runat="server" Text="Fees Category"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="AdmissionCategoryDropDownList2" SkinID="CustomWidthDropDownList"
                                                                                                onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="DepartmentLabel2" runat="server" Text="Department"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="DepartmentDropDownList2" SkinID="CustomWidthDropDownList"
                                                                                                AutoPostBack="True" onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()"
                                                                                                OnSelectedIndexChanged="DepartmentDropDownList2_SelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="ClassLabel2" runat="server" Text="Class"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="ClassDropDownList2" SkinID="CustomWidthDropDownList"
                                                                                                Width="154px" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                                                AutoPostBack="True" OnSelectedIndexChanged="ClassDropDownList2_OnSelectedIndexChanged">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="DivisionLabel2" runat="server" Text="Division"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="DivisionDropDownList2" SkinID="CustomWidthDropDownList"
                                                                                                Width="154px" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                    <div class="outerBox pTop5">
                                                                                        <div class="controlLabelWidth">
                                                                                            <asp:Label ID="FilterLabel" runat="server" Text="Filter"></asp:Label>
                                                                                        </div>
                                                                                        <div class="fLeft pRight5">
                                                                                            <asp:DropDownList runat="server" ID="FilterDropDownList" SkinID="CustomWidthDropDownList"
                                                                                                onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()">
                                                                                                <asp:ListItem Text="- ALL -" Value="0" Selected="True"></asp:ListItem>
                                                                                                <asp:ListItem Text="School" Value="1"></asp:ListItem>
                                                                                                <asp:ListItem Text="Hostel" Value="2"></asp:ListItem>
                                                                                                <asp:ListItem Text="Transport" Value="3"></asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="cBoth">
                                                                                    </div>
                                                                                </asp:Panel>
                                                                                <div class="cBoth">
                                                                                </div>
                                                                                <div class="alignCenter pTop5">
                                                                                    <asp:Button ID="SearchButton" Text="Search" runat="server" OnClick="SearchButton_Click"
                                                                                        SkinID="0" CssClass="btn-primary-search" />
                                                                                    <asp:Button ID="ResetButton" runat="server" Text="Clear" OnClick="ResetButton_Click" />
                                                                                </div>
                                                                                <div class="cBoth">
                                                                                </div>
                                                                                <div class="spacer">
                                                                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/spacer.gif" />
                                                                                </div>
                                                                                <div class="himssuHeader6WireBox">
                                                                                    <div id="AssignOptionalFeeDetailDiv2" runat="server" visible="False">
                                                                                        <div class="spacer">
                                                                                            <asp:Image ID="Image6" runat="server" ImageUrl="~/Images/spacer.gif" meta:resourcekey="Image14Resource1" />
                                                                                        </div>
                                                                                        <div class="himsBoxHeader pTop5" id="GridViewPagerDiv2" runat="server" visible="False">
                                                                                            <div class="leftdiv">
                                                                                            </div>
                                                                                            <div class="himsBoxTitle">
                                                                                                <div class="gridHeaderText">
                                                                                                    <asp:Label ID="Label3" Text="Available Student List" runat="server" />
                                                                                                </div>
                                                                                                <div class="fRight" style="vertical-align: top; margin-top: -30px; padding-right: 10px;">
                                                                                                    Fee :
                                                                                                    <asp:DropDownList runat="server" ID="FeeHeadDropDownList" SkinID="CustomWidthDropDownList"
                                                                                                        onmouseleave="showHideTooltip()" Width="154px" onmouseenter="showHideTooltip()">
                                                                                                    </asp:DropDownList>
                                                                                                    <asp:Button ID="SaveButton" runat="server" Width="60px" class="buttonLBlue" OnClick="SaveButton_Click"
                                                                                                        Text="Save" SkinID="0" CssClass="PrimaryButton" />
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="himsBoxContent box-body box-solid gridviewfont">
                                                                                            <div id="Div7" runat="server" visible="False">
                                                                                                <asp:GridView CssClass="table table-striped table-bordered" ID="AssignOptionalFeeGridView2"
                                                                                                    runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="No Records Found !!"
                                                                                                    DataKeyNames="SourceId">
                                                                                                    <Columns>
                                                                                                        <asp:TemplateField HeaderText="Select">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:CheckBox ID="HeaderSelectCheckBox2" runat="server" AutoPostBack="true" OnCheckedChanged="HeaderSelectCheckBox2_checked" />
                                                                                                            </HeaderTemplate>
                                                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                                                            <ItemStyle HorizontalAlign="Center" Width="10%" Wrap="True" />
                                                                                                            <ItemTemplate>
                                                                                                                <asp:CheckBox ID="SelectCheckBox2" runat="server" />
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:BoundField DataField="Code" HeaderText="Id No">
                                                                                                            <ItemStyle Width="15%" />
                                                                                                        </asp:BoundField>
                                                                                                        <asp:BoundField DataField="Class" HeaderText="Class">
                                                                                                            <ItemStyle Width="15%" />
                                                                                                        </asp:BoundField>
                                                                                                        <asp:BoundField DataField="RollNo" HeaderText="Roll No.">
                                                                                                            <ItemStyle Width="10%" />
                                                                                                        </asp:BoundField>
                                                                                                        <asp:BoundField DataField="Name" HeaderText="Name">
                                                                                                            <ItemStyle Width="50%" />
                                                                                                        </asp:BoundField>
                                                                                                    </Columns>
                                                                                                    <PagerSettings Visible="False" />
                                                                                                </asp:GridView>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="spacer">
                                                                                    <asp:Image ID="Image7" runat="server" ImageUrl="~/Images/spacer.gif" />
                                                                                </div>
                                                                            </div>
                                                                        </asp:Panel>
                                                                    </div>
                                                                </div>
                                                            </ContentTemplate>
                                                        </cc1:TabPanel>
                                                    </cc1:TabContainer>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="spacer">
                <img src="../../Images/spacer.gif" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
   <%-- <script data-main="../../JavaScript/rjs/encrypt/assign-optional-fee-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
      <script data-main='<%=ResolveUrl("~/JavaScript/rjs/assign-optional-fee")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script>
        function Getdetail(obj) {
            var sourceid = $(obj).next().val();
            var chkselect = false;
            if ($(obj).is(':checked'))
                chkselect = true;
            else
                chkselect = false;

            feesetupId = $('#ctl00_CP_AssignOptionalFeeTabContainer_AssignOptionalFee_OptionalFeeSetupDropDownList').val()
            batchid = $('#ctl00_CP_AssignOptionalFeeTabContainer_AssignOptionalFee_BatchDropDownList').val();
            $.ajax({
                type: "POST",
                url: "/Pages/FeeManagement/AssignOptionalFeeUpdate.aspx/Getdetail",
                data: "{ FeeSetupId: '" + feesetupId + "',SourceId: '" + sourceid + "',BatchId:'" + batchid + "',chk:'" + chkselect + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    var datas = data.d;
                    if (datas == "-1") {
                        alert('Referred in Fee Setup can not be assigned');
                        $(obj).prop('checked', false);
                    }
                    else if (datas == "1") {
                        $(obj).attr('checked', 'checked');
                        $(obj).prop('checked', true);
                    }
                    else if (datas == "-50") {
                        alert('Referred in Fee Allocation can not be deleted');
                        $(obj).attr('checked', 'checked');
                        $(obj).prop('checked', true);
                    }
                    else if (datas == "-51") {
                        alert('Referred in Fee Receipt can not be deleted');
                        $(obj).attr('checked', 'checked');
                        $(obj).prop('checked', true);
                    }
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });

        }
    </script>
</asp:Content>
