<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_FeeManagement_ApprovalRequest, App_Web_5o01wavc" 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="Date" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/StudentSearch/StudentSearch.ascx" TagName="StudentSearch" TagPrefix="Std" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <link href="../../../App_Themes/responsiv-popup.css" rel="stylesheet" />
    <asp:UpdatePanel ID="IncidentLogUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <Std:StudentSearch ID="StudentSearch" Visible="false" runat="server" />
            <uc1:CommonSearchUserControl ID="CommonSearchControl" Visible="false" runat="server" />
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">
                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="247"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>

                <div class="row whiteboxpaddingleft">
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </div>
                                    <div class="fRight mt-27">
                                        <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButtonID_Click" SkinID="0"
                                            CssClass="btn btn-add fas" Text="&#xf067; Add" />
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body" style="padding-bottom: 0px">
                            <asp:Panel ID="Panel2" runat="Server">
                                <div class="contentHolder">
                                    <asp:Panel ID="Panel3" runat="Server">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchFromDateLabel" runat="server" Text="From Date"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="SearchFromDatePicker" runat="server" />
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchToDateLabel" runat="server" Text="To Date"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="SearchToDatePicker" runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchWorkflowFunctionalityLabel" Text="Workflow Functionality" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="SearchWorkflowFunctionalityDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchtatusLabel" Text="Status" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="SearchtatusDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="alignCenter col-md-12 pTop15">
                                            <asp:Button ID="SearchButton" runat="Server" OnClick="SearchButton_Click"
                                                SkinID="0" CssClass="btn-search btn fas" Text="&#xf002; Search" />
                                        </div>
                                    </asp:Panel>
                                    <div id="Div2" class="himssuHeader7WireBox col-md-12" runat="server">
                                        <div id="NewsDetailDiv" visible="false" runat="server">
                                            <div class="himsBoxHeader" id="NewsDiv" visible="false" runat="server">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle" style="width: 99%">
                                                    <div align="right" class="fRight" style="margin-top: 0px;">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div id="Div5" runat="server" visible="false">
                                                            <div id="Div3" runat="server" class="table-responsive">
                                                                <asp:GridView ID="ApprovalRequestGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                    OnRowDataBound="ApprovalRequestGridView_RowDataBound" OnPageIndexChanging="ApprovalRequestGridView_PageIndexChanging" CssClass="table table-striped table-bordered table-hover"
                                                                    SkinID="" ShowHeader="true" PagerSettings-Visible="false" DataKeyNames="ApprovalRequestId,Code,statusId,ParticipantSourceId" EmptyDataText="No records found">
                                                                    <Columns>

                                                                        <asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderText="Code"
                                                                            HeaderStyle-HorizontalAlign="Center">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="Select" OnClick="LinkButton_Click"
                                                                                    Text='<%#Bind("Code")%>' CausesValidation="false"></asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>


                                                                        <asp:TemplateField HeaderText="WorkFlow Name" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="WorkFlowNameLabel" runat="server" CssClass="boxEllips"
                                                                                    Text='<%#Bind("WorkFlowName")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>


                                                                        <asp:TemplateField HeaderText="Name" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="NameLabel" runat="server" CssClass="boxEllips"
                                                                                    Text='<%#Bind("Name")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Created Date" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="CreatedDateTimeLabel" runat="server" CssClass="boxEllips"
                                                                                    Text='<%#Bind("CreatedDateTime", "{0:dd/MM/yyyy}")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderText="Status"
                                                                            HeaderStyle-HorizontalAlign="Center">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="StatusLinkButton" runat="server" CommandName="Select" OnClick="StatusLinkButton_Click"
                                                                                    Text='<%#Bind("Status")%>' CausesValidation="false" data-target="#myModal"></asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                        <div id="myModal" class="modal" role="dialog" runat="server">
                                                            <div class="modal-dialog">

                                                                <!-- Modal content-->
                                                                <div class="modal-content">
                                                                    <div class="modal-header">
                                                                        <asp:Button type="button" id="close" class="close" data-dismiss="modal" runat="server" SkinID="0" OnClick="close_Click" CssClass="btn btn-close modal-close fas pull-right" Text="&#xf00d;"/>
                                                                        <h4 class="modal-title">Status</h4>
                                                                    </div>
                                                                    <div class="modal-body">
                                                                        <asp:GridView ID="StatusGridView" runat="server" CssClass="table table-striped table-bordered table-hover"  AutoGenerateColumns="False" EmptyDataText="No records found">
                                                                            <Columns>
                                                                                <asp:TemplateField HeaderText="DepartmentTitle" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="DepartmentTitleLabel" runat="server" CssClass="boxEllips"
                                                                                            Text='<%#Bind("DepartmentTitle")%>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Name" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="NameLabel" runat="server" CssClass="boxEllips"
                                                                                            Text='<%#Bind("Name")%>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="CreatedDateTime" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="CreatedDateTimeLabel" runat="server" CssClass="boxEllips"
                                                                                            Text='<%#Bind("CreatedDateTime", "{0:dd/MM/yyyy}")%>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Status" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="StatusLabel" runat="server" CssClass="boxEllips"
                                                                                            Text='<%#Bind("Status")%>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                            </Columns>
                                                                        </asp:GridView>
                                                                    </div>
                                                                </div>

                                                            </div>
                                                        </div>
                                                        </div>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                    <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server" visible="false">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv"></div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-list-ul"></i>
                                        <asp:Label ID="Label1" runat="server" Text="Approval Request"></asp:Label>
                                    </header>
                                </div>
                            </div>
                            <div class="fRight mt-27 pagination display-flex">


                                <div id="NumberOfRecordDiv" class="display-flex" runat="server" visible="true">
                                    <asp:LinkButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                        runat="server" CommandName="Page" CommandArgument="First"
                                        OnClick="FirstRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                    <i class="fa fa-fast-backward"></i>
                                    </asp:LinkButton>
                                    <asp:LinkButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                        runat="server" CommandName="Page" CommandArgument="Prev"
                                        OnClick="PreviousImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                    <i class="fa fa-play fa-rotate-180"></i>

                                    </asp:LinkButton>

                                    <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                    &nbsp;<asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                    &nbsp; 
                                    <asp:Label ID="ofLabel" Text="of" runat="server" />
                                    &nbsp; 
                                    <asp:Label ID="TotalRecord" runat="server" />
                                    &nbsp;
                                                <asp:LinkButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButtom"
                                                    runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Next"
                                                    OnClick="NextImageButton_Click">
                                                     <i class="fa fa-play"></i>
                                                </asp:LinkButton>

                                    <asp:LinkButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                        runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Last"
                                        OnClick="LastRecordImageButton_Click">
                                                      <i class="fa fa-fast-forward"></i>
                                    </asp:LinkButton>
                                    &nbsp;  &nbsp; &nbsp;
                                </div>

                                <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0" CssClass="btn btn-back fas" Text="&#xf30a;  back" />

                            </div>
                        </div>
                        <div class="card-body" style="padding-bottom: 0px">
                            <div class="contentHolder">
                                <div class="pTop5">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="WorkflowFunctionalityLable" Text="Workflow Functionality" runat="server" ></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList ID="WorkflowFunctionalityDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control">
                                            </asp:DropDownList>
                                            <asp:HiddenField ID="IdHiddenField" runat="server" />
                                            <asp:HiddenField ID="MaxRowHiddenField" runat="server" />
                                            <asp:HiddenField ID="WFMIdHiddenField" runat="server" />
                                             <asp:HiddenField ID="StatusIdHiddenField" runat="server" />
                                            <asp:HiddenField ID="ParticipantSourceIdHiddenField" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SourceTypeLabel" runat="server" Text="Source Type" ></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="SourceTypeDropDownList" SkinID="CustomWidthDropDownList"
                                                class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                AutoPostBack="true" OnSelectedIndexChanged="SourceTypeDropDownList_OnSelectedIndexChanged">
                                                <asp:ListItem Text="-Select-" Value="-1" Selected="True"></asp:ListItem>
                                                <asp:ListItem Text="Student" Value="2001" ></asp:ListItem>
                                                <asp:ListItem Text="Employee" Value="95"></asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:HiddenField ID="DetailHiddenField" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SourceCodeLabel" runat="server" Text="ID No"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5  display-flex">
                                            <asp:TextBox ID="SourceCodeTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                MaxLength="200" AutoPostBack="true" OnTextChanged="SourceCodeTextBox_TextChanged"> 
                                            </asp:TextBox>
                                            <asp:ImageButton SkinID="FindImage" ToolTip="ID Search" ID="SourceCodeImageButton"
                                                runat="server" ImageUrl="../../Images/icons/icon_find.gif" />
                                            <asp:HiddenField ID="SourceIdHiddenField" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox11 pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="RemarkLabel" runat="server" Text="Remark" meta:resourcekey="CodeSearchLabelResource1"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="RemarkTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="MultiLineTextBox" Width="300px" TextMode="MultiLine" Height="40px" runat="server"
                                                MaxLength="200"> </asp:TextBox>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script>
        function close()
        {
           // alert(1);
             document.getElementById("myModal").style.display = 'none';
        }
    </script>
    <%--  <script data-main="../../JavaScript/rjs/encrypt/charge-receipt-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/charge-receipt")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
