<%@ control language="VB" autoeventwireup="false" inherits="PCC_DC_CC_ADUsers, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Src="~/RCC/Exchange/CC/AccountGroupActions.ascx" TagName="AccountGroupActions" TagPrefix="EM" %>
<%@ Register Src="~/PCC/DC/CC/ADUserGroupActions.ascx" TagName="ADUserGroupActions" TagPrefix="EM" %>
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI" TagPrefix="cc1" %>

<script type='text/javascript' language='javascript'>
    function ShowHideSendEmail() {
        var cb = $get('<%= ChBx_SendEmail.ClientID %>');
        var trSendEmail = $get('<%= Tr_SendEmail.ClientID %>');
        if (cb.checked) {
            ValidatorEnable($get('<%= RFV_SendEmail.ClientID %>'), true);
            trSendEmail.style.display = '';
        }
        else {
            ValidatorEnable($get('<%= RFV_SendEmail.ClientID %>'), false);
            trSendEmail.style.display = 'none';
        }
        return false;
    }
</script>

<asp:Panel ID="Pnl_Search_Outer" runat="server">
    <div class="row">
        <div class="col-xs-12 Div_OpsRow" id="Tbl_Operations" runat="server">
            <div class="card">
                <div class="header">
                    <div class="displayInlineBlock">
                        <h3><%= Resources.Content.GN00001320%>      <%--Operations--%></h3>
                    </div>
                    <asp:LinkButton ID="Btn_GoBack" runat="server" Text="<%$ Resources:Content,gobackHosting %>" CausesValidation="false"
                        class="btn btn-primary waves-effect pull-right m-t--4px" />
                </div>
                <div class="body">
                    <div class="row">
                        <div class="col-xs-12">
                            <asp:Button ID="Btn_AddUser" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,DEV1101%>" />
                            <asp:Button ID="Btn_AddBulkUser" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,strAddBulkUsers%>" />
                            <asp:Button ID="Btn_UpdateBulkUser" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,strUpdateBulkUsers%>" />
                            <asp:Button ID="Btn_ADUserGroupActions" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,String7772%>" />
                            <asp:Button ID="Btn_ExportUserToExcel" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,Ex001%>" />
                            <asp:Button ID="Btn_RemoveAll" runat="server" Custom1="Custom" Style="display: none" Text="<%$ Resources:Content,GN0000278%>" class="btn btn-primary waves-effect btnAction" />
                            <EM:ConfirmButtonExtender ID="CBE_RemoveAll" runat="server" TargetControlID="Btn_RemoveAll" />

                            <asp:Button ID="Btn_Enable" runat="server" class="btn btn-primary waves-effect btnAction" Custom1="Custom" Style="display: none" Text="<%$ Resources:Content,GN00001024%>" />
                            <asp:Button ID="Btn_Disable" runat="server" class="btn btn-primary waves-effect btnAction" Custom1="Custom" Style="display: none" Text="<%$ Resources:Content,GN00001025%>" />
                            <asp:Button ID="Btn_Unlock" runat="server" class="btn btn-primary waves-effect btnAction" Custom1="Custom" Style="display: none" Text="<%$ Resources:Content,GN0000630%>" />
                            <asp:Button ID="Btn_ExportLockedExpiredUsers" runat="server" CssClass="btn btn-primary waves-effect" Text='<%$ Resources:Content,ExportLockedExpiredUsers%>' />
                        </div>
                        <div class="col-sm-3 col-xs-12" custom1="Custom" style="display: none">
                            <asp:DropDownList ID="DDL_LogOnHours" runat="server" class="pull-right" AutoPostBack="true" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <%--Start Search Box--%>
    <asp:Panel ID="Pnl_Search_Inner" DefaultButton="Btn_Search" runat="server">
        <div class="row">
            <div class="panel-group search-panel" id="AS_ADUsers" role="tablist" aria-multiselectable="true">
                <div class="col-xs-12" role="tab" id="SH_ADUsers">
                    <div class="card">
                        <div class="header" role="button" data-toggle="collapse" data-parent="#AS_ADUsers" href="#<%= CSB_ADUsers.ClientID%>" aria-expanded="true" aria-controls="SH_ADUsers">
                            <h3>
                                <%= Resources.Content.GN0000395%>
                            </h3>
                        </div>
                        <div id="CSB_ADUsers" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_ADUsers" aria-expanded="false">
                            <div class="row">
                                <div class="col-md-3 col-sm-6 col-xs-12" runat="server" id="td_Owner">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="DDl_Owner" runat="server" onchange="setOwnerCookie(this)"></asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12" id="td_DC" runat="server">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="DDl_DC" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12" id="td_SubscriptionOptions" runat="server">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="Ddl_SubscriptionOptions" runat="server"></asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="Ddl_Country" runat="server"></asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12" id="td_OUName" runat="server">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_OUName" runat="server"></asp:TextBox>
                                            <asp:Label ID="Label7" runat="server" EnableViewState="false" Text="<%$ Resources:Content,DGN1110608%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_DisplayName" runat="server"></asp:TextBox>
                                            <asp:Label ID="LB_LogonName" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001113%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_UPN" runat="server"></asp:TextBox>
                                            <asp:Label ID="Label15" runat="server" EnableViewState="false" Text="<%$ Resources:Content,UPNorEmail%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12" id="TR_CustomerId" runat="server">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_CustomerId" runat="server"></asp:TextBox>
                                            <asp:Label ID="Lbl_Search_WHMCS_Id_Title" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000715%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12" id="TR_CustName" runat="server">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_CustName" runat="server"></asp:TextBox>
                                            <asp:Label ID="Label10" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000268%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12" id="TR_CustCompany" runat="server">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_CustCompany" runat="server"></asp:TextBox>
                                            <asp:Label ID="Label13" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001077%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12" id="td_DomainName" runat="server">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_DomainName" runat="server"></asp:TextBox>
                                            <asp:Label ID="Label14" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN000125%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12" id="Td_SAMlabel" runat="server">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_SAM" runat="server" MaxLength="100"></asp:TextBox>
                                            <asp:Label ID="Label16" runat="server" EnableViewState="false" Text="<%$ Resources:Content,strSAMAccountName%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_Address" runat="server" MaxLength="200"></asp:TextBox>
                                            <asp:Label ID="Lnl_strAddress" runat="server" Text="<%$ Resources:Content,strAddress %>" EnableViewState="false" CssClass="form-label" />
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_City" runat="server" MaxLength="70"></asp:TextBox>
                                            <asp:Label ID="Label1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000880%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_State" runat="server" MaxLength="70"></asp:TextBox>
                                            <asp:Label ID="Label3" runat="server" EnableViewState="false" Text="<%$ Resources:Content,DEV1130%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_Zip" runat="server" MaxLength="40"></asp:TextBox>
                                            <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001081%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_Phone" runat="server" MaxLength="80"></asp:TextBox>
                                            <asp:Label ID="Label5" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00012%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_JobTitle" runat="server" MaxLength="80"></asp:TextBox>
                                            <asp:Label ID="Label6" runat="server" EnableViewState="false" Text="<%$ Resources:Content,DGN1110358%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_OPCompany" runat="server" MaxLength="80"></asp:TextBox>
                                            <asp:Label ID="Label8" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001134%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_Department" runat="server" MaxLength="80"></asp:TextBox>
                                            <asp:Label ID="Label9" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000374%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_Office" runat="server" MaxLength="80"></asp:TextBox>
                                            <asp:Label ID="Label11" runat="server" EnableViewState="false" Text="<%$ Resources:Content,DGN1110359%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="DDL_UserStatus" runat="server">
                                            <asp:ListItem Text="<%$ Resources:Content, SelectStatus %>" Value="0" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,USM0166%>" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,USM0165%>" Value="2"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,LoginDisabled%>" Value="3"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,LoginEnabled%>" Value="4"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,M0125%>" Value="5"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="DDL_LockStatus" runat="server">
                                            <asp:ListItem Selected="True" Value="-1" Text="<%$ Resources:Content,strSelectLockStatus%>">  </asp:ListItem>
                                            <asp:ListItem Value="1" Text="<%$ Resources:Content,strLock%>"></asp:ListItem>
                                            <asp:ListItem Value="0" Text="<%$ Resources:Content,strUnlock%>"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:CheckBox ID="ChBx_ADSyncEnabledSearch" runat="server" Text="<%$ Resources:Content,ADSyncEnabledOnly%>" />
                                    </div>
                                </div>
                                <div class="col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:Button ID="Btn_Search" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                        <asp:Button ID="Btn_Clear" Visible="false" class="btn btn-primary waves-effect" runat="server"
                                            Text="<%$ Resources:Content,String289 %>" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </asp:Panel>

    <div class="row">

        <%--Start GV_List--%>
        <div class="col-xs-12" id="Pnl_Listing" runat="server">
            <asp:GridView CssClass="table table-bordered table-striped table-hover" EmptyDataText="<%$ Resources:Content, GN00001375 %>"
                ID="GV_List" DataKeyNames="ADUserId,DisplayName,ADDomainId,UserLDAP,HostedOrgId,CustomerId,CompanyId,LoginDisable,EXServiceData,SPServiceData,CRMServiceData,OCSServiceData,CSPServiceData,WFHServiceData, RDSServiceData"
                AllowPaging="True" AllowSorting="True" runat="server" AutoGenerateColumns="False">

                <Columns>
                    <asp:TemplateField HeaderText='<%$ Resources:Content,GN0000370 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                        <HeaderTemplate>
                            <asp:CheckBox runat="server" ID="ChkBx_All" onclick="SetCheckedHeader(this.checked, this, 'All');"
                                Text=" " class="option-menu" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="ChkBx_All" runat="server" onclick="SetCheckedHeader(this.checked, this,'1');" Text=" " CssClass="option-menu" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$Resources:Content,String385 %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                        <ItemTemplate>

                            <asp:LinkButton ID="LB_Status" CommandName="Status" runat="server"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField SortExpression="DisplayName" HeaderText="<%$ Resources:Content, strUser %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                        <ItemTemplate>
                            <%--<asp:Label ID="LB_DispName" Text='<%#DataBinder.Eval(Container, "DataItem.DisplayName")%>' runat="server"></asp:Label>--%>

                            <asp:HyperLink ID="LB_DispName" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.DisplayName")%>'
                                NavigateUrl='<%# ResolveUrl("~/PCC/DC/EditADUser.aspx?UId=") & Eval("ADUserId")%>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Content, DGN1110431 %>" HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                        <ItemTemplate>
                            <table class="table small">
                                <tr id="TR_LogOnName" runat="server">
                                    <td class="row-label col-md-6"><%= Resources.Content.String436%>:</td>
                                    <td>
                                        <asp:Label ID="LB_LogonName" Text='<%#DataBinder.Eval(Container, "DataItem.LogonName")%>'
                                            runat="server">
                                        </asp:Label>
                                    </td>
                                </tr>
                                <tr id="TR_OUName" runat="server">
                                    <td class="row-label col-md-6"><%= Resources.Content.DGN1110608%>:</td>
                                    <td>
                                        <asp:Label ID="LB_OUName" Text='<%#DataBinder.Eval(Container, "DataItem.OrganizationName")%>'
                                            runat="server">
                                        </asp:Label>
                                    </td>
                                </tr>
                                <tr id="TR_PreferredDC" runat="server">
                                    <td class="row-label col-md-6"><%= Resources.Content.DGN1110433%>:</td>
                                    <td>
                                        <asp:Label ID="LB_PreferredDC" Text='<%#DataBinder.Eval(Container, "DataItem.ADDomainName")%>'
                                            runat="server">
                                        </asp:Label>
                                    </td>
                                </tr>
                                <tr id="TR_ClientID" runat="server">
                                    <td class="row-label col-md-6"><%= Resources.Content.GN0000850%>:</td>
                                    <td>
                                        <asp:HyperLink ID="LB_ClientID" runat="server"></asp:HyperLink>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="row-label col-md-6"><%= Resources.Content.strLogonHoursTemplate%>:</td>
                                    <td>
                                        <asp:Label ID="Lbl_LogonHoursTemplate" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="row-label col-md-6"><%= Resources.Content.strLocked%>:</td>
                                    <td>
                                        <asp:Label ID="Lbl_Locked" runat="server"></asp:Label>
                                    </td>
                                </tr>

                            </table>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Content, M0091 %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                        <ItemTemplate>
                            <div class="col-sm-2 col-xs-12" id="Div_ExchangeSubs" runat="server">
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <asp:Label ID="Img_ExchangeSubs" runat="server" CssClass="icon-exchange mp-icons" data-toggle="tooltip" data-placement="top" title="" data-original-title="" data-html="true" />
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <li>
                                                <asp:HyperLink ID="LB_ExchangeSubs" runat="server" Target="_blank" /></li>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-sm-2 col-xs-12" id="Div_SubsOCS" runat="server">
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <asp:Label ID="Img_SubsOCS" runat="server" CssClass="icon-skype4b mp-icons" data-toggle="tooltip" data-placement="top" title="" data-original-title="" data-html="true" />
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <li>
                                                <asp:HyperLink ID="LB_SubsOCS" runat="server" Target="_blank" /></li>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-sm-2 col-xs-12" id="Div_O365Subs" runat="server">
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <asp:Label ID="Img_O365Subs" runat="server" CssClass="icon-o365 mp-icons" data-toggle="tooltip" data-placement="top" title="" data-original-title="" data-html="true" />
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <asp:Repeater ID="Rep_O365Tenants" runat="server" OnItemDataBound="Rep_O365Tenants_ItemDataBound">
                                                <ItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_O365Tenant" runat="server" Target="_blank" /></li>
                                                </ItemTemplate>
                                                <AlternatingItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_O365Tenant" runat="server" Target="_blank" /></li>
                                                </AlternatingItemTemplate>
                                            </asp:Repeater>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-sm-2 col-xs-12" id="Div_SharepointSubs" runat="server">
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <asp:Label ID="Img_SharepointSubs" runat="server" CssClass="icon-sharepoint mp-icons" data-toggle="tooltip" data-placement="top" title="" data-original-title="" data-html="true" />
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <asp:Repeater ID="Rep_SPOrgs" runat="server" OnItemDataBound="Rep_SPOrgs_ItemDataBound">
                                                <ItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_SPOrgs" runat="server" Target="_blank" /></li>
                                                </ItemTemplate>
                                                <AlternatingItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_SPOrgs" runat="server" Target="_blank" /></li>
                                                </AlternatingItemTemplate>
                                            </asp:Repeater>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-sm-2 col-xs-12" id="Div_CRMSubs" runat="server">
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <asp:Label ID="Img_CRMSubs" runat="server" CssClass="icon-crm mp-icons" data-toggle="tooltip" data-placement="top" title="" data-original-title="" data-html="true" />
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <asp:Repeater ID="Rep_CRMOrgs" runat="server" OnItemDataBound="Rep_CRMOrgs_ItemDataBound">
                                                <ItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_CRMOrgs" runat="server" Target="_blank" /></li>
                                                </ItemTemplate>
                                                <AlternatingItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_CRMOrgs" runat="server" Target="_blank" /></li>
                                                </AlternatingItemTemplate>
                                            </asp:Repeater>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-sm-2 col-xs-12" id="Div_SubsAD" runat="server">
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <asp:Label ID="Img_SubsAD" CssClass="icon-active-directory mp-icons" runat="server" data-toggle="tooltip" data-placement="top" title="" data-original-title="" data-html="true" />
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <asp:Repeater ID="Rep_ADOrgs" runat="server" OnItemDataBound="Rep_ADOrgs_ItemDataBound">
                                                <ItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_ADOrgs" runat="server" Target="_blank" /></li>
                                                </ItemTemplate>
                                                <AlternatingItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_ADOrgs" runat="server" Target="_blank" /></li>
                                                </AlternatingItemTemplate>
                                            </asp:Repeater>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-sm-2 col-xs-12" id="Div_SubsWFH" runat="server">
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <asp:Label ID="Img_SubsWFH" CssClass="icon-work-folder mp-icons" runat="server" data-toggle="tooltip" data-placement="top"
                                                title="" data-original-title="" data-html="true" />
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <asp:Repeater ID="Rep_WFHOrgs" runat="server" OnItemDataBound="Rep_WFHOrgs_ItemDataBound">
                                                <ItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_WFHOrgs" runat="server" Target="_blank" /></li>
                                                </ItemTemplate>
                                                <AlternatingItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_WFHOrgs" runat="server" Target="_blank" /></li>
                                                </AlternatingItemTemplate>
                                            </asp:Repeater>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-sm-2 col-xs-12" id="Div_SubsRDS" runat="server">
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <asp:Label ID="Img_SubsRDS" CssClass="icon-virtual-machine mp-icons" runat="server" data-toggle="tooltip" data-placement="top"
                                                title="" data-original-title="" data-html="true" />
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <asp:Repeater ID="Rep_RDSOrgs" runat="server" OnItemDataBound="Rep_RDSOrgs_ItemDataBound">
                                                <ItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_RDSOrgs" runat="server" /></li>
                                                </ItemTemplate>
                                                <AlternatingItemTemplate>
                                                    <li>
                                                        <asp:HyperLink ID="LB_RDSOrgs" runat="server" /></li>
                                                </AlternatingItemTemplate>
                                            </asp:Repeater>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                        <ItemTemplate>
                            <ul class="option-menu" id="div_options" runat="server">
                                <li class="dropdown">
                                    <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                        <i class="material-icons">menu</i>
                                    </a>
                                    <ul class="dropdown-menu pull-right">
                                        <li>
                                            <asp:HyperLink ID="Lbtn_EditUser" runat="server" Visible="false" Text='<%$ Resources:Content,GN0000276 %>'
                                                SkinID="linkButtonEdt" CausesValidation="false" NavigateUrl='<%# ResolveUrl("~/PCC/DC/EditADUser.aspx?UId=") & Eval("ADUserId")%>'></asp:HyperLink></li>
                                        <li>
                                            <asp:HyperLink ID="Lbtn_CloneUser" CssClass="btnAction" runat="server" Text='<%$ Resources:Content,DGN1110198 %>'
                                                SkinID="linkButtonEdt" CausesValidation="false" NavigateUrl='<%# ResolveUrl("~/PCC/DC/AddADUser.aspx?UId=" & Eval("ADUserId"))%>'></asp:HyperLink></li>
                                        <li>
                                            <asp:LinkButton ID="LB_ChangePassword" CssClass="btnAction" Text="<%$ Resources:Content, M0087%>" CommandArgument='<%#DataBinder.Eval(Container, "DataItem.ADUserId")%>'
                                                runat="server" SkinID="linkButtonEdt" CommandName="ChangePassword" CausesValidation="false">
                                            </asp:LinkButton></li>
                                        <li>
                                            <asp:LinkButton ID="LB_Disable" CssClass="btnAction" CommandArgument='<%#DataBinder.Eval(Container, "DataItem.ADUserId")%>'
                                                runat="server" CommandName="Disable_MB" SkinID="linkButtonPase" /></li>
                                        <li>
                                            <asp:LinkButton ID="LB_Unlock" CssClass="btnAction" Text="<%$ Resources:Content,GN0000630%>" SkinID="linkButtonGoo"
                                                CommandArgument='<%#DataBinder.Eval(Container, "DataItem.ADUserId")%>' runat="server"
                                                CommandName="UnlockUser">
                                            </asp:LinkButton></li>
                                        <li>
                                            <asp:LinkButton ID="LB_RemoveUser" CssClass="btnAction" Text="<%$ Resources:Content,GN0000278%>" SkinID="linkButtonDel"
                                                CommandArgument='<%#DataBinder.Eval(Container, "DataItem.ADUserId")%>' runat="server"
                                                CommandName="DeleteUser">
                                            </asp:LinkButton></li>
                                        <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,CBE001%>"
                                            runat="server" TargetControlID="LB_RemoveUser" />
                                    </ul>
                                </li>
                            </ul>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerTemplate>
                    <EM:Pager ID="Pager1" runat="server" />
                </PagerTemplate>
            </asp:GridView>
        </div>


    </div>
</asp:Panel>

<div class="row" id="Pnl_GroupActions" runat="server" visible="false">
    <div class="col-xs-12">
        <div class="card">
            <div class="header">
                <div class="displayInlineBlock">
                    <h3><%= Resources.Content.String7772%>      <%--Operations--%></h3>
                </div>
                <asp:LinkButton ID="LB_ADUserGroupActionsBack" runat="server" Text="<%$ Resources:Content,DGN1110542 %>" CausesValidation="false"
                    class="btn btn-primary waves-effect pull-right m-t--4px" />
            </div>
            <div class="body">
                <EM:ADUserGroupActions ID="ADUserGroupActions1" runat="server" />
            </div>
        </div>
    </div>
</div>

<asp:Panel ID="Pnl_GroupActionsStatus" runat="server" Style="display: none" CssClass="width-modal-popup-auto">
    <div class="col-xs-12">
        <div class="card">
            <div class="header container-fluid">
                <h3 class="pull-left"></h3>
                <span>
                    <button type="button" class="close" onclick="$find('<%=MPE_GroupActionsStatus.ClientID%>').hide();">&times;</button>
                </span>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <asp:Label ID="Lbl_NoActionTaken" runat="server" Visible="false" Text="<%$ Resources:Content,noActionTaken%>" />
                        <EM:AccountGroupActions ID="GA_GroupActionsStatus" runat="server" />
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <asp:LinkButton ID="LB_GroupActionsStatus" runat="server" Text="<%$ Resources:Content,GN000150%>" Style="display: none;" class="btn btn-primary waves-effect" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Panel>
<asp:Button ID="Btn_TargetGroupActionsStatus" runat="server" Text="<%$ Resources:Content,SMI0007%>"
    Style="display: none;" />
<asp:Button ID="Btn_OkGroupActionsStatus" runat="server" Text="<%$ Resources:Content,SMI0007%>"
    Style="display: none;" />
<EM:ModalPopupExtender runat="server" ID="MPE_GroupActionsStatus" BackgroundCssClass="modalBackground"
    DropShadow="false" PopupControlID="Pnl_GroupActionsStatus" TargetControlID="Btn_TargetGroupActionsStatus"
    OkControlID="Btn_OkGroupActionsStatus" CancelControlID="LB_GroupActionsStatus">
</EM:ModalPopupExtender>

<asp:Panel ID="Pnl_ChangePWD" runat="server" CssClass="width-modal-popup-auto" DefaultButton='Btn_OK'>
    <div class="col-xs-12">
        <div class="card">
            <div class="header container-fluid">
                <h3 class="pull-left">
                    <asp:Literal ID="Ltl_ChngPassword" runat="server" Text='<%$Resources:Content, M0087 %>'></asp:Literal></h3>
                <span>
                    <button type="button" class="close" onclick="$find('<%=MPE_ChangePWD.ClientID%>').hide();">&times;</button>
                </span>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-sm-4 col-xs-12 row-label">
                        <asp:Literal ID="Ltrl_UserName" runat="server" Text="<%$ Resources:Content, GN00001113 %>">:</asp:Literal>
                    </div>
                    <div class="col-sm-8 col-xs-12">
                        <asp:Literal ID="Ltl_UserName" runat="server"></asp:Literal>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-4 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content, DGN1110554 %>"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_Password" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RFV_ConfirmPassword" runat="server" ControlToValidate="TxBx_Password"
                                    Display="none" SetFocusOnError="true" ValidationGroup="UPChange">
                                </asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <asp:CheckBox ID="CB_Show" runat="server" Text="<%$ Resources:Content,FAM0049 %>" />

                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:LinkButton ID="lb_Generate" runat="server" Text="<%$ Resources:Content,SMI0195%>" class="btn btn-primary waves-effect"
                                CausesValidation="false"></asp:LinkButton>
                        </div>
                        <div id="Div_PasswordPolicy" runat="server" class="help-text sm"></div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-4 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content, GN0001196 %>"></asp:Literal>:</label>
                        <asp:CompareValidator ID="CV" runat="server" ControlToValidate="TxBx_CPassword" ControlToCompare="TxBx_Password"
                            ValidationGroup="UPChange" Display="None" ErrorMessage='<%$Resources:Content, SPT002699 %>'></asp:CompareValidator>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_CPassword" runat="server" TextMode="Password">
                                </asp:TextBox>
                                <asp:RequiredFieldValidator ID="RFV_CPassword" runat="server" ControlToValidate="TxBx_CPassword"
                                    Display="none" SetFocusOnError="true" ValidationGroup="UPChange">
                                </asp:RequiredFieldValidator>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-4 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content, GN0000752 %>"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:CheckBox ID="ChBx_SendEmail" runat="server" onChange='return ShowHideSendEmail()' Text=" " />
                        </div>
                    </div>
                </div>
                <div class="row" runat="server" id="Tr_SendEmail" style="display: none">
                    <div class="col-sm-4 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Content, GN0000491 %>"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_SendEmail" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RFV_SendEmail" runat="server" ControlToValidate="TxBx_SendEmail"
                                    Display="none" SetFocusOnError="true" ValidationGroup="UPChange" Enabled="false"
                                    EnableClientScript='true'>
                                </asp:RequiredFieldValidator>
                                <%-- <asp:RegularExpressionValidator ID="REV_SendEmail" Display="None" runat="server"
                                    ErrorMessage='<%$ Resources:Content,DGN1110038%>' ControlToValidate="TxBx_SendEmail"
                                    SetFocusOnError="True" ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>"
                                    ValidationGroup="UPChange" Enabled="false"></asp:RegularExpressionValidator>--%>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <asp:ValidationSummary ValidationGroup="UPChange" HeaderText='<%$ Resources:Content,EM000001 %>'
                            ID="VS" runat="server" ShowMessageBox="true" ShowSummary="false" />
                        <asp:Button ID="Btn_OK" runat="server" Text='<%$Resources:Content, GN0000858 %>'
                            class="btn btn-primary waves-effect btnAction" ValidationGroup="UPChange" CausesValidation="true"></asp:Button>
                        <asp:Button ID="Btn_Cancel" runat="server" Text='<%$Resources:Content, GN0000572 %>'
                            class="btn btn-primary waves-effect"></asp:Button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Panel>
<asp:Button ID='Btn_Dummy' runat='server' Style='display: none;'></asp:Button>
<EM:ModalPopupExtender ID="MPE_ChangePWD" runat="server" BackgroundCssClass="modalBackground"
    DropShadow="False" PopupControlID="Pnl_ChangePWD" TargetControlID='Btn_Dummy'>
</EM:ModalPopupExtender>
