<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_FeeManagement_FeeDiscount, App_Web_vpn0t50z" 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" %>
<%@ Register Src="~/UserControls/Common/StudentSearch/StudentSearch.ascx" TagName="StudentSearch" TagPrefix="Std" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="IncidentLogUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <Std:StudentSearch ID="StudentSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont" valign="top" runat="server" id="ScreenGroup">
                    <div>
                       
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="104"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                           
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader1WireBox card card-box">
                        <div class="himsBoxHeader  card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <asp:Label ID="AssignToLabel" runat="server" Text="Assign To"></asp:Label>
                                    </header>
                                </div>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <div runat="server" class="col-md-12 bg-lghtgrey radiobtn" visible="true">
                                    <div class="col-xl-4">
                                        <asp:RadioButton ID="StudentRadioButton" runat="server" GroupName="S1" AutoPostBack="true"
                                            OnCheckedChanged="StudentRadioButton_CheckedChanged" Text="Student" />

                                        <%--  <asp:Label ID="StudentLabel" runat="server"  Font-Bold="true"></asp:Label>--%>
                                    </div>
                                    <div class="col-xl-4">
                                        <asp:RadioButton ID="EmployeeRadioButton" runat="server" GroupName="S1" AutoPostBack="true"
                                            OnCheckedChanged="EmployeeRadioButton_CheckedChanged" Text="Employee" />

                                        <%--<asp:Label ID="EmployeeLabel" runat="server" Text="Employee" Font-Bold="true"></asp:Label>--%>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <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"
                                            CssClass="form-control" OnSelectedIndexChanged="OrganizationDropDownList_OnSelectedIndexChanged">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <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" CssClass="form-control"
                                            AutoPostBack="true" OnSelectedIndexChanged="BatchDropDownList_OnSelectedIndexChanged">
                                        </asp:DropDownList>
                                    </div>
                                </div>

                                <div class="cBoth">
                                </div>
                                <asp:Panel ID="StudentSearchPanel" runat="server">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="StudentIdNoLabel" runat="server" Text="Id No" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="StudentIdNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200" AutoPostBack="true"
                                                OnTextChanged="StudentIdNoTextBox_TextChanged">
                                            </asp:TextBox>
                                            <asp:ImageButton SkinID="FindImage" ToolTip="Student Search" ID="StudentIdNoImageButton"
                                                ImageUrl="~/Images/icons/icon_find.gif" runat="server" />
                                            <asp:HiddenField ID="SourceIdHiddenField" runat="server" />
                                            <asp:HiddenField ID="ClassIdHiddenField" runat="server" />
                                            <asp:HiddenField ID="AdmissionCategoryIdHiddenField" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="StudentNameLabel" runat="server" Text="Name"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="StudentNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ClassLabel" runat="server" Text="Class"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="ClassTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                        </div>
                                    </div>
                                </asp:Panel>
                                <asp:Panel ID="EmployeeSearchPanel" runat="server" Visible="false">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="EmployeeIdNoLabel" runat="server" Text="Id No" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="EmployeeIdNoTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                MaxLength="200" AutoPostBack="true" OnTextChanged="EmployeeIdNoTextBox_TextChanged">
                                            </asp:TextBox>
                                            <asp:ImageButton SkinID="FindImage" ToolTip="Employee Search" ID="EmployeeIdNoImageButton"
                                                runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="EmployeeNameLabel" runat="server" Text="Name"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="EmployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="DepartmentLabel" runat="server" Text="Department"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="DepartmentTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                        </div>
                                    </div>
                                </asp:Panel>



                                <div class="himssuHeader6WireBox ">
                                    <div id="FeeAllocationDetailDiv" class="col-md-12" runat="server" visible="false">
                                        <div class="himsBoxHeader card-head inner" id="GridViewPagerDiv" runat="server" visible="false">
                                            <div class="leftdiv">
                                            </div>
                                            <div class="himsBoxTitle">
                                                <div class="headerText ">
                                                    <header>
                                                        <asp:Label ID="GridViewLabel" Text="Available Fee List" runat="server" />
                                                    </header>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 pTop5 pb5">
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ApplyLabel" Text="Req Discount" runat="server"></asp:Label>
                                                </div>
                                                <asp:TextBox ID="RequestedDiscountTextBox" runat="server" ></asp:TextBox>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ExemptionTypeLabel" Text="Approved Discount" runat="server"></asp:Label>
                                                </div>
                                                <asp:TextBox ID="ApprovedDiscountTextBox" runat="server" ></asp:TextBox>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ButtonLabel" Text="" runat="server" Width=""></asp:Label>
                                                </div>
                                                <asp:Button ID="ApplyButton" runat="server" OnClick="ApplyButton_Click"
                                                    Text="Apply" SkinID="0" CssClass="btn btn-apply" />
                                            </div>
                                        </div>
                                        <div class="himsBoxContent  col-md-12 pTop5">
                                            <div id="Div5" runat="server" class="table-responsive" visible="false">
                                                <div id="GridViewMessageDiv" class="himsBoxContentMsg" runat="server" visible="False">
                                                </div>
                                                <asp:GridView ID="FeeAllocationGridView" runat="server"  AutoGenerateColumns="False"
                                                    EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames="FeeHeadId,FeeSetupId"
                                                    CssClass="table table-striped table-bordered table-hover" OnRowDataBound="FeeAllocationGridView_RowDataBound"
                                                    ShowFooter="true">
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="Fee" ItemStyle-Width="17%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="FeeNameLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("FeeName")%>'></asp:Label>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="FFeeNameLabel" ClientIDMode="Static" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Optional" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="3%"
                                                            ItemStyle-Wrap="true">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox  rt-chkbox-outline">
                                                                <asp:CheckBox ID="IsOptionalCheckBox" Checked='<%#Eval("IsOptional")%>' Enabled="false"
                                                                    runat="server" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Variable" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="3%"
                                                            ItemStyle-Wrap="true">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                 <label class="rt-chkbox  rt-chkbox-outline">
                                                                <asp:CheckBox ID="IsVariableCheckBox" Checked='<%#Eval("IsVariable")%>' Enabled="false"
                                                                    runat="server" />
                                                                        <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:TextBox ID="AmountTextBox" runat="server" ClientIDMode="Static" MaxLength="15"
                                                                    SkinID="CustomWidthTextBox" Width="70px" onKeypress="javascript:return MaskDecimal(event,12,2)"
                                                                    AutoPostBack="false" onkeyup="funcsum(this)"></asp:TextBox>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="AmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="Requested Discount Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:TextBox ID="DiscountAmountTextBox" runat="server" ClientIDMode="Static" MaxLength="15"
                                                                    SkinID="CustomWidthTextBox" Width="70px" OnTextChanged="DiscountAmountTextBox_TextChanged"
                                                                    onKeypress="javascript:return MaskDecimal(event,12,2)" AutoPostBack="true" onkeyup="funcsum(this)"></asp:TextBox>
                                                            </ItemTemplate>
                                                            <%--  <FooterTemplate>
                                                                            <asp:Label ID="DiscountAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>--%>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="RequestedRemark" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:TextBox ID="RequestedRemarkTextBox" runat="server" ClientIDMode="Static" MaxLength="200"
                                                                     SkinID="CustomWidthTextBox"></asp:TextBox>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="Pending Amount" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="PendingAmountLabel" ClientIDMode="Static" runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="FPendingAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="Approved Discount Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:TextBox ID="ApprovedDiscountAmountTextBox" runat="server" ClientIDMode="Static" MaxLength="15"
                                                                    SkinID="CustomWidthTextBox" Width="70px" OnTextChanged="ApprovedDiscountAmountTextBox_TextChanged"
                                                                    onKeypress="javascript:return MaskDecimal(event,12,2)" AutoPostBack="true" onkeyup="funcsum(this)"></asp:TextBox>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="ApprovedDiscountAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>





                                                        <asp:TemplateField HeaderText="ApprovedRemark" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:TextBox ID="ApprovedRemarkTextBox" runat="server" ClientIDMode="Static" MaxLength="200"
                                                                     SkinID="CustomWidthTextBox"></asp:TextBox>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <%--<asp:TemplateField HeaderText="Status" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="StatusLabel" runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>--%>
                                                    </Columns>
                                                    <PagerSettings Visible="False" />
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </div>
                                </div>



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