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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl"
    TagPrefix="Date" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl"
    TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl"
    TagPrefix="Common" %>
<%--<%@ Register Src="~/UserControls/Common/Alert/AlertDetailBoxControl.ascx" TagName="AlertControl"
    TagPrefix="Alert" %>--%>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="SMSHistorySearchUpdatePanel" runat="server">
        <ContentTemplate>
            <%--<Common:CommonSearchUserControl ID="CommonSearchControl" runat="server" Visible="false" />--%>
            <div id="divContentPage" class="divcontentpagemargin">
                <!-- ContentPlaceHolder Box Starts -->

                <div class="dashBoardLeftCont" valign="top">
                    <div class="himssuHeader3WireBox">
                        <%-- <div class="himsBoxHeader">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                                <asp:Label runat="server" ID="ScreenGroupNameLabel"></asp:Label>
                                            </div>
                                        </div>
                                    </div>--%>
                        <table width="0px" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="124"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="row whiteboxpaddingleft">
                    <%--<Alert:AlertControl ID="AlertUserControl" runat="server" Visible="true" />--%>
                    <div class="himssuHeader5WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="SearchHeaderPanel" runat="server" meta:resourcekey="SearchHeaderPanelResource1">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <%--<asp:Image ID="Image2" runat="server" class="fLeft" />--%>
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="SearchHeaderLabel" runat="server" Text="Search"></asp:Label>
                                        </header>
                                        <%--<cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="Server" TargetControlID="SearchDetailPanel"
                                                        ExpandControlID="Image2" CollapseControlID="Image2" TextLabelID="Label3" Collapsed="false"
                                                        ImageControlID="Image2" ExpandedImage="~/images/buttonCollapse.gif" CollapsedImage="~/images/buttonExpand.gif"
                                                        ExpandDirection="Vertical" />--%>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <asp:Panel ID="SearchDetailPanel" runat="server" meta:resourcekey="SearchDetailPanelResource1">
                            <div class="himsBoxContent card-body">
                                <div class="contentHolder">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="OrganizationLabel2" runat="server" Text="Organization"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="OrganizationDropDownList" SkinID="CustomWidthDropDownList"
                                                onmouseleave="showHideTooltip()" CssClass="form-control" onmouseenter="showHideTooltip()" AutoPostBack="true"
                                                OnSelectedIndexChanged="OrganizationDropDownList_OnSelectedIndexChanged">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="OSTypeLabel" Text="OSType" runat="server"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList ID="OSTypeDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="FromDateLabel" runat="server" Text="From Date"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="FromDatePicker" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ToDateLabel" runat="server" Text="To Date"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="ToDatePicker" runat="server" />
                                        </div>
                                    </div>

                                    <div class="col-md-12 bg-lghtgrey radiobtn">
                                        <div class="controlLabelWidth col-md-4">
                                            <asp:RadioButtonList ID="SourceTypeRadioButtonList" runat="server" RepeatDirection="Horizontal"
                                                OnSelectedIndexChanged="SourceTypeRadioButtonList_OnSelectedIndexChanged" AutoPostBack="true">
                                                <asp:ListItem Text="Student" Value="2003" Selected="True"></asp:ListItem>
                                                <asp:ListItem Text="Employee" Value="95"></asp:ListItem>
                                            </asp:RadioButtonList>
                                        </div>
                                    </div>

                                    <div class="cBoth">
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="OrganizationLabel" Text="Code" runat="server"></asp:Label>
                                        </div>
                                        <div class="">
                                            <asp:TextBox ID="CodeTextBox" runat="server"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="DepartmentLabel" Text="Department" runat="server"></asp:Label>
                                        </div>
                                        <div class="">
                                            <asp:DropDownList ID="DepartmentDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                onmouseenter="showHideTooltip()" AutoPostBack="True" SkinID="CustomWidthDropDownList"
                                                OnSelectedIndexChanged="DepartmentDropDownList_OnSelectedIndexChanged" CssClass="form-control">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div id="ClassDivision" runat="server" visible="False">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="ClassLabel" Text="Class" runat="server"></asp:Label>
                                            </div>
                                            <div class="">
                                                <asp:DropDownList ID="ClassDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" AutoPostBack="True" SkinID="CustomWidthDropDownList"
                                                    OnSelectedIndexChanged="ClassDropDownList_OnSelectedIndexChanged" CssClass="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="DivisionLabel" Text="Division" runat="server"></asp:Label>
                                            </div>
                                            <div class="">
                                                <asp:DropDownList ID="DivisionDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" AutoPostBack="True" SkinID="CustomWidthDropDownList"
                                                    OnSelectedIndexChanged="DivisionDropDownList_OnSelectedIndexChanged" CssClass="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="cBoth">
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="EventLabel" runat="server" Text="Event (Update Mobile App Data)" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="EventDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3" id="StdStatusDiv" runat="server" visible="false">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="StdStatusLabel" runat="server" Text="Student Status"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="StudentStatusDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3" id="EmpStatusDiv" runat="server" visible="false">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="EmpStatusLabel" runat="server" Text="Employee Status"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="EmpStatusDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="cBoth">
                                    </div>

                                    <div class="alignCenter pTop5">
                                        <asp:Button ID="SearchButton" runat="server" OnClick="SearchButton_Click"
                                            SkinID="0" CssClass="btn-search btn fas" Text="&#xf002; Search" />
                                        <asp:Button ID="ClearButton" runat="server" Text="&#xf0e2; Reset" CssClass="btn-reset btn fas" OnClick="ClearSearchControls_Click"
                                            meta:resourcekey="ClearButtonResource1" SkinID="0" />
                                        <asp:Button ID="ExportToExcelButton" Text="&#xf093; Export To Excel" CssClass="btn btn-examcommon fas" runat="Server" SkinID="0"
                                            OnClick="ExportToExcelButton_OnClick" />
                                        <asp:Button ID="NonRegisterExportButton" Text="&#xf093; Export Non Registered User" CssClass="btn btn-examcommon fas" runat="Server" SkinID="0"
                                            OnClick="NonRegisterExportButton_OnClick" />
                                        <asp:Button ID="SendNotificationButton" Text="&#xf1d8; Send Notification" CssClass="btn btn-send fas" runat="Server" SkinID="0"
                                            OnClick="SendNotificationButton_OnClick" />
                                        <asp:Button ID="DeleteButton" runat="server" Text="&#xf2ed; Delete" CssClass="btn-delete btn fas" SkinID="0"
                                            OnClick="DeleteButton_Click" />
                                    </div>

                                    <div class="spacer">
                                        <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/spacer.gif" meta:resourcekey="Image7Resource1" />
                                    </div>
                                    <div class="himssuHeader1WireBox col-md-12">
                                        <div id="SMSHistoryListGridDiv" runat="server">
                                            <div class="spacer">
                                                <asp:Image ID="Image6" runat="server" ImageUrl="~/Images/spacer.gif" meta:resourcekey="Image6Resource1" />
                                            </div>
                                            <div id="SMSHistoryListGridViewPagerDiv" runat="server">

                                                <div class="himsBoxTitle">
                                                    <%--   <div class="gridHeaderText fLeft">
                                                <asp:Label ID="Label1" Text="List" runat="server" Font-Bold="True" meta:resourcekey="GridViewLabelResource1"  ForeColor="White" />
                                            </div>--%>
                                                    <%--<div class="fRight">
                                                <uc1:GridViewPager ID="SMSHistoryListGridViewPager" ParentGridView="SMSHistoryListGridView"
                                                        runat="server" OnFirstRecordClick="SMSHistoryListGridViewPager_FirstRecordClick" OnLastRecordClick="SMSHistoryListGridViewPager_LastRecordClick"
                                                        OnNextRecordClick="SMSHistoryListGridViewPager_NextRecordClick" OnPrevRecordClick="SMSHistoryListGridViewPager_PrevRecordClick"
                                                        OnTextBoxValueChange="SMSHistoryListGridViewPager_TextBoxValueChange" />
                                            </div>--%>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent">
                                                <div id="Div4" runat="server" class="table-responsive">
                                                    <asp:GridView runat="server" ID="AppRegisteredUserListGridView" Width="100%" AutoGenerateColumns="False"
                                                        OnRowDataBound="AppRegisteredUserListGridView_RowDataBound" EmptyDataText="No records available for the seacrh criteria!" AllowPaging="false"
                                                        PageSize="10" ShowHeader="True" CssClass="table table-striped table-bordered table-hover"
                                                        meta:resourcekey="SMSHistoryListGridViewResource1" DataKeyNames="UserSourceId,UserSourceTypeId,UserId,OrgId,OsTypeId,DeviceToken,Date">
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%"
                                                                ItemStyle-Wrap="true">
                                                                <HeaderTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-single rt-chkbox-outline">
                                                                        <asp:CheckBox ID="HeaderSelectCheckBox" runat="server" onclick="SelectAll(this);" Enabled="true"
                                                                            Visible="true" />
                                                                        <span></span>
                                                                    </label>
                                                                </HeaderTemplate>
                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <ItemTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-single rt-chkbox-outline">
                                                                        <asp:CheckBox ID="SelectCheckBox" Visible="true" Enabled="true"
                                                                            runat="server" />
                                                                        <span></span>
                                                                    </label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="OrganizationName" HeaderText="Organization" ItemStyle-Width="20%"
                                                                HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:BoundField DataField="UserTypeName" HeaderText="User Type" ItemStyle-Width="5%"
                                                                HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:BoundField DataField="Code" HeaderText="Code" ItemStyle-Width="5%"
                                                                HeaderStyle-HorizontalAlign="Left" />
                                                            <%--<asp:BoundField DataField="Department" HeaderText="Department" ItemStyle-Width="10%"
                                                                HeaderStyle-HorizontalAlign="Left" />--%>
                                                            <asp:TemplateField HeaderText="Department" ItemStyle-Width="10%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="DepartmentLabel" runat="server" Text='<%#Eval("Department") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="Class" HeaderText="Class" ItemStyle-Width="10%"
                                                                HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:BoundField DataField="Name" HeaderText="Name" ItemStyle-Width="15%"
                                                                HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:BoundField DataField="Date" HeaderText="Register Date" ItemStyle-Width="10%"
                                                                HeaderStyle-HorizontalAlign="Left" DataFormatString="{0:dd/MM/yyyy}" />
                                                            <asp:BoundField DataField="OSType" HeaderText="OS Type" ItemStyle-Width="5%"
                                                                HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:TemplateField HeaderText="Device Token" ItemStyle-Width="5%" SortExpression="IsDeviceToken"
                                                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="ObsoleteLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsDeviceToken").ToString().ToUpper()=="TRUE"?"Yes":"No" %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="AppVersion" HeaderText="App Version" ItemStyle-Width="10%"
                                                                HeaderStyle-HorizontalAlign="Left" />
                                                        </Columns>
                                                        <PagerSettings Visible="False" />
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:Panel>
                        <div class="spacer">
                            <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/spacer.gif" meta:resourcekey="Image7Resource1" />
                        </div>
                    </div>
                </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>
    <script type="text/javascript">

        function SelectAll(e) {
            // var t = e.parentNode.parentNode.parentNode.parentNode;
            var t = e.closest('Table');
            for (i = 1; i < t.rows.length; i++) t.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = e.checked
        }
    </script>
</asp:Content>
