<%@ page language="C#" async="true" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Components_Alert_SMSToAll, App_Web_0mcwcb34" 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/Common/Alert/AlertDetailBoxControl.ascx" TagName="AlertControl" TagPrefix="Alert" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="IncidentLogUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <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="124"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <Alert:AlertControl ID="AlertUserControl" runat="server" Visible="true" />
                    <div class="himssuHeader1WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-comment"></i>
                                        <asp:Label ID="Label1" runat="server" Text="Send Custom Alert"></asp:Label>
                                    </header>
                                </div>
                            </div>

                            <div class="fRight mt-27 pagination display-flex">
                                <asp:Button ID="BackButton" runat="Server" SkinID="0" CssClass="btn btn-back fas" Text="&#xf30a;  back" OnClick="BackButton_Click" Visible="false" />
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">

                                    <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                        <div class="outerBox pTop5 col-md-12">
                                            <div class="controlLabelWidth">
                                                <%--<asp:CheckBoxList ID="SourceTypeCheckBoxList" runat="server" RepeatDirection="Horizontal" CssClass="col-md-9"
                                                    OnSelectedIndexChanged="SourceTypeCheckBoxList_OnSelectedIndexChanged" AutoPostBack="true">
                                                    <asp:ListItem Text="SMS" Value="1" Selected="True"></asp:ListItem>
                                                    <asp:ListItem Text="Email" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="Mobile App" Value="3"></asp:ListItem>
                                                    <asp:ListItem Text="Voice SMS" Value="4"></asp:ListItem>
                                                    <asp:ListItem Text="WhatsApp" Value="5"></asp:ListItem>
                                                </asp:CheckBoxList>--%>
                                                <asp:RadioButtonList ID="SourceTypeRadioButtonList" runat="server" RepeatDirection="Horizontal"
                                                    CssClass="col-md-9 ml-2" OnSelectedIndexChanged="SourceTypeCheckBoxList_OnSelectedIndexChanged"
                                                    AutoPostBack="true">
                                                    <asp:ListItem Text="SMS" Value="1" Selected="True"></asp:ListItem>
                                                    <asp:ListItem Text="Email" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="Mobile App" Value="3"></asp:ListItem>
                                                    <asp:ListItem Text="Voice SMS" Value="4"></asp:ListItem>
                                                    <asp:ListItem Text="WhatsApp" Value="5"></asp:ListItem>
                                                </asp:RadioButtonList>
                                            </div>
                                        </div>
                                        <div id="divVoiceSMS" runat="server" visible="false">
                                            <div class="outerBox pTop5 col-md-3">

                                                <asp:Label ID="VoiceSMSCreditLabel" runat="server" Text="Voice SMS Credit : " Font-Bold="true"></asp:Label>
                                                <asp:Label ID="VoiceSMSCreditCount" runat="server" Text=""></asp:Label>

                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="Label3" runat="server" Text="Voice Message WAV File Name" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="VoiceMsgFileNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        SkinID="CustomWidthTextBox" runat="server" MaxLength="50"> </asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-4">

                                                <div class="fLeft pRight5">
                                                    <asp:Button ID="SendVoiceSMSButton" runat="server" Text="&#xf1d8; Send Voice SMS" CssClass=" btn btn-send fas" SkinID="0" OnClick="SendVoiceSMSButton_Click" />


                                                </div>
                                            </div>

                                        </div>
                                        <div class="outerBox pTop15 col-md-12">
                                            <div class="controlLabelWidth">
                                                <asp:CheckBoxList ID="ContactCheckBoxList" runat="server" CssClass="col-md-12" RepeatDirection="Horizontal">
                                                    <asp:ListItem Text="Primary" Value="1" Selected="True"></asp:ListItem>
                                                    <asp:ListItem Text="Father" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="Mother" Value="3"></asp:ListItem>
                                                    <asp:ListItem Text="Student" Value="4"></asp:ListItem>
                                                </asp:CheckBoxList>
                                            </div>
                                        </div>
                                        <div class="cBoth">
                                        </div>
                                        <div class="outerBox pTop5 pb5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="OrganizationLabel" Text="Organization" runat="server"></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"></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="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label2" runat="server" Text="Custom Event"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="CustomEventDropDownList" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control display-block" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    AutoPostBack="true" OnSelectedIndexChanged="CustomEventDropDownList_OnSelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="cBoth">
                                        </div>
                                        <div class="outerBox pTop5 col-md-3" id="EmailCCDiv" runat="server"
                                            visible="false">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="EmailCCLabel" runat="server" Text="Email CC"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="EmailCCTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthTextBox" Width="800px" runat="server" MaxLength="1000"> </asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="cBoth"></div>
                                        <div class="outerBox pTop5 col-md-3" id="EmailBCCDiv" runat="server"
                                            visible="false">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="EmailBCCLabel" runat="server" Text="Email BCC"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="EmailBCCTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthTextBox" Width="800px" runat="server" MaxLength="1000"> </asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="cBoth"></div>
                                        <div class="outerBox pTop5 col-md-3" id="SubjectDiv" runat="server"
                                            visible="false">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SubjectLabel" runat="server" Text="Subject"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="SubjectTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthTextBox" Width="800px" runat="server" MaxLength="1000"> </asp:TextBox>
                                            </div>
                                        </div>


                                        <div class="text-center col-md-12 pTop5" id="AttachementDiv" runat="server" visible="false">
                                            <a href="javascript:;" onclick="OpenFileUpload();" class="btn btn-browser">
                                                <i class="fas fa-upload"></i>Browse</a>
                                            <asp:FileUpload ID="flUpload" runat="server" AllowMultiple="true" onChange="readURL(this);" ClientIDMode="Static" Style="display: none;" />
                                            <asp:Button ID="RefreshButton" runat="server" Text="&#xf2f9; Refresh" OnClick="RefreshButton_OnClick"
                                                SkinID="0" CssClass="btn btn-refresh fas" />
                                            <br>
                                                <br></br>
                                                <asp:Label ID="lblUploadSuccessMsg" runat="server"></asp:Label>
                                            </br>
                                            <asp:HiddenField ID="GUIDHiddenField" runat="server" />
                                            <div id="GridViewDiv" runat="server" visible="false">
                                                <asp:GridView ID="FileGridView" runat="server" CssClass="table table-striped table-bordered table-hover"
                                                    AutoGenerateColumns="False" ShowHeader="true" PagerSettings-Visible="false" EmptyDataText="No Files Uploaded"
                                                    DataKeyNames="UniqueText">
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="File Name" ItemStyle-Width="90%" HeaderStyle-HorizontalAlign="Left"
                                                            ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <asp:HyperLink ID="FileNameHyperLink" runat="server" Text='<%# Eval("FileName") %>'
                                                                    NavigateUrl='<%# Eval("FilePath") %>' Target="_blank"></asp:HyperLink>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Delete" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Center"
                                                            ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="DeleteImageButton" runat="server" OnClick="DeleteImageButton_OnClick"
                                                                    ImageUrl="~/Images/icons/icon_delete.gif" ToolTip="Delete" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </div>

                                            <%--<div class="col-md-14">
                                                <div runat="server" id="Attchmentdv" class="alert   alert-info">
                                                    <div style="color: #FF7F7F">
                                                        &nbsp; * You can send a maximum of 200 to 250 bulk WhatsApp messages at a time, otherwise, your what's app account will be blocked from the WhatsApp side.
                                                    </div>
                                                </div>
                                            </div>--%>
                                        </div>




                                        <div class="col-md-12">
                                            <div class="alert   alert-info">
                                                <%--<div runat="server" id="Div2">
                                                    <div style="color: #FF7F7F">
                                                        &nbsp; * You can send a maximum of 200 to 250 bulk WhatsApp messages at a time, otherwise, your what's app account will be blocked from the WhatsApp side.
                                                    </div>
                                                </div>--%>
                                                <div style="color: #FF7F7F">
                                                    </b>&nbsp; * Simple SMS is upto 158 and Multi Language SMS is up to 70 characters
                                                        in length.
                                                <br />
                                                    &nbsp;
                                               * According to government regulations(TRAI), if your DLT process with SMS template registration has not been completed by now, 
                                                then you will not get proper logs in alerts module.
                                                    <br />
                                                    &nbsp;
                                               * Only PDF,JPG,DOC,XLS file extentions supported for WhatsApp.
                                                    <br />
                                                    <%--//By Krunal, Add For Mantis: 0038346--%>
                                                    <div runat="server" id="Attchmentdv" visible="false" style="color: #FF7F7F">
                                                        &nbsp; * You can send a maximum of 200 to 250 bulk WhatsApp messages at a time, otherwise, your what's app account will be blocked from the WhatsApp side.
                                                        <br />
                                                        &nbsp;
                                                       * We have kept 10-15 seconds delay time between every two message.
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="outerBox col-md-4 pTop5" id="SupportSmsDiv" runat="server">
                                            <div class="fLeft pRight5">
                                                <asp:CheckBox ID="SupportSMSInOtherLanguageCheckBox" runat="server" Text="Support SMS in other language" />
                                            </div>
                                        </div>
                                        <div class="outerBox col-md-8 pTop5">
                                            <div class="fLeft pRight5">
                                                <asp:CheckBox ID="UniqueContactNumberCheckBox" runat="server" Text="Unique Contact Number" Visible="false" />
                                            </div>
                                        </div>
                                        <div class="cBoth">
                                        </div>
                                        <div class="outerBox pTop5 col-md-3" style="width: 1000px; height: 110px;">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="MessageLabel" runat="server" Text="Message" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="MessageTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    Height="50px" SkinID="MultilineTextBox" Width="800px" runat="server" MaxLength="1000"
                                                    TextMode="MultiLine" OnTextChanged="MessageTextBox_TextChanged" AutoPostBack="true"></asp:TextBox>
                                                <div id="CharCountDiv" runat="server">
                                                    <asp:Label ID="ForCharLabel" runat="server" Text="Number Of Character :"></asp:Label>
                                                    <asp:Label ID="NumberOfCharLabel" runat="server" Font-Bold="true"></asp:Label>
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:Label ID="ForMessageLabel" runat="server" Text="Number Of Message :"></asp:Label>
                                                    <asp:Label ID="NumberOfMessageLabel" runat="server" Font-Bold="true"></asp:Label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="TemplateIdLabel" runat="server" Text="Template Id"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="SMSTemplateIDTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    runat="server" SkinID="CustomWidthTextbox"></asp:TextBox>
                                            </div>
                                        </div>
                                       <%-- Mantis Id : 	0038790--%>
                                         <div class="outerBox pTop5 col-md-3" runat="server" id="TemplateNameDiv" visible="false">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="TemplateNameLabel" runat="server" Text="WhatsApp Template Name"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="TemplateNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    runat="server" SkinID="CustomWidthTextbox"></asp:TextBox>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                    <asp:Panel ID="Panel2" runat="Server">
                                        <div class="contentHolder">
                                            <div class="pTop5 col-md-12 card-head ">
                                                <div class="fLeft pRight5 headerText">
                                                    <header>
                                                        <asp:CheckBox ID="DivisionCheckBox" runat="server" Text="Classwise / Divisionwise / Studentwise / Departmentwise Employee"
                                                            AutoPostBack="true" OnCheckedChanged="DivisionCheckBox_CheckedChanged" />
                                                    </header>
                                                </div>
                                            </div>

                                            <div id="DivisionDiv" class="pTop15 col-md-12" runat="server" visible="false">
                                                <div class="col-md-6">
                                                    <div class="outerBox pTop5 col-md-6">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="ClassLabel" runat="server" Text="Class"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList"
                                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                AutoPostBack="true" OnSelectedIndexChanged="ClassDropDownList_OnSelectedIndexChanged">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-6">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="DivisionLabel" runat="server" Text="Division"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList runat="server" ID="DivisionDropDownList" SkinID="CustomWidthDropDownList"
                                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                AutoPostBack="true" OnSelectedIndexChanged="DivisionDropDownList_OnSelectedIndexChanged">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>

                                                    <div id="Div1" class="himssuHeader6WireBox col-md-12 gridviewfont" runat="server"
                                                        visible="false">
                                                        <div class="himsBoxHeader card-head inner" id="GridViewPagerDiv" runat="server" visible="True">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle">
                                                                <div class="headerText">
                                                                    <header>
                                                                        <asp:Label ID="GridViewLabel" Text="Student List" runat="server" />
                                                                    </header>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="himsBoxContent table-responsive">
                                                            <asp:GridView ID="AlertGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                EmptyDataText="No Records Found !!" CssClass="table table-striped table-bordered  table-hover"
                                                                AllowPaging="false" ShowHeader="true" DataKeyNames="Id">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center">
                                                                        <HeaderTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="HeaderSelectCheckBox" onclick="CheckAll(this);" runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </HeaderTemplate>
                                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                        <ItemTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="SelectCheckBox" runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="RollNo" HeaderText="Roll No" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                    <asp:BoundField DataField="Title" HeaderText="Name" ItemStyle-Width="80%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-6">
                                                    <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:DropDownList runat="server" ID="DepartmentDropDownList" SkinID="CustomWidthDropDownList"
                                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                AutoPostBack="true" OnSelectedIndexChanged="DepartmentDropDownList_OnSelectedIndexChanged">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="SourceTypeLabel" Text="Source Type" runat="server"></asp:Label>
                                                        </div>
                                                        <div class="">
                                                            <asp:DropDownList ID="SourceTypeDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList"
                                                                CssClass="form-control" OnSelectedIndexChanged="SourceTypeDropDownList_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <div id="EmployeeHouseDiv" runat="server" visible="False" style="overflow-y: auto;">
                                                        <div class="outerBox pTop5" style="height: auto; max-height: 80px;">
                                                            <span class="pLeft9">
                                                                <asp:CheckBox ID="HouseCheckBox" runat="server" AutoPostBack="True" Text="Select All House" OnCheckedChanged="HouseCheckBox_CheckedChanged" />
                                                            </span>

                                                            <asp:CheckBoxList ID="HouseCheckBoxList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="HouseCheckBoxList_CheckedChanged"></asp:CheckBoxList>

                                                        </div>
                                                    </div>
                                                    <div id="EmployeeClubDiv" runat="server" visible="False" style="overflow-y: auto;">
                                                        <div class="outerBox11 pTop5" style="height: auto; max-height: 80px;">
                                                            <span class="pLeft9">
                                                                <asp:CheckBox ID="ClubCheckBox" runat="server" AutoPostBack="True" Text="Select All Club" OnCheckedChanged="EmployeeClubCheckBox_CheckedChanged" />
                                                            </span>
                                                            <asp:CheckBoxList ID="EmployeeClubCheckBoxList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="EmployeeClubCheckBoxList_CheckedChanged"></asp:CheckBoxList>
                                                        </div>
                                                    </div>
                                                    <div id="EmployeeCommitteeDiv" runat="server" visible="False" style="overflow-y: auto;">
                                                        <div class="outerBox pTop5" style="height: auto; max-height: 80px;">
                                                            <span class="pLeft9">
                                                                <asp:CheckBox ID="CommitteeCheckBox" runat="server" AutoPostBack="True" Text="Select All Committee" OnCheckedChanged="CommitteeCheckBox_CheckedChanged" />
                                                            </span>
                                                            <asp:CheckBoxList ID="CommitteeCheckBoxList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="CommitteeCheckBoxList_CheckedChanged"></asp:CheckBoxList>
                                                        </div>
                                                    </div>
                                                    <div class="cBoth"></div>
                                                    <br />
                                                    <br />
                                                    <div id="Div11" class="himssuHeader6WireBox col-md-12 gridviewfont" runat="server"
                                                        visible="false">
                                                        <div class="himsBoxHeader card-head inner" id="GridViewPagerDiv11" runat="server" visible="True">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle">
                                                                <div class="headerText">
                                                                    <header>
                                                                        <asp:Label ID="GridViewLabel11" Text="Employee List" runat="server" />
                                                                    </header>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="himsBoxContent">
                                                            <asp:GridView ID="AlertGridView11" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                EmptyDataText="No Records Found !!" CssClass="table table-striped table-bordered table-hover"
                                                                AllowPaging="false" ShowHeader="true" DataKeyNames="Id">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center">
                                                                        <HeaderTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="HeaderSelectCheckBox" onclick="CheckAll(this);" runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </HeaderTemplate>
                                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                        <ItemTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="SelectCheckBox" runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="Title" HeaderText="Name" ItemStyle-Width="95%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>

                                            <div class="pTop15 col-md-12 card-head ">
                                                <div class="fLeft pRight5 headerText">
                                                    <header>
                                                        <asp:CheckBox ID="RollNoCheckBox" runat="server" Text="RollNowise" AutoPostBack="true"
                                                            OnCheckedChanged="RollNoCheckBox_CheckedChanged" />
                                                    </header>
                                                </div>
                                            </div>

                                            <div id="RollNoDiv" runat="server" visible="false">
                                                <div class="outerBox pTop5 col-md-12">
                                                    <div class="controlLabelWidth alert alert-info">
                                                        <i class="material-icons">info</i>
                                                        <asp:Label ID="RollNoNoteLabel" runat="server" Text="<B> Note : </B> Add Roll No with . Dot seperation (Eg. 2.5.10) OR , Comma seperation (Eg. 2,5,10)"></asp:Label>
                                                    </div>
                                                </div>

                                                <div class="col-md-12">
                                                    <span class="pull-right display-flex">
                                                        <asp:TextBox ID="ApplyAllTextBox" runat="server" SkinID="CustomWidthTextBox"></asp:TextBox>
                                                        &nbsp; 
                                                        <asp:Button ID="ApplyAllButton" runat="server" Style="top: 0px; height: 28px" CssClass="btn btn-apply" OnClick="ApplyAllButton_Click"
                                                            Text="Apply All" SkinID="0" />
                                                    </span>
                                                </div>

                                                <div class="cBoth">
                                                </div>
                                                <div id="GridViewRollNoDiv" class="himssuHeader7WireBox col-md-12 gridviewfont"
                                                    runat="server">
                                                    <div class="himsBoxContent table-responsive">
                                                        <asp:GridView ID="StudentListGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames="DivisionId"
                                                            CssClass="table table-striped table-bordered table-hover" OnRowDataBound="StudentListGridView_RowDataBound">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="Class" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label runat="server" ID="ClassDivisionLabel"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Roll No" ItemStyle-Width="60%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox runat="server" ID="RollNoTextBox" SkinID="CustomWidthTextBox" Width="250px"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="outerBox pTop15 col-md-12 card-head ">
                                                <div class="fLeft pRight5 headerText">
                                                    <header>
                                                        <asp:CheckBox ID="CodeCheckBox" runat="server" Text="IdNowise" AutoPostBack="true"
                                                            OnCheckedChanged="CodeCheckBox_CheckedChanged" />
                                                    </header>
                                                </div>
                                            </div>

                                            <div id="CodeDiv" runat="server" visible="false" class="pb15">

                                                <div class="outerBox11 col-md-12">
                                                    <br />
                                                    <div class="cboth"></div>
                                                    <div class="controlLabelWidth alert alert-info pTop5 ">
                                                        <asp:Label ID="CodeLabel" runat="server" Text="Ids No"></asp:Label>
                                                        <i class="material-icons">info</i>
                                                        <asp:Label ID="CodeNoteLabel" runat="server" Text=" - <B> Note : </B> Add Roll No with . Dot seperation (Eg. 2.5.10) OR , Comma seperation (Eg. 2,5,10)"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5 pTop5">
                                                        <asp:TextBox ID="CodeTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            Height="50px" SkinID="0" Width="800px" runat="server" TextMode="MultiLine"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="outerBox pTop5 col-md-12  card-head">

                                                <div class="fLeft pRight5 headerText">
                                                    <header>
                                                        <asp:CheckBox ID="AllCheckBox" runat="server" Text="All" AutoPostBack="true" OnCheckedChanged="AllCheckBox_CheckedChanged" />
                                                    </header>
                                                </div>
                                            </div>

                                            <div id="AllDiv" runat="server" visible="false">
                                                <div class="outerBox col-md-12">
                                                    <br />
                                                    <div class="cboth"></div>
                                                    <div class="alert alert-info pTop5 ">
                                                        <i class="material-icons">info</i>
                                                        <asp:Label ID="NoteLabel1" runat="server" Text="Send SMS Only Current Org Group and Active Batch."></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-6">
                                                    <div class="fLeft pRight5">
                                                        <asp:CheckBox ID="StudentCheckBox" runat="server" Text="All Student in Select Organization" />
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-6">
                                                    <div class="fLeft pRight5">
                                                        <asp:CheckBox ID="EmployeeCheckBox" runat="server" Text=" All Employee in Select Organization" />
                                                    </div>
                                                </div>

                                                <div class="outerBox col-md-5">
                                                    <div class="fLeft pRight5">
                                                        <asp:CheckBox ID="OrganizationCheckBox" Text="Select All Organization" runat="server"
                                                            AutoPostBack="True" OnCheckedChanged="OrganizationCheckBox_CheckedChanged" />
                                                    </div>
                                                    <div class="fLeft pRight5 chck-dropdown-onclick bg-lghtgrey outerBox11 col-md-12 overflow-x-hidden padd-0">
                                                        <asp:CheckBoxList ID="OrganizationCheckBoxList" runat="server">
                                                        </asp:CheckBoxList>
                                                    </div>
                                                </div>
                                                <asp:Label ID="TimerLabel" runat="server" Visible="false" Text=""></asp:Label>
                                            </div>

                                        </div>
                                    </asp:Panel>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                </div>

            </div>

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

    <script src='<%=ResolveUrl("../../../JavaScript/rjs/lib/jquery.js")%>'></script>
    <script src='<%=ResolveUrl("../../../JavaScript/rjs/lib/jquery-1.8.1.min.js")%>'></script>
    <script src='<%=ResolveUrl("../../../JavaScript/rjs/lib/ajaxfileupload.js")%>'></script>
    <script src='<%=ResolveUrl("../../../JavaScript/rjs/lib/jquery-ui.min.js")%>'></script>



    <script type="text/javascript">
        var reader = new FileReader();
        if (fparams() == "true") {
            document.getElementById("flUpload").multiple = true;
            var x = document.getElementById("flUpload").multiple;
            //alert("You can send a maximum of 200 to 250 bulk WhatsApp messages at a time, otherwise, your what's app account will be blocked from the WhatsApp side.");
        }

        function fparams() {
            var query = window.location.search.substring(1);
            var vars = query.split("&");
            for (var i = 0; i < vars.length; i++) {
                var pair = vars[i].split("=");
                return pair[1];
            }
        }
        reader.onload = function (e) {
        }
        function readURL(input) {
            if (input.files && input.files[0]) {
                reader.readAsDataURL(input.files[0]);
                ajaxFileUpload();
            }
        }
        function OpenFileUpload() {
            $('#flUpload').click();

        }


        function LoadingMessage(msg1, msg2) {
            $('#dvTestLoadingmsg').show();
            $('#spn1msg').html(msg1);
            $('#spn2msg').html(msg2);
            $('.hls-bg').show();
        }
        function CloseLoadingpopup() {
            $('#dvTestLoadingmsg').hide();
            $('.hls-bg').hide();
        }
        function ajaxFileUpload() {
            //if (ValidateImageDetails()) {
            LoadingMessage('Uploading', '<b>Please Wait</b>');
            $("#loading").ajaxStart(function () {
                $(this).show();
            }).ajaxComplete(function () {
                $(this).hide();
            });
            $.ajaxFileUpload({
                url: '../../../UserControls/MultiFileUpload/common-file-upload.ashx',
                secureuri: false,
                fileElementId: 'flUpload',
                dataType: 'text',
                contentType: "application/json; charset=utf-8",
                data: { name: 'logan', id: 'id', hdn: '1' },
                success: function (response, status) {
                    if (response == "-007") {
                        alert('Cannot upload file as the used space exceeds allocated space')
                        return
                    }
                    if (response == "-008") {
                        alert('Invalid Extention')
                        return
                    }
                    if (response == "-009") {
                        alert('Cannot include / or .. in a filename')
                        return;
                    }
                    /*var str = response;
                    str = str.replace('<pre style="word-wrap: break-word; white-space: pre-wrap;">','');
                    str = str.replace('</pre>','');				
                    $('#hdnFileName').val(str);*/
                    CloseLoadingpopup();
                    $("#ctl00_CP_lblUploadSuccessMsg").text("Uploaded Successfully");
                    //window.setTimeout(function () {
                    //    //CloseLoadingpopup();
                    //    $("#ctl00_CP_Label2").text("Uploaded Successfully");
                    //}, 100);
                },
                error: function (response, status, e) {
                    window.setTimeout(function () {
                        CloseLoadingpopup();
                    }, 100);
                }
            })
            return false;
            //}
        }
        function isFile(file) {
            var video = /\.(xls|)$/i;
            var CSV = /\.(csv|)$/i;
            var xlsx = /\.(xlsx|)$/i;
            if (video.test(file.toLowerCase()) || CSV.test(file.toLowerCase()) || xlsx.test(file.toLowerCase()))


                return true;
            else
                return false;
        }

        function ValidateImageDetails() {
            var fields;
            fields = "";
            var file = document.getElementById('flUpload').value;
            if (isFile(document.getElementById('flUpload').value) == false || document.getElementById('flUpload').value == null) {
                fields = fields + "\n-- Invalid file --";
            }
            if (fields != "") {
                fields = "Please fill in the following details:\n------------------------------------" + fields;
                alert(fields);
                return false;
            }
            else {
                return true;
            }
        }
        //Added by dhananajay for mantis Start- 36392
        function RedirectToNewAlert(AlertUrl) {
            var newTab = window.open(AlertUrl, '_blank');
            window.location.href = '../../../Pages/BaseFramework/MyDashBoard.aspx';
        }
        //Added by dhananajay for mantis End - 36392

    </script>

</asp:Content>
