<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Communication_CircularList, App_Web_wph5lwvr" uiculture="auto" meta:resourcekey="PageResource1" 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" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="HREmployeeMasterSearchUpdatePanel" runat="server">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont" runat="server" id="ScreenGroupTableId" visible="true">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="114"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader1WireBox card card-box">
                        <div class="himsBoxHeader card-head" id="Div4" runat="server" visible="True">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText fLeft">
                                    <header>
                                        <i class="fas fa-list-ul"></i>
                                        <asp:Label ID="Label4" Text="Circular List" runat="server" />
                                    </header>
                                </div>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="SearchPanel" runat="Server">
                                <div class="contentHolder">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="NameLabel" runat="server" Text="Name"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="NameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop15 col-md-3 center">
                                        <asp:Label ID="ORLabel" runat="server" Text="OR" Visible="True" Font-Bold="true" Font-Size="Medium" ForeColor="Red"></asp:Label>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="FromDateLabel" runat="server" Text="From Date" Visible="True"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="FromDatePickerControl" Visible="True"
                                                runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ToDateLabel" runat="server" Text="To Date" Visible="True"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="True" ID="ToDatePickerControl" Visible="True"
                                                runat="server" />
                                        </div>
                                    </div>
                                </div>

                                <div class="alignCenter pTop5 col-md-12 center middle">
                                    <asp:Button ID="SearchButton" runat="server" Text="&#xf002; Search" OnClick="SearchButton_Click"
                                        SkinID="0" class="btn-search btn fas" />
                                    <asp:Button ID="ClearButton" runat="server" Text="&#xf0e2; Reset" OnClick="ClearSearch_Click" SkinID="0" class="btn-reset btn fas" />
                                </div>
                            </asp:Panel>

                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <div class="himssuHeader6WireBox col-md-12">
                                        <div class="himsBoxHeader card-head inner" id="CircularListGridViewPagerDiv" runat="server" visible="true">

                                            <div class="himsBoxTitle">
                                                <%-- <div class="gridHeaderText">
                                                                 <header>
                                                                      <asp:Label ID="Label2" runat="server" Text="List"></asp:Label>
                                                                 </header>
                                                                </div>--%>

                                                <div class="fRight">
                                                    <uc1:GridViewPager ID="CircularListGridViewPager" ParentGridView="CircularListGridView"
                                                        runat="server" OnFirstRecordClick="CircularListGridViewPager_FirstRecordClick" OnLastRecordClick="CircularListGridViewPager_LastRecordClick"
                                                        OnNextRecordClick="CircularListGridViewPager_NextRecordClick" OnPrevRecordClick="CircularListGridViewPager_PrevRecordClick"
                                                        OnTextBoxValueChange="CircularListGridViewPager_TextBoxValueChange" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="himsBoxContent card-body table-responsive">
                                            <asp:GridView runat="server" ID="CircularListGridView" AutoGenerateColumns="False"
                                                EmptyDataText="No records available for the seacrh criteria!" OnRowDataBound="CircularListGridView_RowDataBound"
                                                AllowPaging="True" PageSize="10" DataKeyNames="CircularId"
                                                ShowHeader="true" meta:resourcekey="CircularListGridViewResource1" CssClass="table table-striped table-bordered table-hover">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="User Id" Visible="false" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="UserIdLabel" runat="server" Text='<%# Bind("UserId") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="Title" HeaderText="Name" ItemStyle-Width="35%" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" HeaderText="Remark">
                                                        <ItemTemplate>
                                                            <asp:Label ID="RemarkLabel" runat="server" Text='<%# Bind("Remark") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="StartDate" HeaderText="Start Date" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="ViewLinkButton" runat="server" CommandName="Select" OnClick="ViewLinkButton_Click"
                                                                Text="View" CausesValidation="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                    </div>

                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                </div>
                </tr>
                    </table>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--  <script data-main="../../JavaScript/rjs/encrypt/assign-organization-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/assign-organization")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>

    <%--mantis: 40910--%>
    <script type="text/javascript">
        function RedirectToMigration(MyCommunicationUrl) {
            var newTab = window.open(MyCommunicationUrl, '_blank');
            window.location.href = '../../../Pages/BaseFramework/MyDashBoard.aspx';
        }
    </script>
</asp:Content>
