<%@ page language="C#" autoeventwireup="true" inherits="Forms_MDTMaster, App_Web_phobza4z" %>

<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="MKB" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>

<%--<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dxwtl" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.v8.2" Namespace="DevExpress.Web.ASPxPopupControl"
    TagPrefix="dxpc" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export" Namespace="DevExpress.Web.ASPxGridView.Export"
    TagPrefix="exp" %>--%>

<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

<%--********* For Bootstrap Implementation *************--%>
<!DOCTYPE html>
<html lang="en">
<%--********* End of Bootstrap Implementation *************--%>
<head id="Head1" runat="server">
    <title>tSense-IoT Manage MDT</title>
    <%--********* For Bootstrap Implementation *************--%>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--********* End of Bootstrap Implementation *************--%>

    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link id="updatedcss" runat="server" href="../css/Updated_css.css" rel="stylesheet" type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="uidatepicker" runat="server" type="text/css" href="../css/ui.datepicker.css" rel="stylesheet" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" type="text/css" href="../css/ui.theme.css" rel="stylesheet" />

    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />

    <%--BootStrap Css--%>
    <link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--End of BootStrap Css--%>
    <style type="text/css">
        .MDTfont {
            font-family: Arial, Helvetica, sans-serif;
            height: 30px;
            font-size: 11px;
        }
    </style>

    <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="../js/ui.datepicker.js"></script>
    <script type="text/javascript" src="../js/JQQueryDatePicker.js"></script>
    <script type="text/javascript" src="../js/MDTMaster.js"></script>
    <script type="text/javascript">
        function hidestatus() {
            window.status = ''
            return true
        }
        if (document.layers)
            document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
        document.onmouseover = hidestatus
        document.onmouseout = hidestatus
    </script>
    <script src="../js/wow.min.js"></script>
</head>
<body>
    <div class="pageContainer">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScmMDT" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="UpMDT" runat="server">
                <ContentTemplate>
                    <!-- Header Starts Here -->
                    <uc1:Header ID="ucHeader" runat="server" />
                    <!-- Nav Ends Here -->
                    <!-- Content Starts Here -->
                    <div id="outer">
                        <div id="inner">
                            <div id="float-wrap">
                                <!-- Main Content Starts Here -->
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content" class="head-part">
                                            <div id="heading" class="col-sm-3 col-md-3 col-lg-3">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfigurationSetupCaption" Text="Configuration" runat="server"></asp:Literal>
                                                </h1>
                                                <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton>
                                                <span>&gt;</span>
                                                <span>
                                                    <a href="MDTMaster.aspx">
                                                        <asp:Label ID="lblManageMDT" Text="Manage MDT" runat="server"></asp:Label>
                                                    </a>
                                                </span>
                                            </div>
                                            <div class="col-sm-9 col-md-9 col-lg-9 head-part-btns">
                                                <div class="pull-right">
                                                    <asp:ImageButton ID="ibtnBackToConfig" runat="server" CausesValidation="false" ImageUrl="~/images/btn-back-to-configuration.jpg"
                                                        PostBackUrl="~/Forms/ConfigurationSetup.aspx" />
                                                </div>
                                            </div>
                                            <div class="clear clearfix"></div>
                                            <div class="row-Geozone"></div>
                                        </div>
                                        <div class="clear clearfix"></div>
                                        <asp:Panel ID="pnlPlanInfo" runat="server" CssClass="ControlShow">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon">
                                                        <img src="../images/icn-maintenanceplan.png" alt="" />
                                                    </span>Manage MDT
                                                </h1>
                                                <div class="col-sm-12 col-md-12 col-lg-12 nullpadding form-tbl">
                                                    <div class="col-sm-6 col-md-6 col-lg-5 nullpadding">
                                                        <div class="col-sm-12 form-group icon-label">
                                                            <div class="col-sm-4 col-xs-4 nullpadding">
                                                                <asp:Image ID="imgFleetIcon" runat="server" ImageUrl="../images/fleet-icon.gif" AlternateText="Fleet Name" />
                                                                <asp:Label ID="lblFleet" Text="Fleet" runat="server"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-6 col-xs-6 nullpadding">
                                                                <asp:DropDownList ID="ddlFleet" runat="server" CssClass="form-control form-controllinebreak" AutoPostBack="true" onchange="ShowPopUp()"
                                                                    OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged">
                                                                    <asp:ListItem Selected="True">- Select -</asp:ListItem>
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                        <div class="col-sm-12 form-group">
                                                            <div class="col-sm-4 col-xs-4 nullpadding">
                                                                <asp:Image ID="imgVehicleIcon" runat="server" ImageUrl="../images/vehicle-icon.gif"
                                                                    AlternateText="Vehicle" />
                                                                <asp:Label ID="lblVehicle" runat="server" Text="Vehicle"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-6 col-xs-6 nullpadding">
                                                                <asp:DropDownList ID="ddlVehicle" CssClass="form-control form-controllinebreak" AutoPostBack="true" runat="server" onchange="ShowPopUp()"
                                                                    OnSelectedIndexChanged="ddlVehicle_SelectedIndexChanged">
                                                                    <asp:ListItem Selected="True">- Select -</asp:ListItem>
                                                                </asp:DropDownList>
                                                                <asp:HiddenField ID="hdnFormAssigned" runat="server" Value="0" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                                <cc1:TabContainer ID="tcManageMDT" runat="server" AutoPostBack="false" OnClientActiveTabChanged="CheckTapPanel" class="form-box">
                                                    <cc1:TabPanel ID="tpMDTMessages" runat="server" HeaderText="Manage MDT Messages">
                                                        <HeaderTemplate>
                                                            Manage MDT Messages
                                                        </HeaderTemplate>
                                                        <ContentTemplate>
                                                            <asp:UpdatePanel ID="UpdatePanelMDT1" runat="server">
                                                                <ContentTemplate>
                                                                    <asp:Panel ID="pnlSendMsg" runat="server">
                                                                        <div class="form-box">
                                                                            <h1>
                                                                                <span class="icon">
                                                                                    <img src="../images/Icn_PreCannedDetails.png" alt="" /></span><asp:Label ID="lblCapSendMsg"
                                                                                        Text="Send Message(s)" runat="server"></asp:Label></h1>
                                                                            <div class="form-tbl col-sm-12 nullpadding">
                                                                                <div class="col-sm-6 col-md-6 col-lg-5 form-horizontal nullpadding">
                                                                                    <div class="ControlShow">
                                                                                        <div class="col-sm-12 form-group icon-label">
                                                                                            <div class="col-sm-4 col-xs-4 nullpadding">
                                                                                                <asp:Label ID="lblSelectCmd" runat="server" Text="Command" CssClass="MDTfont"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                <asp:DropDownList runat="server" ID="ddlCommands" ClientInstanceName="ddlCommands" CssClass="form-control controllinebreak"
                                                                                                    Width="" ValueType="System.String" CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css"
                                                                                                    CssPostfix="Office2003_Blue" onchange="CheckMsgCmds();HidePopUp();" DropDownStyle="DropDownList">
                                                                                                </asp:DropDownList>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-sm-12 form-group">
                                                                                        <div id="trMDTMessage" runat="server">
                                                                                            <div class="col-sm-4 col-xs-4">
                                                                                                <asp:Label ID="lblMessageType" runat="server" Text="Message Type" CssClass="MDTfont"></asp:Label>
                                                                                            </div>

                                                                                            <div class="col-sm-6 col-xs-8 nullpadding chkSettings">
                                                                                                <div class="col-xs-6 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtPrecanned" runat="server" Text="Pre-canned" CssClass="MDTfont radio"
                                                                                                        GroupName="gpMDTMsgType" Checked="true" onclick="ShowOrHideMDTMsgType();ClearValue();"></asp:RadioButton>
                                                                                                </div>
                                                                                                <div class="col-sm-5 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtNormal" runat="server" Text="Normal" CssClass="MDTfont radio" GroupName="gpMDTMsgType"
                                                                                                        onclick="ShowOrHideMDTMsgType();ClearValue();"></asp:RadioButton>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>

                                                                                    <div class="col-sm-12 form-group">
                                                                                        <div id="trMDTAlert" runat="server">
                                                                                            <div class="col-sm-4 col-xs-4">
                                                                                                <asp:Label ID="lblMDTAlert" CssClass="MDTfont" runat="server" Text="Alert Message"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-6 nullpadding chkSettings">
                                                                                                <div class="col-xs-4 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtAlertYes" runat="server" CssClass="MDTfont radio" onchange="RemoveCmdStatus();ClearValue();"
                                                                                                        Text="Yes" GroupName="gpAlert"></asp:RadioButton>
                                                                                                </div>
                                                                                                <div class="col-sm-3 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtAlertNo" runat="server" CssClass="MDTfont radio" Text="No" onchange="RemoveCmdStatus();ClearValue();"
                                                                                                        GroupName="gpAlert" Checked="true"></asp:RadioButton>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>

                                                                                    <div id="trServerMessages" runat="server" class="ControlHide">
                                                                                        <div class="col-sm-12 form-group">
                                                                                            <div class="col-sm-4 col-xs-4">
                                                                                                <asp:Label ID="lblMDTMessage" CssClass="MDTfont" runat="server" Text="Message"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-6 nullpadding">
                                                                                                <asp:TextBox ID="txtMDTMessage" runat="server" MaxLength="160" onpaste="return false;" CssClass="form-control form-controllinebreak"
                                                                                                    ondrop="return false;" TextMode="MultiLine" Width="" Height="50px" onblur="return disallowScriptTags(this);"
                                                                                                    onkeypress="return chkAlphaNumericWithSpace(event,this,159);"></asp:TextBox>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-sm-12 form-group">
                                                                                        <div id="trMDTMsgTable" runat="server">
                                                                                            <div class="col-sm-4 col-xs-4">
                                                                                                <asp:Label ID="lblMsgTableType" CssClass="MDTfont" runat="server" Text="Message Type"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-8 nullpadding chkSettings">
                                                                                                <div class="col-sm-6 col-xs-6 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtServerMsg" CssClass="MDTfont radio" runat="server" Text="Server to Device"
                                                                                                        GroupName="gpMDTMsgTableType" Checked="true" onclick="ShowPopUp();ClearValue();"
                                                                                                        OnCheckedChanged="rbtServerMsg_CheckedChanged" AutoPostBack="true"></asp:RadioButton>
                                                                                                </div>
                                                                                                <div class="col-sm-6 col-xs-6 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtDeviceMsg" CssClass="MDTfont radio" runat="server" Text="Device to Server"
                                                                                                        GroupName="gpMDTMsgTableType" onclick="ShowPopUp();ClearValue();" OnCheckedChanged="rbtDeviceMsg_CheckedChanged"
                                                                                                        AutoPostBack="true"></asp:RadioButton>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-sm-12 form-group">
                                                                                        <div id="trMDTMsgTableOpr" runat="server">
                                                                                            <div class="col-sm-3 col-xs-3">
                                                                                                <asp:Label ID="lblMDTMsgTableOpr" CssClass="MDTfont" runat="server" Text="Operation"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-9 col-xs-9 nullpadding chkSettings">
                                                                                                <div class="col-sm-4 col-xs-4 nullpadding chkSettings">
                                                                                                    <asp:RadioButton ID="rbtAddMDTMsg" CssClass="MDTfont radio" runat="server" Text="Add Messages"
                                                                                                        GroupName="gpMDTMsgTableOpr" Checked="true" onclick="ShowOrHideMDTMsgTableFields();ClearValue();RemoveCmdStatus();"
                                                                                                        OnCheckedChanged="rbtAddMDTMsg_CheckedChanged" AutoPostBack="true"></asp:RadioButton>
                                                                                                </div>
                                                                                                <div class="col-sm-4 col-xs-4 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtDeleteMDTMsg" CssClass="MDTfont radio" runat="server" Text="Delete a Message"
                                                                                                        GroupName="gpMDTMsgTableOpr" onclick="ShowOrHideMDTMsgTableFields();ClearValue();RemoveCmdStatus();"
                                                                                                        OnCheckedChanged="rbtDeleteMDTMsg_CheckedChanged" AutoPostBack="true"></asp:RadioButton>
                                                                                                </div>
                                                                                                <div class="col-sm-4 col-xs-4 nullpadding chkSettings">
                                                                                                    <asp:RadioButton ID="rbtDeleteMDTMsgTable" CssClass="MDTfont radio" runat="server" Text="Delete all Messages"
                                                                                                        GroupName="gpMDTMsgTableOpr" onclick="ShowOrHideMDTMsgTableFields();ClearValue();RemoveCmdStatus();HidePopUp();"
                                                                                                        AutoPostBack="true" OnCheckedChanged="rbtDeleteMDTMsgTable_CheckedChanged"></asp:RadioButton>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-sm-12 form-group">
                                                                                        <div id="trMDTCannedMsg" runat="server">
                                                                                            <div class="col-sm-4 col-xs-4">
                                                                                                <asp:Label ID="lblCannedMessages" runat="server" CssClass="MDTfont" Text="Message"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                <asp:DropDownList ID="ddlCannedMsg" CssClass="form-control form-controllinebreak" onchange="RemoveCmdStatus();" runat="server"
                                                                                                    Width="" AppendDataBoundItems="true">
                                                                                                </asp:DropDownList>
                                                                                            </div>
                                                                                        </div>

                                                                                    </div>

                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <asp:Panel ID="pnlMessageDetails" runat="server" CssClass="ControlHide">
                                                                        <div id="grid-dsply">
                                                                            <div id="top">
                                                                                <div class="col-xs-12 gridheader">
                                                                                    <div class="col-sm-3 padding-width-md-left">
                                                                                        <span class="icon">
                                                                                            <img src="../images/Icn_PreCannedDetails.png" alt="" /></span><span class="txt"><asp:Label
                                                                                                ID="lblCapCanMsgDetails" runat="server" CssClass="MDTfont" Text="Pre-canned Messages"></asp:Label></span>
                                                                                    </div>
                                                                                    <div class="col-sm-9 nullpadding">
                                                                                        <div class="pull-right">
                                                                                            <span class="icon">
                                                                                                <img src="../images/blue.png" alt="Device to Server" />
                                                                                            </span>
                                                                                            <asp:ImageButton ID="ibtnAddMsg" runat="server" ImageUrl="~/images/btn_AddMsg.png"
                                                                                                OnClientClick="return AddMsgAndUser();" />
                                                                                            <span class="dropdown">
                                                                                                <dxw:ASPxComboBox ID="ASPxCboExport1" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                                                                    ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                                                    CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                                                    EnableTheming="true" Theme="Office2003Blue">
                                                                                                    <Items>
                                                                                                        <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                                                        <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                                                        <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                                                        <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                                                        <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                                                    </Items>
                                                                                                </dxw:ASPxComboBox>
                                                                                            </span>
                                                                                            <span class="txt exportBtnAlign">
                                                                                                <asp:ImageButton ID="btnExportMDTMessage1" Visible="false" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                                                                    OnClick="btnExportMDTMessage_Click" OnClientClick="SetExportHiddenValue();" />
                                                                                                <asp:LinkButton ID="btnExportMDTMessage" runat="server" CssClass="MultilingualBtn" OnClientClick="SetExportHiddenValue();" OnClick="btnExportMDTMessage_Click">
                                                                                                    <span id="Span11" runat="server" class="MultilingualBtnspan">
                                                                                                        <div class="Export">
                                                                                                            <div id="ExportButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                                                Export
                                                                                                            </div>
                                                                                                        </div>
                                                                                                    </span>
                                                                                                </asp:LinkButton>
                                                                                            </span>

                                                                                            <asp:ImageButton ID="ibtnSendMsg" runat="server" ImageUrl="~/images/btn_SendMsg.png"
                                                                                                OnClientClick="return SendUserAndMsg();" />


                                                                                            <span class="txt exportBtnAlign">
                                                                                                <asp:Label runat="server" ID="lblSelectionMode" Text="- Device to Server" /></span>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>

                                                                            </div>
                                                                            <div class="clearfix"></div>
                                                                            <div class="table-responsive">
                                                                                <dxw:ASPxGridView ID="gvPreCannedMsgsList" runat="server" KeyFieldName="CannedMsgId" ClientInstanceName="gvPreCannedMsgsList"
                                                                                    Width="100%" SettingsPager-Mode="ShowPager" EnableTheming="true" Theme="Office2003Blue"
                                                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue">
                                                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                            </Images>--%>
                                                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                                        CssPostfix="Office2003_Blue">
                                                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                                        </Header>
                                                                                        <LoadingPanel ImageSpacing="10px">
                                                                                        </LoadingPanel>
                                                                                        <PagerBottomPanel CssClass="PageFooter">
                                                                                        </PagerBottomPanel>
                                                                                        <PagerTopPanel CssClass="PageFooter">
                                                                                        </PagerTopPanel>
                                                                                    </Styles>
                                                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                                        PageSize="5">
                                                                                    </SettingsPager>
                                                                                    <Columns>
                                                                                        <dxw:GridViewDataColumn FieldName="MsgName" Caption="MDTMessage" Width="50%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                                    <tr>
                                                                                                        <td style="height: 20px; padding-top: 5px">
                                                                                                            <asp:Label ID="lblMsgName" runat="server" Text="Message"></asp:Label>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                </table>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblMDTMessage" runat="server" ForeColor='<%# Convert.ToBoolean(Eval("IsServerMsg"))?System.Drawing.Color.Black:System.Drawing.Color.Blue %>'
                                                                                                    Text='<%# Eval("MsgName") %>' />
                                                                                            </DataItemTemplate>
                                                                                            <%--  <Settings AllowAutoFilter="True" />--%>
                                                                                        </dxw:GridViewDataColumn>
                                                                                        <dxw:GridViewDataTextColumn Caption="Edit" Width="3%" Name="Edit" HeaderStyle-HorizontalAlign="Center"
                                                                                            CellStyle-HorizontalAlign="Center">
                                                                                            <HeaderTemplate>
                                                                                            </HeaderTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:LinkButton ID="lbtnEdit" runat="server" AlternateText="Update" ToolTip="Click here to Update"
                                                                                                    ImageAlign="Middle" CommandArgument='<%#Eval("CannedMsgId") %>' OnClick="lbtnEdit_click"
                                                                                                    Enabled='<%# Convert.ToBoolean(Eval("IsAssigned")) %>' name='<%# Eval("IsAssigned")+"-"+("EditMsg") %>'
                                                                                                    OnClientClick="return CheckAssigned(this);">
                                                                                    <img src='<%# Convert.ToBoolean(Eval("IsAssigned"))?"../images/icn-edit.gif":"../images/editDisabledS.png" %>' alt="" /></asp:LinkButton>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <dxw:GridViewDataTextColumn Caption="Delete" Width="3%" HeaderStyle-HorizontalAlign="Center"
                                                                                            CellStyle-HorizontalAlign="Center">
                                                                                            <HeaderTemplate>
                                                                                            </HeaderTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:LinkButton ID="lbtnDelete" runat="server" AlternateText="Delete" ToolTip="Click here to Delete"
                                                                                                    CommandArgument='<%#Eval("CannedMsgId") %>' Enabled='<%# Convert.ToBoolean(Eval("IsAssigned")) %>'
                                                                                                    OnClick="lbtnDelete_click" name='<%# Eval("IsAssigned")+"-"+("DeleteMsg") %>'
                                                                                                    OnClientClick="return CheckAssigned(this);">
                                                                                     <img src='<%# Convert.ToBoolean(Eval("IsAssigned"))?"../images/delete-icon.gif":"../images/deleteDisabledS.png" %>' alt="" /></asp:LinkButton>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                    </Columns>
                                                                                    <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                                                    <SettingsText EmptyDataRow=" No MDT Messages found" />
                                                                                </dxw:ASPxGridView>
                                                                            </div>
                                                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvPreCannedMsgsList"
                                                                                ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
                                                                                    \viewkind4\uc1\pard\qc\b\fs28 History Details\par\pard\par\par}">
                                                                                <PageFooter Right="[Page # of Pages #]">
                                                                                </PageFooter>
                                                                            </dxw:ASPxGridViewExporter>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <asp:Panel ID="pnlSendMsgcmd" runat="server">
                                                                        <div id="grid-dsply">
                                                                            <div id="top">
                                                                                <div class="col-xs-12 gridheader">
                                                                                    <div class="col-sm-3 padding-width-md-left">
                                                                                        <span class="icon">
                                                                                            <img src="../images/Icn_PreCannedDetails.png" alt="" />
                                                                                        </span><span class="txt">
                                                                                            <asp:Label ID="Label1" runat="server" Text="Select message(s)"></asp:Label></span>
                                                                                    </div>

                                                                                    <div class="col-sm-9 nullpadding">
                                                                                        <div class="pull-right">

                                                                                            <asp:Label ID="lblMsgDes" ForeColor="Red" runat="server" Text="Note: Maximum 5 messages can be sent at a time"></asp:Label>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>

                                                                            <div class="clearfix"></div>
                                                                            <div class="table-responsive">
                                                                                <dxw:ASPxGridView ID="gvPreCannedMsgs" runat="server" KeyFieldName="PrecannedMsgId"
                                                                                    ClientInstanceName="gvPreCannedMsgs" SettingsPager-Mode="ShowPager" Width="100%"
                                                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                                                    EnableTheming="true" Theme="Office2003Blue" OnCustomJSProperties="gvPreCannedMsgs_CustomJSProperties">
                                                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                            </Images>--%>
                                                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                                        CssPostfix="Office2003_Blue">
                                                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                                        </Header>
                                                                                        <LoadingPanel ImageSpacing="10px">
                                                                                        </LoadingPanel>
                                                                                        <PagerBottomPanel CssClass="PageFooter">
                                                                                        </PagerBottomPanel>
                                                                                        <PagerTopPanel CssClass="PageFooter">
                                                                                        </PagerTopPanel>
                                                                                    </Styles>
                                                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                                        PageSize="5">
                                                                                    </SettingsPager>
                                                                                    <Columns>
                                                                                        <dxw:GridViewDataTextColumn Width="5%" Caption="Services">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <asp:CheckBox ID="chkSelectAllMsgs" ToolTip="Select all in the current page" runat="server"
                                                                                                    onclick="DevExpressGridCheckAll(1,'gvPreCannedMsgs');" Text="" />
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:CheckBox ID="chkMsgs" runat="server" Enabled='<%# Convert.ToBoolean(Eval("IsExceedMsgs")) %>'
                                                                                                    Checked='<%# Convert.ToBoolean(Eval("Isselect")) %>' onclick="CheckListOfServiceIDs(this, 'hdnSelectedMsgIds','hdnMsgId',1);DevExpressGridCheckOrUnCheckSelectAll(1);" />
                                                                                            </DataItemTemplate>
                                                                                            <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                                                            <CellStyle HorizontalAlign="Center">
                                                                                            </CellStyle>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <dxw:GridViewDataColumn FieldName="MsgName" Caption="MDTMessage" Width="70%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                                    <tr>
                                                                                                        <td style="height: 20px; padding-top: 5px">
                                                                                                            <asp:Label ID="lblMsgName" runat="server" Text="Message"></asp:Label>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                </table>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:HiddenField ID="hdnMsgId" runat="server" Value='<%# Eval("PrecannedMsgId")+"-"+Eval("MsgName") %>' />
                                                                                                <asp:Label ID="lblMDTMessage" runat="server" Text='<%# Eval("MsgName") %>' />
                                                                                            </DataItemTemplate>
                                                                                            <Settings AllowAutoFilter="True" />
                                                                                        </dxw:GridViewDataColumn>
                                                                                    </Columns>
                                                                                    <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                                                    <SettingsText EmptyDataRow=" No MDT Messages found" />
                                                                                </dxw:ASPxGridView>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <asp:Panel ID="pnlMsgCmdButtons" runat="server" CssClass="ControlHide">
                                                                        <div id="trSendCmd" runat="server">
                                                                            <div class="form-tbl nullpadding col-sm-12">
                                                                                <div class="form-group col-sm-12 icon-label">
                                                                                    <asp:ImageButton ID="ibtnSendCmd" runat="server" ImageUrl="~/images/btn-send-command.jpg"
                                                                                        OnClick="ibtnSendCmd_Click" OnClientClick="return ValidateSendCmd();ClearSchedule();" />

                                                                                    <asp:ImageButton ID="btnScheduleCommands" runat="server" OnClientClick="return ScheduleUserMsg();"
                                                                                        ImageUrl="~/images/schedule-a-command.png"></asp:ImageButton>

                                                                                    <asp:ImageButton ID="lbtnScheduleListing" runat="server" OnClick="lbtnScheduleListing_Click"
                                                                                        ImageUrl="~/images/btn-view-schedules.png"></asp:ImageButton>

                                                                                    <asp:ImageButton ID="ibtnCancelCmd" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                                        OnClientClick="return CancelMsgSend();" />
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <asp:Panel ID="pnlScheduleCmds" runat="server" CssClass="ControlHide">
                                                                            <div class="form-tbl nullpadding col-sm-12">
                                                                                <div class="col-sm-6 form-horizontal">
                                                                                    <div class="form-group col-sm-12 icon-label">
                                                                                        <div class="col-sm-4 col-xs-4">
                                                                                            <asp:Label ID="lblToCaption" runat="server" Text="Retries Period"></asp:Label>
                                                                                        </div>
                                                                                        <div class="col-sm-8 col-xs-6">
                                                                                            <asp:DropDownList ID="ddlRetriesTime" runat="server">
                                                                                                <asp:ListItem Text="1 Day" Value="1" Selected="True"></asp:ListItem>
                                                                                                <asp:ListItem Text="3 Days" Value="3"></asp:ListItem>
                                                                                                <asp:ListItem Text="7 Days" Value="7"></asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="form-group col-sm-12 icon-label">
                                                                                        <div class="col-sm-4 col-xs-4"></div>
                                                                                        <div class="col-sm-8 col-xs-6">
                                                                                            <asp:ImageButton ID="ibtnSaveSchedules" runat="server" OnClientClick="return ValidateSchedulingOfCommands(true);"
                                                                                                ImageUrl="~/images/schedule.png" OnClick="ibtnSendCmd_Click"></asp:ImageButton>
                                                                                            <asp:ImageButton ID="ibtnCancel" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                                                OnClientClick="return CancelScheduleUserMsg();" />
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>

                                                                        </asp:Panel>
                                                                    </asp:Panel>
                                                                    <asp:Panel ID="pnlMessageInformation" runat="server">
                                                                        <div class="form-box nullpadding col-sm-12">
                                                                            <h1>
                                                                                <span class="icon">
                                                                                    <img src="../images/Icn_PreCannedDetails.png" alt="" /></span><asp:Label ID="lblCapCanMsgInformation"
                                                                                        Text="Pre-canned Message Information" CssClass="MDTfont" runat="server"></asp:Label></h1>

                                                                            <div class="form-tbl col-sm-12 nullpadding">
                                                                                <div class="col-sm-6 col-md-6 col-lg-5 form-horizontal nullpadding">
                                                                                    <div class="col-sm-12 form-group">
                                                                                        <div class="col-sm-3 col-xs-3">
                                                                                            <asp:Label ID="lblCannedMessageType" CssClass="MDTfont" runat="server" Text="Message Type"></asp:Label>
                                                                                        </div>
                                                                                        <div class="col-sm-6 col-xs-8 nullpadding chkSettings">
                                                                                            <div class="col-sm-6 col-xs-6 nullpadding">
                                                                                                <asp:RadioButton ID="rbtAddServerMsg" CssClass="MDTfont radio" runat="server" onclick="ClearValue();"
                                                                                                    Text="Server to Device" GroupName="gpMDTMsgTableTypeAdd" Checked="true"></asp:RadioButton>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-6 nullpadding">
                                                                                                <asp:RadioButton ID="rbtAddDeviceMsg" CssClass="MDTfont radio" runat="server" onclick="ClearValue();"
                                                                                                    Text="Device to server" GroupName="gpMDTMsgTableTypeAdd"></asp:RadioButton>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-sm-12 form-group">
                                                                                        <div class="col-sm-3 col-xs-3">
                                                                                            <asp:Label ID="lblCannedMsg" runat="server" CssClass="MDTfont" Text="Pre-canned Message"></asp:Label>
                                                                                        </div>
                                                                                        <div class="col-sm-5 col-xs-5">
                                                                                            <asp:TextBox ID="txtCannedMsg" runat="server" TextMode="MultiLine" CssClass="form-control" MaxLength="40"
                                                                                                onkeypress="return chkAlphaNumericWithSpace(event,this,39);" onpaste="return false"></asp:TextBox>
                                                                                        </div>

                                                                                        <div class="col-sm-4 col-xs-4 nullpadding">
                                                                                            <asp:ImageButton ID="ibtnSaveMsg" OnClientClick="return ValidateMsgInputs();ShowPopUp();"
                                                                                                Style="padding-top: 5px" OnClick="ibtnSaveMsg_Click" runat="server" ImageUrl="~/images/btn-save.jpg" />
                                                                                            <asp:ImageButton ID="ibtnCancelMsg" OnClientClick="return CancelAddUserMsg();" runat="server"
                                                                                                ImageUrl="~/images/btn-cancel.jpg" />
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <div id="divMsg" runat="server" align="center" style="font-weight: bold;">
                                                                    </div>
                                                                </ContentTemplate>
                                                                <Triggers>
                                                                    <asp:PostBackTrigger ControlID="btnExportMDTMessage" />
                                                                </Triggers>
                                                            </asp:UpdatePanel>
                                                        </ContentTemplate>
                                                    </cc1:TabPanel>
                                                    <cc1:TabPanel ID="tpMDTUsers" runat="server" HeaderText="Manage MDT Users">
                                                        <ContentTemplate>
                                                            <asp:UpdatePanel ID="UpdatePanelMDT2" runat="server">
                                                                <ContentTemplate>
                                                                    <asp:Panel ID="pnlSendUsers" runat="server" CssClass="ControlHide">
                                                                        <div class="form-box">
                                                                            <h1>
                                                                                <span class="icon">
                                                                                    <img src="../images/Icn_MDTUserDetails.png" alt="" /></span><asp:Label ID="lblUserSent"
                                                                                        Text="MDT User Assignment" runat="server"></asp:Label></h1>
                                                                            <div class="form-tbl col-sm-12 nullpadding">
                                                                                <div class="col-sm-7 col-md-7 col-lg-6 form-horizontal nullpadding icon-label">
                                                                                    <div class="ControlShow">
                                                                                        <div class="form-group col-sm-12">
                                                                                            <div class="col-sm-3 col-xs-4">
                                                                                                <asp:Label ID="lblUsercmd" CssClass="MDTfont" runat="server" Text="Command"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-8">
                                                                                                <asp:DropDownList runat="server" ID="ddlUserCommands" CssClass="ddlUserCommands form-control"
                                                                                                    Width="" ValueType="System.String" CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css"
                                                                                                    CssPostfix="Office2003_Blue" DropDownStyle="DropDownList" onchange="CheckMsgCmds();">
                                                                                                </asp:DropDownList>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div id="trMDTUserTable" runat="server">
                                                                                        <div class="form-group col-sm-12">
                                                                                            <div class="col-sm-3 col-xs-2">
                                                                                                <asp:Label ID="lblMDTUserOpr" CssClass="MDTfont" runat="server" Text="Operation"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-9 col-xs-10">
                                                                                                <div class="col-xs-4 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtAddMDTUser" CssClass="MDTfont radio" runat="server" Text="Add Users"
                                                                                                        GroupName="gpMDTUserOpr" Checked="true" onclick="CheckMsgCmds();ShowPopUp();ClearValue();RemoveCmdStatus();"
                                                                                                        OnCheckedChanged="rbtAddMDTUser_CheckedChanged" AutoPostBack="true"></asp:RadioButton>
                                                                                                </div>
                                                                                                <div class="col-xs-4 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtDeleteMDTUser" CssClass="MDTfont radio" runat="server" Text="Delete a User"
                                                                                                        GroupName="gpMDTUserOpr" onclick="CheckMsgCmds();ShowPopUp();ClearValue();RemoveCmdStatus();"
                                                                                                        OnCheckedChanged="rbtDeleteMDTUser_CheckedChanged" AutoPostBack="true"></asp:RadioButton>
                                                                                                </div>
                                                                                                <div class="col-xs-4 nullpadding">
                                                                                                    <asp:RadioButton ID="rbtDeleteMDTUserTable" CssClass="MDTfont radio" runat="server" Text="Delete all Users"
                                                                                                        GroupName="gpMDTUserOpr" onclick="CheckMsgCmds();ClearValue();RemoveCmdStatus();"
                                                                                                        OnCheckedChanged="rbtDeleteMDTUserTable_CheckedChanged" AutoPostBack="true"></asp:RadioButton>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>

                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <div class="clearfix"></div>
                                                                    <asp:Panel ID="pnlUserDetails" runat="server">
                                                                        <div id="grid-dsply">
                                                                            <div id="top">
                                                                                <div class="col-xs-12 gridheader">
                                                                                    <div class="col-sm-3 padding-width-md-left">
                                                                                        <span class="icon">
                                                                                            <img src="../images/Icn_MDTUserDetails.png" alt="" /></span><asp:Label
                                                                                                ID="lblCapMDTUser" runat="server" CssClass="MDTfont" Text="MDT User Details"></asp:Label>
                                                                                    </div>
                                                                                    <div class="col-sm-9 nullpadding">
                                                                                        <div class="pull-right">
                                                                                            <asp:ImageButton ID="ibtnAddNewUser" runat="server" ImageUrl="~/images/btn_AddUser.png"
                                                                                                OnClientClick="return AddMsgAndUser();" />
                                                                                            <span class="dropdown">
                                                                                                <dxw:ASPxComboBox ID="ASPxCboExport2" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                                                                    ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                                                    CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                                                    EnableTheming="true" Theme="Office2003Blue">
                                                                                                    <Items>
                                                                                                        <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                                                        <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                                                        <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                                                        <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                                                        <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                                                    </Items>
                                                                                                </dxw:ASPxComboBox>
                                                                                            </span>
                                                                                            <span class="txt exportBtnAlign">
                                                                                                <asp:ImageButton ID="btnExportUserList1" Visible="false" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                                                                    OnClick="btnExportUserList_Click" OnClientClick="SetExportHiddenValue();" />
                                                                                                <asp:LinkButton ID="btnExportUserList" runat="server" CssClass="MultilingualBtn" OnClientClick="SetExportHiddenValue();" OnClick="btnExportUserList_Click">
                                                                                                    <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                                                                        <div class="Export">
                                                                                                            <div id="Div1" runat="server" class="MultilingualBtnTextAlign">
                                                                                                                Export
                                                                                                            </div>
                                                                                                        </div>
                                                                                                    </span>
                                                                                                </asp:LinkButton>
                                                                                            </span>

                                                                                            <asp:ImageButton ID="ibtnSendUser" runat="server" ImageUrl="~/images/btn_SendMsg.png"
                                                                                                OnClientClick="return SendUserAndMsg();" />
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="clearfix"></div>
                                                                            <div class="table-responsive">
                                                                                <dxw:ASPxGridView ID="gvMDTUsersList" runat="server" Width="100%" KeyFieldName="UserId"
                                                                                    ClientInstanceName="gvMDTUsersList" SettingsPager-Mode="ShowPager"
                                                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                                                    EnableTheming="true" Theme="Office2003Blue">
                                                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                            </Images>--%>
                                                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                                        CssPostfix="Office2003_Blue">
                                                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                                        </Header>
                                                                                        <LoadingPanel ImageSpacing="10px">
                                                                                        </LoadingPanel>
                                                                                        <PagerBottomPanel CssClass="PageFooter">
                                                                                        </PagerBottomPanel>
                                                                                        <PagerTopPanel CssClass="PageFooter">
                                                                                        </PagerTopPanel>
                                                                                    </Styles>
                                                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                                        PageSize="5">
                                                                                    </SettingsPager>
                                                                                    <Columns>
                                                                                        <dxw:GridViewDataColumn FieldName="MDTUserId" Caption="MDTUserId" VisibleIndex="1"
                                                                                            Width="25%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                                    <tr>
                                                                                                        <td style="height: 20px; padding-top: 5px">
                                                                                                            <asp:Label ID="lblMDTUserId" runat="server" Text="User Id"></asp:Label>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                </table>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblMDTUserId" runat="server" Text='<%# Eval("MDTUserId") %>' />
                                                                                            </DataItemTemplate>
                                                                                            <Settings AllowAutoFilter="True" />
                                                                                        </dxw:GridViewDataColumn>
                                                                                        <dxw:GridViewDataColumn FieldName="MDTUserName" Caption="MDTUserName" VisibleIndex="2"
                                                                                            Width="25%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                                    <tr>
                                                                                                        <td style="height: 20px; padding-top: 5px">
                                                                                                            <asp:Label ID="lblMDTUserName" runat="server" Text="User Name"></asp:Label>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                </table>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblMDTMessage" runat="server" Text='<%# Eval("MDTUserName") %>' />
                                                                                            </DataItemTemplate>
                                                                                            <%--<Settings AllowAutoFilter="True" />--%>
                                                                                        </dxw:GridViewDataColumn>
                                                                                        <dxw:GridViewDataTextColumn Caption="Edit" Width="3%" Name="Edit" HeaderStyle-HorizontalAlign="Center"
                                                                                            CellStyle-HorizontalAlign="Center">
                                                                                            <HeaderTemplate>
                                                                                            </HeaderTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:LinkButton ID="lbtnUserEdit" runat="server" AlternateText="Update" name='<%# Eval("IsAssigned")+"-"+("EditUser") %>'
                                                                                                    ToolTip="Click here to Update" ImageAlign="Middle" CommandArgument='<%#Eval("UserId") %>'
                                                                                                    OnClientClick="return CheckAssigned(this);" OnClick="lbtnEdit_click" Enabled='<%# Convert.ToBoolean(Eval("IsAssigned")) %>'>
                                                                                     <img src='<%# Convert.ToBoolean(Eval("IsAssigned"))?"../images/icn-edit.gif":"../images/editDisabledS.png" %>' alt="" /></asp:LinkButton>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <dxw:GridViewDataTextColumn Caption="Delete" Width="3%" HeaderStyle-HorizontalAlign="Center"
                                                                                            CellStyle-HorizontalAlign="Center">
                                                                                            <HeaderTemplate>
                                                                                            </HeaderTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:LinkButton ID="lbtnUserDelete" runat="server" name='<%# Eval("IsAssigned")+"-"+("DeleteUser") %>'
                                                                                                    AlternateText="Delete" Enabled='<%# Convert.ToBoolean(Eval("IsAssigned")) %>'
                                                                                                    OnClientClick="return CheckAssigned(this);" ToolTip="Click here to Delete" CommandArgument='<%#Eval("UserId") %>'
                                                                                                    OnClick="lbtnDelete_click">
                                                                                    <img src='<%# Convert.ToBoolean(Eval("IsAssigned"))?"../images/delete-icon.gif":"../images/deleteDisabledS.png" %>' alt="" /></asp:LinkButton>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                    </Columns>
                                                                                    <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                                                    <SettingsText EmptyDataRow=" No MDT Users found" />
                                                                                </dxw:ASPxGridView>
                                                                            </div>
                                                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter2" runat="server" GridViewID="gvMDTUsersList"
                                                                                ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
                                                                                    \viewkind4\uc1\pard\qc\b\fs28 History Details\par\pard\par\par}">
                                                                                <PageFooter Right="[Page # of Pages #]">
                                                                                </PageFooter>
                                                                            </dxw:ASPxGridViewExporter>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <asp:Panel ID="pnlSendUsercmd" runat="server">
                                                                        <div id="grid-dsply">
                                                                            <div id="top">
                                                                                <div class="col-xs-12 gridheader">
                                                                                    <div class="col-sm-3 padding-width-md-left">
                                                                                        <span class="icon">
                                                                                            <img src="../images/Icn_MDTUserDetails.png" alt="" /></span><asp:Label
                                                                                                ID="Label4" runat="server" Text="Select User(s)"></asp:Label></h1>
                                                                                    </div>
                                                                                    <div class="col-sm-9 nullpadding">
                                                                                        <div class="pull-right">
                                                                                            <asp:Label ID="lblUserDes" ForeColor="Red" runat="server" Text="Note: Maximum 5 users can be sent at a time"></asp:Label>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="clearfix"></div>
                                                                            <div class="table-responsive">
                                                                                <dxw:ASPxGridView ID="gvMDTUsers" runat="server" Width="100%" KeyFieldName="UserId"
                                                                                    ClientInstanceName="gvMDTUsers" SettingsPager-Mode="ShowPager"
                                                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                                                    EnableTheming="true" Theme="Office2003Blue" OnCustomJSProperties="gvPreCannedMsgs_CustomJSProperties">
                                                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                            </Images>--%>
                                                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                                        CssPostfix="Office2003_Blue">
                                                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                                        </Header>
                                                                                        <LoadingPanel ImageSpacing="10px">
                                                                                        </LoadingPanel>
                                                                                        <PagerBottomPanel CssClass="PageFooter">
                                                                                        </PagerBottomPanel>
                                                                                        <PagerTopPanel CssClass="PageFooter">
                                                                                        </PagerTopPanel>
                                                                                    </Styles>
                                                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                                        PageSize="5">
                                                                                    </SettingsPager>
                                                                                    <Columns>
                                                                                        <dxw:GridViewDataTextColumn VisibleIndex="1" Width="5%" Caption="MDTUsers">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <asp:CheckBox ID="chkSelectAllUsers" ToolTip="Select all in the current page" runat="server"
                                                                                                    onclick="DevExpressGridCheckAll(1,'gvMDTUsers');" />
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:CheckBox ID="chkUser" runat="server" Enabled='<%# Convert.ToBoolean(Eval("IsExceedUsers")) %>'
                                                                                                    Checked='<%# Convert.ToBoolean(Eval("Isselect")) %>' onclick="CheckListOfServiceIDs(this, 'hdnSelectedMsgIds', 'hdnUserId',1);DevExpressGridCheckOrUnCheckSelectAll(1);" />
                                                                                            </DataItemTemplate>
                                                                                            <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                                                            <CellStyle HorizontalAlign="Center">
                                                                                            </CellStyle>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <dxw:GridViewDataColumn FieldName="MDTUserId" Caption="MDTUserId" VisibleIndex="1"
                                                                                            Width="25%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                                    <tr>
                                                                                                        <td style="height: 20px; padding-top: 5px">
                                                                                                            <asp:Label ID="lblMDTUserId" runat="server" Text="User Id"></asp:Label>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                </table>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:HiddenField ID="hdnUserId" runat="server" Value='<%# Eval("MDTUserId")+"-"+Eval("MDTUserPassword")+"-"+Eval("MDTUserName")+"-"+Eval("UserId") %>' />
                                                                                                <asp:Label ID="lblMDTUserId" runat="server" Text='<%# Eval("MDTUserId") %>' />
                                                                                            </DataItemTemplate>
                                                                                            <Settings AllowAutoFilter="True" />
                                                                                        </dxw:GridViewDataColumn>
                                                                                        <dxw:GridViewDataColumn FieldName="MDTUserName" Caption="MDTUserName" VisibleIndex="2"
                                                                                            Width="25%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                                    <tr>
                                                                                                        <td style="height: 20px; padding-top: 5px">
                                                                                                            <asp:Label ID="lblMDTUserName" runat="server" Text="User Name"></asp:Label>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                </table>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblMDTMessage" runat="server" Text='<%# Eval("MDTUserName") %>' />
                                                                                            </DataItemTemplate>
                                                                                            <Settings AllowAutoFilter="True" />
                                                                                        </dxw:GridViewDataColumn>
                                                                                    </Columns>
                                                                                    <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                                                    <SettingsText EmptyDataRow=" No MDT Users found" />
                                                                                </dxw:ASPxGridView>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <asp:Panel ID="pnlUserButtons" runat="server">
                                                                        <div id="trSendUserCmd" runat="server">
                                                                            <div class="form-tbl nullpadding col-sm-12">
                                                                                <div class="form-group col-sm-12 icon-label">
                                                                                    <asp:ImageButton ID="ibtnSendUserCmd" runat="server" ImageUrl="~/images/btn-send-command.jpg"
                                                                                        OnClick="ibtnSendCmd_Click" OnClientClick="return ValidateSendCmd();ClearSchedule();" />

                                                                                    <asp:ImageButton ID="btnScheduleUserCommands" runat="server" OnClientClick="return ScheduleUserMsg();"
                                                                                        ImageUrl="~/images/schedule-a-command.png"></asp:ImageButton>

                                                                                    <asp:ImageButton ID="lbtnUserScheduleListing" runat="server" OnClick="lbtnScheduleListing_Click"
                                                                                        ImageUrl="~/images/btn-view-schedules.png"></asp:ImageButton>

                                                                                    <asp:ImageButton ID="ibtnCancelUserCmd" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                                        OnClientClick="return CancelMsgSend();" />
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <asp:Panel ID="pnlScheduleUserCmds" runat="server" CssClass="ControlHide">
                                                                            <div class="form-tbl nullpadding col-sm-12">
                                                                                <div class="col-sm-6 form-horizontal">
                                                                                    <div class="form-group col-sm-12 icon-label col-Geozone">
                                                                                        <div class="col-sm-4 col-xs-4 col-Geozone">
                                                                                            <asp:Label ID="lblUserRetries" runat="server" Text="Retries Period"></asp:Label>
                                                                                        </div>
                                                                                        <div class="col-sm-8 col-xs-8 col-Geozone">
                                                                                            <asp:DropDownList ID="ddlUserRetriesTime" runat="server">
                                                                                                <asp:ListItem Text="1 Day" Value="1" Selected="True"></asp:ListItem>
                                                                                                <asp:ListItem Text="3 Days" Value="3"></asp:ListItem>
                                                                                                <asp:ListItem Text="7 Days" Value="7"></asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="form-group col-sm-12 icon-label col-Geozone">
                                                                                        <div class="col-sm-4 col-xs-4 col-Geozone"></div>
                                                                                        <div class="col-sm-8 col-xs-6 col-Geozone">
                                                                                            <asp:ImageButton ID="ibtnSaveUserSchedules" runat="server" OnClientClick="return ValidateSchedulingOfCommands(true);"
                                                                                                ImageUrl="~/images/schedule.png" OnClick="ibtnSendCmd_Click"></asp:ImageButton>
                                                                                            <asp:ImageButton ID="ibtnUserMDTCancel" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                                                OnClientClick="return CancelScheduleUserMsg();" />
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </asp:Panel>
                                                                    </asp:Panel>
                                                                    <asp:Panel ID="pnlUserInformation" runat="server" CssClass="ControlHide">
                                                                        <div class="form-box">
                                                                            <h1>
                                                                                <span class="icon">
                                                                                    <img src="../images/Icn_MDTUserDetails.png" alt="" /></span><asp:Label ID="lblUserInformation"
                                                                                        Text="MDT User Information" CssClass="MDTfont" runat="server"></asp:Label></h1>
                                                                            <div class="form-tbl col-sm-12 nullpadding">
                                                                                <div class="form-horizontal">
                                                                                    <div class="col-sm-6">
                                                                                        <div class="form-group col-sm-12 icon-label">
                                                                                            <div class="col-sm-4 col-xs-4 nullpadding">
                                                                                                <asp:Label ID="lblUserId" CssClass="MDTfont" runat="server" Text="MDT UserId"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                <asp:TextBox ID="txtMDTUserId" runat="server" CssClass="form-control" MaxLength="5" onkeypress="return chkAlphaNumericWithoutSpace(event);"></asp:TextBox>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group col-sm-12">
                                                                                            <div class="col-sm-4 col-xs-4 nullpadding">
                                                                                                <asp:Label ID="lblMDTUserName" CssClass="MDTfont" runat="server" Text="User Name"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                <asp:TextBox ID="txtMDTUserName" runat="server" CssClass="form-control" MaxLength="20" onpaste="return false"
                                                                                                    onkeypress="return chkAlphaNumericWithSpace(event, this, 50);"></asp:TextBox>
                                                                                                <asp:DropDownList ID="ddlMDTUserName" runat="server" CssClass="ControlHide" AppendDataBoundItems="true">
                                                                                                </asp:DropDownList>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group col-sm-12">
                                                                                            <div class="col-sm-4 col-xs-4 nullpadding">
                                                                                                <asp:Label ID="lblMDTUserPassword" CssClass="MDTfont" runat="server" Text="Password"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                <asp:TextBox ID="txtMDTUserPassword" runat="server" CssClass="form-control" MaxLength="8" TextMode="Password"
                                                                                                    onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group col-sm-12">
                                                                                            <div class="col-sm-4 col-xs-4 nullpadding"></div>
                                                                                            <div class="col-sm-6 nullpadding">
                                                                                                <asp:ImageButton ID="ibtnUserSave" OnClientClick="return ValidateMsgInputs();" Style="padding-top: 5px"
                                                                                                    OnClick="ibtnSaveMsg_Click" runat="server" ImageUrl="~/images/btn-save.jpg" />
                                                                                                <asp:ImageButton ID="ibtnUserCancel" OnClientClick="return CancelAddUserMsg();" runat="server"
                                                                                                    ImageUrl="~/images/btn-cancel.jpg" />
                                                                                            </div>
                                                                                        </div>

                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <div id="divUserMsg" runat="server" align="center" style="font-weight: bold;">
                                                                    </div>
                                                                </ContentTemplate>
                                                                <Triggers>
                                                                    <asp:PostBackTrigger ControlID="btnExportUserList" />
                                                                </Triggers>
                                                            </asp:UpdatePanel>
                                                        </ContentTemplate>
                                                    </cc1:TabPanel>
                                                    <cc1:TabPanel ID="tpMDTForms" runat="server" HeaderText="MDT Forms">
                                                        <HeaderTemplate>
                                                            Manage MDT Forms
                                                        </HeaderTemplate>
                                                        <ContentTemplate>
                                                            <asp:UpdatePanel ID="UPanelMDTForms" runat="server">
                                                                <ContentTemplate>
                                                                    <asp:Panel ID="pnlForms" runat="server">
                                                                        <div class="form-box">
                                                                            <h1>
                                                                                <span class="icon">
                                                                                    <img src="../images/Icn_PreCannedDetails.png" alt="" /></span><asp:Label ID="lblFormMessages"
                                                                                        Text="Send Form Message(s)" runat="server"></asp:Label></h1>
                                                                            <div class="form-tbl col-sm-12 nullpadding">
                                                                                <div class="form-horizontal">
                                                                                    <div class="col-sm-6">

                                                                                        <div class="ControlShow">
                                                                                            <div class="form-group col-sm-12 icon-label">
                                                                                                <div class="col-sm-3 col-xs-4 nullpadding">
                                                                                                    <asp:Label ID="Label3" runat="server" Text="Operation" CssClass="MDTfont"></asp:Label><span
                                                                                                        style="color: Red"> *</span>
                                                                                                </div>
                                                                                                <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                    <asp:DropDownList runat="server" ID="ddlForms_Command" CssClass="form-control" ClientInstanceName="ddlForms_Command"
                                                                                                        Width="" ValueType="System.String" CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css"
                                                                                                        CssPostfix="Office2003_Blue" onchange="CheckMsgCmds();HidePopUp();" DropDownStyle="DropDownList">
                                                                                                        <asp:ListItem Text="-Select-" Value="-1"></asp:ListItem>
                                                                                                        <asp:ListItem Text="Add MDT form message" Value="14"></asp:ListItem>
                                                                                                        <asp:ListItem Text="Delete MDT form message" Value="24"></asp:ListItem>
                                                                                                        <asp:ListItem Text="Delete all MDT form messages" Value="34"></asp:ListItem>
                                                                                                    </asp:DropDownList>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div id="trMDTTemplates" runat="server" class="ControlHide">
                                                                                            <div class="form-group col-sm-12">
                                                                                                <div class="col-sm-3 col-xs-4 nullpadding">
                                                                                                    <asp:Label ID="lblSelectForms" runat="server" Text="Form Templates" CssClass="MDTfont"></asp:Label><span
                                                                                                        style="color: Red"> *</span>
                                                                                                </div>
                                                                                                <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                    <asp:DropDownList runat="server" ID="ddlFormTemplate" CssClass="form-control" ClientInstanceName="ddlFormTemplate"
                                                                                                        Width="" ValueType="System.String" CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css"
                                                                                                        CssPostfix="Office2003_Blue" DropDownStyle="DropDownList">
                                                                                                    </asp:DropDownList>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div id="trMDTTemplates1" runat="server" class="ControlHide">
                                                                                            <div class="form-group col-sm-12 ">
                                                                                                <div class="col-sm-3 col-xs-4 nullpadding">
                                                                                                    <asp:Label ID="lblSelectForms1" runat="server" Text="Form Templates" CssClass="MDTfont"></asp:Label><span
                                                                                                        style="color: Red"> *</span>
                                                                                                </div>
                                                                                                <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                    <asp:DropDownList runat="server" ID="ddlFormTemplate1" CssClass="form-control" ClientInstanceName="ddlFormTemplate1"
                                                                                                        Width="" ValueType="System.String" CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css"
                                                                                                        CssPostfix="Office2003_Blue" DropDownStyle="DropDownList">
                                                                                                    </asp:DropDownList>
                                                                                                </div>
                                                                                            </div>

                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <asp:Panel ID="pnlFormsSendCmd" runat="server" CssClass="ControlShow">
                                                                        <div id="tblFormsSendCmd" runat="server">
                                                                            <div class="form-tbl nullpadding col-sm-12">
                                                                                <div class="form-group col-sm-12 icon-label">
                                                                                    <asp:ImageButton ID="imgSendFormMsg" runat="server" ImageUrl="~/images/btn-send-command.jpg"
                                                                                        OnClick="ibtnSendCmd_Click" OnClientClick="return ValidateSendCmd();ClearSchedule();" />

                                                                                    <asp:ImageButton ID="imgScheduleFormMsg" runat="server" ImageUrl="~/images/schedule-a-command.png"
                                                                                        OnClientClick="return ScheduleUserMsg();"></asp:ImageButton>

                                                                                    <asp:ImageButton ID="imgViewScheduleFormMsg" runat="server" ImageUrl="~/images/btn-view-schedules.png"
                                                                                        OnClick="lbtnScheduleListing_Click"></asp:ImageButton>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <asp:Panel ID="pnlFormMsgCmd" runat="server" CssClass="ControlHide">
                                                                            <div class="form-tbl nullpadding col-sm-12">
                                                                                <div class="form-horizontal">
                                                                                    <div class="col-sm-6">
                                                                                        <div class="form-group col-sm-12 icon-label">
                                                                                            <div class="col-sm-4 col-xs-4 nullpadding">
                                                                                                <asp:Label ID="lblFormRetriesPeriod" runat="server" Text="Retries Period"></asp:Label>
                                                                                            </div>
                                                                                            <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                <asp:DropDownList ID="ddlFormsRetriesPeriod" CssClass="form-control" runat="server">
                                                                                                    <asp:ListItem Text="1 Day" Value="1" Selected="True"></asp:ListItem>
                                                                                                    <asp:ListItem Text="3 Days" Value="3"></asp:ListItem>
                                                                                                    <asp:ListItem Text="7 Days" Value="7"></asp:ListItem>
                                                                                                </asp:DropDownList>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group col-sm-12">
                                                                                            <div class="col-sm-4 col-xs-4 nullpadding"></div>
                                                                                            <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                <asp:ImageButton ID="imgFormSchedule" runat="server" ImageUrl="~/images/schedule.png"
                                                                                                    OnClientClick="return ValidateSchedulingOfCommands(true);" OnClick="ibtnSendCmd_Click"></asp:ImageButton>
                                                                                                <asp:ImageButton ID="imgFormCancelSchedule" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                                                    OnClientClick="return CancelScheduleUserMsg();" />
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </asp:Panel>
                                                                        <div id="divFormMsg" runat="server" align="center" style="font-weight: bold;">
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <asp:Panel ID="pnlFormsMsg" runat="server">
                                                                        <div id="grid-dsply">
                                                                            <div id="top">
                                                                                <div class="col-xs-12 gridheader">
                                                                                    <div class="col-sm-4 padding-width-md">
                                                                                        <span class="icon">
                                                                                            <img src="../images/Icn_PreCannedDetails.png" alt="" />
                                                                                        </span>
                                                                                        <span class="txt">
                                                                                            <asp:Label ID="lblMsgs" runat="server" Text="MDT Form message(s)"></asp:Label>
                                                                                        </span>
                                                                                    </div>
                                                                                    <div class="col-sm-8 nullpadding">
                                                                                        <div class="pull-right">
                                                                                            <asp:ImageButton ID="imgAddFormMsg" runat="server" ImageUrl="~/images/btn_AddMsg.png"
                                                                                                OnClientClick="return AddMsgAndUser();" />
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="clearfix"></div>
                                                                            <div class="table-responsive">
                                                                                <dxw:ASPxGridView ID="gvMDTFormMsgs" runat="server" Width="100%" KeyFieldName="MsgNo"
                                                                                    ClientInstanceName="gvMDTFormMsgs" SettingsPager-Mode="ShowPager"
                                                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                                                    EnableTheming="true" Theme="Office2003Blue">
                                                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                            </Images>--%>
                                                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                                        CssPostfix="Office2003_Blue">
                                                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                                        </Header>
                                                                                        <LoadingPanel ImageSpacing="10px">
                                                                                        </LoadingPanel>
                                                                                        <PagerBottomPanel CssClass="PageFooter">
                                                                                        </PagerBottomPanel>
                                                                                        <PagerTopPanel CssClass="PageFooter">
                                                                                        </PagerTopPanel>
                                                                                    </Styles>
                                                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                                        PageSize="5">
                                                                                    </SettingsPager>
                                                                                    <Columns>
                                                                                        <dxw:GridViewDataColumn FieldName="Title" Caption="MDTFormTitle" Width="25%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                                    <tr>
                                                                                                        <td style="height: 20px; padding-top: 5px">
                                                                                                            <asp:Label ID="lblMsgTitle" runat="server" Text="Title"></asp:Label>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                </table>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblMDTFormTitle" runat="server" Text='<%# Eval("Title") %>' />
                                                                                            </DataItemTemplate>
                                                                                            <Settings AllowAutoFilter="True" />
                                                                                        </dxw:GridViewDataColumn>
                                                                                        <dxw:GridViewDataColumn FieldName="MsgName" Caption="MDTFormMessage" Width="75%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                                    <tr>
                                                                                                        <td style="height: 20px; padding-top: 5px">
                                                                                                            <asp:Label ID="lblMsgName" runat="server" Text="Message"></asp:Label>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                </table>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:HiddenField ID="hdnFormMsgId" runat="server" Value='<%# Eval("MsgNo")+"-"+Eval("FormMsgId")+"-"+Eval("MsgName") %>' />
                                                                                                <asp:Label ID="lblMDTFormMessage" runat="server" Text='<%# Eval("MsgName") %>' />
                                                                                            </DataItemTemplate>
                                                                                            <Settings AllowAutoFilter="True" />
                                                                                        </dxw:GridViewDataColumn>
                                                                                        <dxw:GridViewDataTextColumn Caption="Edit" Width="3%" Name="Edit" HeaderStyle-HorizontalAlign="Center"
                                                                                            CellStyle-HorizontalAlign="Center">
                                                                                            <HeaderTemplate>
                                                                                            </HeaderTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:LinkButton ID="lbtnEditForm" runat="server" AlternateText="Update" ToolTip="Click here to Update"
                                                                                                    Enabled='<%# Convert.ToBoolean(Eval("IsAssigned")) %>' OnClick="lbtnEdit_click"
                                                                                                    OnClientClick="CheckTapPanel();ShowPopUp();" ImageAlign="Middle" CommandArgument='<%#Eval("MsgNo") +"-"+Eval("TypeName")%>'>
                                                                                    <img src='<%# Convert.ToBoolean(Eval("IsAssigned"))?"../images/icn-edit.gif":"../images/editDisabledS.png" %>' alt="" /></asp:LinkButton>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <dxw:GridViewDataTextColumn Caption="Delete" Width="3%" HeaderStyle-HorizontalAlign="Center"
                                                                                            CellStyle-HorizontalAlign="Center">
                                                                                            <HeaderTemplate>
                                                                                            </HeaderTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:LinkButton ID="lbtnDeleteForm" runat="server" AlternateText="Delete" ToolTip="Click here to Delete"
                                                                                                    OnClick="lbtnDeleteForm_click" OnClientClick="return confirm('Are you sure want to delete?')"
                                                                                                    Enabled='<%# Convert.ToBoolean(Eval("IsAssigned")) %>' CommandArgument='<%#Eval("MsgNo") %>'>
                                                                                     <img src='<%# Convert.ToBoolean(Eval("IsAssigned"))?"../images/delete-icon.gif":"../images/deleteDisabledS.png" %>' alt="" /></asp:LinkButton>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                    </Columns>
                                                                                    <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                                                    <SettingsText EmptyDataRow=" No MDT Form Messages found" />
                                                                                </dxw:ASPxGridView>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <div class="clearfix"></div>
                                                                    <asp:Panel ID="pnlAddFormMsg" runat="server" CssClass="ControlHide">
                                                                        <div class="form-box">
                                                                            <h1>
                                                                                <span class="icon">
                                                                                    <img src="../images/Icn_PreCannedDetails.png" alt="" /></span><asp:Label ID="Label2"
                                                                                        Text="Form Message Information" runat="server"></asp:Label></h1>
                                                                            <div class="form-tbl col-sm-12 nullpadding">
                                                                                <div class="form-horizontal">
                                                                                    <div class="col-sm-6">
                                                                                        <div id="trMDTTitle" runat="server" class="ControlShow">
                                                                                            <div class="form-group col-sm-12 icon-label">
                                                                                                <div class="col-sm-2 col-xs-4 nullpadding">
                                                                                                    <asp:Label ID="lblTitleCaption" CssClass="MDTfont" runat="server" Text="Title"></asp:Label>
                                                                                                    <span style="color: Red">*</span>
                                                                                                </div>
                                                                                                <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                    <asp:TextBox ID="txtTitle" CssClass="form-control" runat="server" MaxLength="15" Width=""></asp:TextBox>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div id="trMDTFormTypes" runat="server" class="ControlHide">
                                                                                            <div class="form-group col-sm-12">
                                                                                                <div class="col-sm-2 col-xs-4 nullpadding">
                                                                                                    <asp:Label ID="lblFormType" CssClass="MDTfont" runat="server" Text="Types"></asp:Label>
                                                                                                    <span style="color: Red">*</span>
                                                                                                </div>
                                                                                                <div class="col-sm-6 col-xs-8 nullpadding">
                                                                                                    <div class="col-xs-6 nullpadding">
                                                                                                        <asp:RadioButton ID="rdbSingleForm" CssClass="radio" runat="server" GroupName="grpFormType"
                                                                                                            Text="Single" onclick="ShowOrHideQuestion(1)" />
                                                                                                    </div>
                                                                                                    <div class="col-xs-6 nullpadding">
                                                                                                        <asp:RadioButton ID="rdbMultipleForm" CssClass="radio" runat="server" Checked="true" GroupName="grpFormType" Text="Multiple"
                                                                                                            onclick="ShowOrHideQuestion(2)" />
                                                                                                    </div>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div id="trMDTQuestion" runat="server" class="ControlHide">
                                                                                            <div class="form-group col-sm-12">
                                                                                                <div class="col-sm-2 col-xs-4 nullpadding">
                                                                                                    <asp:Label ID="lblQuestionCaption" CssClass="MDTfont" runat="server" Text="Question"></asp:Label><span
                                                                                                        style="color: Red">*</span>
                                                                                                </div>
                                                                                                <div class="col-sm-8 col-xs-8 nullpadding">
                                                                                                    <asp:TextBox ID="txtQuestion" runat="server" CssClass="form-control" MaxLength="75" Width="" TextMode="MultiLine"
                                                                                                        Rows="3" Columns="25" onkeypress="return allowChar(event);" onchange="return validateAllowChar();"
                                                                                                        onpaste="return false;"></asp:TextBox>
                                                                                                    <asp:LinkButton ID="lnkLegend" runat="server" Text="Help?" OnClientClick="OnMoreInfoClick(this,1); return false;"></asp:LinkButton>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div id="trMDTQuestion1" runat="server" class="ControlShow">
                                                                                            <div class="form-group col-sm-12">
                                                                                                <div class="col-sm-2 col-xs-4 nullpadding">
                                                                                                    <asp:Label ID="lblQuestionCaption1" CssClass="MDTfont" runat="server" Text="Question"></asp:Label><span
                                                                                                        style="color: Red">*</span>
                                                                                                </div>
                                                                                                <div class="col-sm-8 col-xs-8 nullpadding">
                                                                                                    <asp:TextBox ID="txtLine1" runat="server" CssClass="form-control" MaxLength="30" Width="" Rows="1" Columns="30"
                                                                                                        onkeypress="return allowChar(event);" onpaste="return false;"></asp:TextBox><br />
                                                                                                    <asp:TextBox ID="txtLine2" runat="server" CssClass="form-control" MaxLength="30" Width="" Rows="1" Columns="30"
                                                                                                        onkeypress="return allowChar(event);" onpaste="return false;"></asp:TextBox><br />
                                                                                                    <asp:TextBox ID="txtLine3" runat="server" CssClass="form-control" MaxLength="30" Width="" Rows="1" Columns="30"
                                                                                                        onkeypress="return allowChar(event);" onpaste="return false;"></asp:TextBox>

                                                                                                    <asp:LinkButton ID="lnkLegend1" runat="server" Text="Help?" OnClientClick="OnMoreInfoClick(this,2); return false;"></asp:LinkButton>
                                                                                                </div>
                                                                                            </div>
                                                                                            <div class="form-group col-sm-12">
                                                                                                <div class="col-sm-2 col-xs-4 nullpadding"></div>
                                                                                                <div class="col-sm-8 col-xs-8 nullpadding">
                                                                                                    <asp:ImageButton ID="imgSaveFrmMsg" Style="padding-top: 5px" runat="server" ImageUrl="~/images/btn-save.jpg"
                                                                                                        OnClientClick="return validateMDTForms();" OnClick="imgSaveFrmMsg_Click" />
                                                                                                    <asp:ImageButton ID="imgCancelFrmMsg" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                                                        OnClientClick="return CancelMsgSend();" />
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </ContentTemplate>
                                                    </cc1:TabPanel>
                                                    <cc1:TabPanel ID="tpMDTHistory" runat="server" HeaderText="MDT History">
                                                        <ContentTemplate>
                                                            <asp:UpdatePanel ID="UpdatePanelMDT3" runat="server">
                                                                <ContentTemplate>
                                                                    <asp:Panel ID="pnlMDTHistory" runat="server">
                                                                        <div class="form-tbl col-sm-12 col-Geozone">
                                                                            <div class="form-horizontal">
                                                                                <div class="col-sm-12 col-md-11 col-lg-9 icon-label">
                                                                                    <div class="col-xs-3 col-sm-1 col-md-1 col-lg-1 nullpadding icon-img">
                                                                                        <asp:Image ID="imgDurationFrom" runat="server" ImageUrl="../images/calendar-rht-icon.gif"
                                                                                            AlternateText="Duration From" /><asp:HiddenField runat="server" ID="hdnDateFormat"
                                                                                                Value="dd-MMM-yyyy" />
                                                                                        <span class="MDTfont">From</span>
                                                                                    </div>
                                                                                    <div class="col-xs-5 col-sm-2 col-md-1 col-lg-1 padding-width-sm">
                                                                                        <asp:TextBox ID="txtStartDate" runat="server" oncopy="return false" oncut="return false"
                                                                                            onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false" onpaste="return false"
                                                                                            CssClass="form-control" Width="" ToolTip="dd-MMM-yyyy"></asp:TextBox>
                                                                                    </div>
                                                                                    <div class="col-xs-2 col-sm-1 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                                                        <asp:DropDownList ID="ddlFromHours" runat="server" CssClass="time form-control" onchange="CheckTimePicker(this,'tcManageMDT_tpMDTHistory_ddlFromAMPM');"
                                                                                            Width="">
                                                                                            <asp:ListItem>00</asp:ListItem>
                                                                                            <asp:ListItem>01</asp:ListItem>
                                                                                            <asp:ListItem>02</asp:ListItem>
                                                                                            <asp:ListItem>03</asp:ListItem>
                                                                                            <asp:ListItem>04</asp:ListItem>
                                                                                            <asp:ListItem>05</asp:ListItem>
                                                                                            <asp:ListItem>06</asp:ListItem>
                                                                                            <asp:ListItem>07</asp:ListItem>
                                                                                            <asp:ListItem>08</asp:ListItem>
                                                                                            <asp:ListItem>09</asp:ListItem>
                                                                                            <asp:ListItem>10</asp:ListItem>
                                                                                            <asp:ListItem>11</asp:ListItem>
                                                                                            <asp:ListItem>12</asp:ListItem>
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                    <div class="col-xs-2 col-sm-1 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                                                        <asp:DropDownList ID="ddlFromAMPM" runat="server" CssClass="time form-control" Width="50px">
                                                                                            <asp:ListItem>AM</asp:ListItem>
                                                                                            <asp:ListItem>PM</asp:ListItem>
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                    <div class="col-xs-3 col-sm-1 col-md-1 col-lg-1 nullpadding icon-img">
                                                                                        <asp:Image ID="imgDurationTo" runat="server" ImageUrl="../images/calendar-lft-icon.gif"
                                                                                            AlternateText="Duration To" />
                                                                                        <span class="MDTfont">To</span>
                                                                                    </div>
                                                                                    <div class="col-xs-5 col-sm-2 col-md-1 col-lg-1 padding-width-sm">
                                                                                        <asp:TextBox ID="txtEndDate" runat="server" oncopy="return false" oncut="return false"
                                                                                            CssClass="form-control" onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false"
                                                                                            onpaste="return false" ToolTip="dd-MMM-yyyy" Width=""></asp:TextBox>
                                                                                    </div>
                                                                                    <div class="col-xs-2 col-sm-1 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                                                        <asp:DropDownList ID="ddlToHours" runat="server" Width="" CssClass="time form-control" onchange="CheckTimePicker(this,'tcManageMDT_tpMDTHistory_ddlToAMPM');">
                                                                                            <asp:ListItem>00</asp:ListItem>
                                                                                            <asp:ListItem>01</asp:ListItem>
                                                                                            <asp:ListItem>02</asp:ListItem>
                                                                                            <asp:ListItem>03</asp:ListItem>
                                                                                            <asp:ListItem>04</asp:ListItem>
                                                                                            <asp:ListItem>05</asp:ListItem>
                                                                                            <asp:ListItem>06</asp:ListItem>
                                                                                            <asp:ListItem>07</asp:ListItem>
                                                                                            <asp:ListItem>08</asp:ListItem>
                                                                                            <asp:ListItem>09</asp:ListItem>
                                                                                            <asp:ListItem>10</asp:ListItem>
                                                                                            <asp:ListItem>11</asp:ListItem>
                                                                                            <asp:ListItem>12</asp:ListItem>
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                    <div class="col-xs-2 col-sm-1 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                                                        <asp:DropDownList ID="ddlToAMPM" runat="server" CssClass="time" Width="50px">
                                                                                            <asp:ListItem>AM</asp:ListItem>
                                                                                            <asp:ListItem>PM</asp:ListItem>
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                    <div class="col-xs-4 col-sm-2 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                                                        <span class="MDTfont">Communication</span>
                                                                                    </div>
                                                                                    <div class="col-xs-5 col-sm-4 col-md-1 col-lg-1 padding-width-sm">
                                                                                        <asp:DropDownList ID="ddlCommunication" AutoPostBack="true" CssClass="form-control" runat="server" Width=""
                                                                                            onchange="ShowPopUp()" OnSelectedIndexChanged="ddlCommunication_SelectedIndexChanged">
                                                                                            <asp:ListItem Selected="True">All</asp:ListItem>
                                                                                            <asp:ListItem>Incoming</asp:ListItem>
                                                                                            <asp:ListItem>Outgoing</asp:ListItem>
                                                                                        </asp:DropDownList>
                                                                                    </div>

                                                                                    <div class="col-xs-12 col-sm-3 col-md-2 col-lg-2 padding-width-sm icon-img">
                                                                                        <asp:ImageButton ID="btnView" ImageUrl="~/images/btn-update-results.jpg" runat="server"
                                                                                            OnClick="btnView_Click" OnClientClick="ShowPopUp();" />
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <div class="clearfix"></div>
                                                                        <div id="grid-dsply">
                                                                            <div id="top">
                                                                                <div class="col-sm-12 pnlAlign">
                                                                                    <div class="left-col">
                                                                                        <h1>
                                                                                            <asp:Label ID="lblMDTHistory" runat="server" Text=""></asp:Label></h1>
                                                                                    </div>
                                                                                    <div class="right-col">
                                                                                        <span class="dropdown">
                                                                                            <dxw:ASPxComboBox ID="ASPxCboExport3" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                                                                ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                                                CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                                                EnableTheming="true" Theme="Office2003Blue">
                                                                                                <Items>
                                                                                                    <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                                                    <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                                                    <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                                                    <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                                                    <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                                                </Items>
                                                                                            </dxw:ASPxComboBox>
                                                                                        </span><span class="txt">
                                                                                            <asp:ImageButton ID="btnExportHistory" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                                                                OnClick="btnExportHistory_Click" OnClientClick="SetExportHiddenValue();" />
                                                                                        </span>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="clearfix"></div>
                                                                            <div class="table-responsive">
                                                                                <dxw:ASPxGridView ID="gvMDTHistory" ClientInstanceName="gvMDTHistory" runat="server" Width="100%"
                                                                                    KeyFieldName="MessageInID" Settings-ShowFilterRow="true" AutoGenerateColumns="False"
                                                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                                                                    EnableTheming="true" Theme="Office2003Blue" OnHtmlRowCreated="gvMDTHistory_OnHtmlRowCreated">
                                                                                    <Settings UseFixedTableLayout="true" />
                                                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                                    Width="11px" />
                                                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                                    Width="11px" />
                                                                            </Images>--%>
                                                                                    <SettingsLoadingPanel Mode="ShowAsPopup" />
                                                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                                        CssPostfix="Office2003_Blue">
                                                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                                        </Header>
                                                                                        <LoadingPanel ImageSpacing="10px">
                                                                                        </LoadingPanel>
                                                                                        <PagerBottomPanel CssClass="PageFooter">
                                                                                        </PagerBottomPanel>
                                                                                        <PagerTopPanel CssClass="PageFooter">
                                                                                        </PagerTopPanel>
                                                                                    </Styles>
                                                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                                                    </SettingsPager>
                                                                                    <Columns>
                                                                                        <%-- <dxw:GridViewDataTextColumn FieldName="MessageInID" Caption="AutoID" Visible="false"
                                                                            VisibleIndex="0">
                                                                            <DataItemTemplate>
                                                                                <asp:Label ID="lblAutoID" runat="server" Text='<%# Eval("MessageInID") %> '></asp:Label>
                                                                            </DataItemTemplate>
                                                                        </dxw:GridViewDataTextColumn>--%>
                                                                                        <dxw:GridViewDataTextColumn FieldName="DeviceID" VisibleIndex="0" Width="10%" Caption="Device ID">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <%-- <span class="icon">
                                                                                    <asp:Image ID="imgDeviceID" runat="server" ImageUrl="../images/device-icon.gif" ImageAlign="top"
                                                                                        AlternateText="" /></span>--%>
                                                                                                <span class="label">
                                                                                                    <asp:Label ID="lblDeviceIDCaption" runat="server" Text="Device Id"></asp:Label></span>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblBoxID" runat="server" Text='<%# Eval("DeviceID") %> '></asp:Label>
                                                                                            </DataItemTemplate>
                                                                                            <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <dxw:GridViewDataTextColumn FieldName="VehicleDescription" VisibleIndex="1" Caption="Name"
                                                                                            Width="20%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <%--<span class="icon">
                                                                                    <asp:Image ID="imgVehicleName" runat="server" ImageUrl="..\Images\icn-vehicle-name.gif"
                                                                                        AlternateText="" align="top" /></span> --%><span class="label">
                                                                                            <asp:Label ID="lblVehicleNameCaption" runat="server" Text="Vehicle Name"></asp:Label></span>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblVehicleName" runat="server" Text='<%# Eval("VehicleDescription")%>'>
                                                                                                </asp:Label>
                                                                                            </DataItemTemplate>
                                                                                            <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <%--<dxw:GridViewDataTextColumn FieldName="Latitude" VisibleIndex="0" Visible="False">
                                                                            <DataItemTemplate>
                                                                                <asp:Label ID="lblLatitude" runat="server" Text='<%# Eval("Latitude") %> '></asp:Label>
                                                                            </DataItemTemplate>
                                                                        </dxw:GridViewDataTextColumn>
                                                                        <dxw:GridViewDataTextColumn FieldName="Longitude" VisibleIndex="0" Visible="False">
                                                                            <DataItemTemplate>
                                                                                <asp:Label ID="lblLongitude" runat="server" Text='<%# Eval("Longitude") %> '></asp:Label>
                                                                            </DataItemTemplate>
                                                                        </dxw:GridViewDataTextColumn>--%>
                                                                                        <dxw:GridViewDataTextColumn FieldName="TimestampSort" VisibleIndex="2" Caption="Date & Time"
                                                                                            Width="15%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <%--<span class="icon">
                                                                                    <asp:Image runat="server" ID="imgDateTimeIcon" ImageUrl="..\Images\icn-date-time.gif"
                                                                                        AlternateText="" ImageAlign="top" /></span> --%><span class="label">
                                                                                            <asp:Label ID="lblDateTimeCaption" runat="server" Text="Date Time"></asp:Label></span>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblDateTime" runat="server" Text='<%# Eval("TimestampDisp") %> '></asp:Label>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <dxw:GridViewDataTextColumn FieldName="TimestampDisp" VisibleIndex="3" Caption="Date & Time"
                                                                                            Width="0%" Visible="false">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <span class="icon">
                                                                                                    <asp:Image runat="server" ID="imgDateTimeIcon" ImageUrl="..\Images\icn-date-time.gif"
                                                                                                        AlternateText="" ImageAlign="top" /></span> <span class="label">
                                                                                                            <asp:Label ID="lblDateTimeCaption" runat="server" Text="Date Time"></asp:Label></span>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblDateTime" runat="server" Text='<%# Eval("TimestampDisp") %> '></asp:Label>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <dxw:GridViewDataTextColumn FieldName="Address" VisibleIndex="4" CellStyle-Wrap="True"
                                                                                            Width="20%">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <%-- <span class="icon">
                                                                                    <asp:Image ImageUrl="..\Images\address-icon.gif" AlternateText="" ImageAlign="top"
                                                                                        runat="server" ID="imgAddressIcon" /></span> --%><span class="label">
                                                                                            <asp:Label ID="lblStreetAddressCaption" runat="server" Text="Address"></asp:Label></span>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lblAddress" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Address")%>'></asp:Label>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <%--  <dxw:GridViewDataTextColumn FieldName="Message" VisibleIndex="4" Visible="False">
                                                                            <DataItemTemplate>
                                                                                <asp:Label ID="lblMessage" runat="server" Text='<%# Eval("Message") %>'>
                                                                                </asp:Label>
                                                                            </DataItemTemplate>
                                                                        </dxw:GridViewDataTextColumn>--%>
                                                                                        <dxw:GridViewDataTextColumn FieldName="MessageDetails" VisibleIndex="4" Caption="Message Details"
                                                                                            Width="20%" CellStyle-Wrap="True">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <%--<span class="icon">
                                                                                    <asp:Image ID="imgMessageIcon" ImageUrl="..\Images\icn-message-details.gif" AlternateText=""
                                                                                        align="top" runat="server" /></span>--%>
                                                                                                <span class="label">
                                                                                                    <asp:Label ID="lblMsgDetailsCaption" runat="server" Text="Message Details"></asp:Label></span>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lbtMsgDetails" runat="server" Text='<%# Eval("MessageDetails") %>'>
                                                                                                </asp:Label>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                        <dxw:GridViewDataTextColumn FieldName="MDTMsgType" VisibleIndex="5" Caption="Communication"
                                                                                            Width="10%" CellStyle-Wrap="True">
                                                                                            <HeaderCaptionTemplate>
                                                                                                <%--<span class="icon">
                                                                                    <asp:Image ID="imgMessageIcon" ImageUrl="..\Images\icn-message-details.gif" AlternateText=""
                                                                                        align="top" runat="server" /></span>--%>
                                                                                                <span class="label">
                                                                                                    <asp:Label ID="lblMSGTypeCaption" runat="server" Text="Communication"></asp:Label></span>
                                                                                            </HeaderCaptionTemplate>
                                                                                            <DataItemTemplate>
                                                                                                <asp:Label ID="lbtMsgType" runat="server" Text='<%# Eval("MDTMsgType") %>'>
                                                                                                </asp:Label>
                                                                                            </DataItemTemplate>
                                                                                        </dxw:GridViewDataTextColumn>
                                                                                    </Columns>
                                                                                    <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="145" />
                                                                                    <SettingsText EmptyDataRow="No data matching to the search criteria" />
                                                                                    <%--  <ClientSideEvents SelectionChanged="function(s, e) {OnGridSelectionChanged(); }"
                                                                        EndCallback="function(s, e) { CheckMapItBoxes();SetDivPosition();}" />--%>
                                                                                    <Settings ShowFilterRow="true" ShowFilterRowMenu="true" />
                                                                                </dxw:ASPxGridView>
                                                                            </div>
                                                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter3" runat="server" GridViewID="gvMDTHistory"
                                                                                ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
                                                                                    \viewkind4\uc1\pard\qc\b\fs28 History Details\par\pard\par\par}">
                                                                                <PageFooter Right="[Page # of Pages #]">
                                                                                </PageFooter>
                                                                            </dxw:ASPxGridViewExporter>
                                                                        </div>
                                                                    </asp:Panel>
                                                                </ContentTemplate>
                                                                <Triggers>
                                                                    <asp:PostBackTrigger ControlID="btnExportHistory" />
                                                                </Triggers>
                                                            </asp:UpdatePanel>
                                                        </ContentTemplate>
                                                    </cc1:TabPanel>
                                                </cc1:TabContainer>
                                            </div>
                                    </div>
                                    </asp:panel>
                                        <asp:Timer ID="tmrCheck" runat="server" Enabled="false" OnTick="tmrCheck_Tick"></asp:Timer>
                                    <div class="clear clearfix"></div>
                                </div>
                                <!-- Main Content Ends Here -->
                                <div id="left"></div>
                                <div class="clear clearfix"></div>
                            </div>
                            <div id="right"></div>
                            <div class="clear clearfix"></div>
                        </div>
                    </div>
                </ContentTemplate>
                <Triggers>
                    <%-- <asp:PostBackTrigger ControlID="ibtnAddMsg" />--%>
                </Triggers>
            </asp:UpdatePanel>
            <asp:Panel ID="Panel2" runat="server">
                <dxw:ASPxPopupControl ID="popup" runat="server" Width="525px" Height="80px" AllowDragging="True"
                    Border-BorderColor="#99BBE8" BackColor="#dfe9f5" HeaderText="" EnableDefaultAppearance="False"
                    ShowCloseButton="true" CloseAction="CloseButton" PopupHorizontalAlign="OutsideLeft"
                    Top="150">
                    <ContentStyle CssClass="content">
                    </ContentStyle>
                    <ContentCollection>
                        <dxw:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
                            <asp:Panel runat="server" ID="pnlInfoWindow" Style="width: 100%; background-color: #DFE9F5;">
                                <table cellpadding="0" cellspacing="0" width="99%" class="popup">
                                    <tr>
                                        <td id="NotificationPnltopl" runat="server" class="top-l">&nbsp;
                                        </td>
                                        <td class="top-m">&nbsp;
                                        </td>
                                        <td id="NotificationPnltopr" runat="server" class="top-r">&nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td id="NotificationPnlLeft" runat="server" class="left">&nbsp;
                                        </td>
                                        <td>
                                            <div class="top">
                                                <h1>
                                                    <asp:Label runat="server" ID="lblinfopnl" Text="Help"></asp:Label>
                                                </h1>
                                                <div class="clear clearfix">
                                                </div>
                                            </div>
                                            <div class="popup-cont">
                                                <table class="form-tbl" width="100%" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <td style="padding: 0px; margin: 0px;">
                                                            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                                <tr id="trMDTFormHelp1" class="ControlShow">
                                                                    <td style="line-height: 150%">
                                                                        <b>MDT form examples</b><br />
                                                                        * Staff name ------<br />
                                                                        * Staff number ------<br />
                                                                        <br />
                                                                        <b>Note</b><br />
                                                                        * Question field allows upto 75 characters.<br />
                                                                        * '-' allows alphanumeric input in the response.<br />
                                                                        * Question must contain atleast one '-' to receive response.<br />
                                                                        * Total no. of characters / numbers in the response depends on the no. of '-' in the question.
                                                                    </td>
                                                                </tr>
                                                                <tr id="trMDTFormHelp2" class="ControlHide">
                                                                    <td style="line-height: 150%">
                                                                        <b>MDT form examples</b><br />
                                                                        * Staff name ------<br />
                                                                        * Staff number -----<br />
                                                                        <br />
                                                                        <b>Note</b><br />
                                                                        * In question field allows upto 90 characters totally. Each field allow upto 30 characters.<br />
                                                                        * '-' allows alphanumeric input in the response.<br />
                                                                        * Question must contain atleast one '-'  to receive response.<br />
                                                                        * Total no. of characters / numbers in the response depends on the no. of '-' in the question.
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </td>
                                        <td id="NotificationPnlRight" runat="server" class="right">&nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td id="NotificationPnlbottoml" runat="server" class="bottom-l">&nbsp;
                                        </td>
                                        <td class="bottom-m">&nbsp;
                                        </td>
                                        <td id="NotificationPnlbottomr" runat="server" class="bottom-r">&nbsp;
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </dxw:PopupControlContentControl>
                    </ContentCollection>
                    <Border BorderColor="#99BBE8" />
                </dxw:ASPxPopupControl>
            </asp:Panel>
            <!-- Content Ends Here -->
            <asp:HiddenField ID="IsScheduleCmds" runat="server" Value="false" />
            <asp:HiddenField ID="hdnSelectedMsgIds" runat="server" />
            <asp:HiddenField ID="hdnActiveTab" runat="server" />
            <asp:HiddenField ID="hdnExport" runat="server" Value="0" />
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                <center>
                <br />
                <img alt="Please Wait ..." src="../images/47.gif" /><br />
                <br />
                <asp:Label ID="lbl_msg12" Text="Processing... Please Wait..." runat="server" CssClass="specialdisplay"></asp:Label>
                <br />
                <br />
            </center>
            </asp:Panel>
        </form>
    </div>
    <uc2:Footer ID="ucFooter" runat="server" />

    <script src="../js/myformvalidations.js" type="text/javascript"></script>
    <script src="../js/DateValidations.js" type="text/javascript" lang="javascript"></script>
    <script type="text/javascript">
        var keyValue;
        function OnMoreInfoClick(element, id) {
            if (id == 1) {
                document.getElementById('trMDTFormHelp1').className = "ControlShow";
                document.getElementById('trMDTFormHelp2').className = "ControlHide";
            }
            else {
                document.getElementById('trMDTFormHelp1').className = "ControlHide";
                document.getElementById('trMDTFormHelp2').className = "ControlShow";
            }
            popup.ShowAtElement(element);
        }
        function popup_Shown(s, e) {
            popup.ShowAtPos(s, e);
        }
    </script>
</body>
</html>
<%--<b>MDT form examples</b><br />
* Staff name ------<br />
* Staff number ------<br />
<br />
<b>Note</b><br />
* Question field allows upto 75 characters.<br />
* '-' allows alphanumeric input and '$' allows only numbers in the response.<br />
* Question must contain atleast one '-' or '$' to receive response.<br />
* Total no. of characters / numbers in the response depends on the no. of '-' /
'$' in the question.--%>