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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Src="~/PCC/DC/CC/SG.ascx" TagName="SG" TagPrefix="EM" %>
<%@ Register Src="~/PCC/DC/CC/ADUsers.ascx" TagName="ADUsers" TagPrefix="UC" %>
<%@ Register Src="~/RCC/Exchange/CC/GroupActions.ascx" TagName="GroupActions" TagPrefix="UC" %>
<%@ Register Src="~/PCC/DC/CC/PasswordPolicies.ascx" TagName="PasswordPolicies" TagPrefix="UC" %>
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI" TagPrefix="cc1" %>
<%@ Register Assembly="GroupRadioButton" Namespace="Vladsm.Web.UI.WebControls" TagPrefix="EM" %>

<div class="row">
    <div class="col-xs-12">

        <asp:Button ID="Btn_RefreshTab" CssClass="RefreshTab" runat="server" Style="display: none;" />
        <EM:TabContainer ID="TC_Queue" runat="server" OnClientActiveTabChanged="loadTabPanel" ActiveTabIndex="0">
            <EM:TabPanel ID="Tab_Queue" runat="server" HeaderText="<%$ Resources:Content,MD203%>">
                <ContentTemplate>
                    <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                    <asp:Panel ID="Pnl_TabContent0" runat="server">
                        <%--Start Search Box--%>

                        <asp:Panel ID="Pnl_Search_Outer" runat="server">
                            <asp:Panel ID="Pnl_Search_Inner" DefaultButton="Btn_Search" runat="server">
                                <div class="row">
                                    <div class="panel-group search-panel" id="AS_ListADOrgs" role="tablist" aria-multiselectable="true">
                                        <div class="col-xs-12" role="tab" id="SH_ListADOrgs">
                                            <div class="card">
                                                <div class="header" role="button" data-toggle="collapse" data-parent="#AS_ListADOrgs" href="#<%= CSB_ListADOrgs.ClientID%>" aria-expanded="true" aria-controls="SH_ListADOrgs">
                                                    <h3>
                                                        <%= Resources.Content.GN0000395%>
                                                    </h3>
                                                </div>
                                                <div id="CSB_ListADOrgs" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_ListADOrgs" aria-expanded="false">
                                                    <div class="row">
                                                        <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_OUName" runat="server"></asp:TextBox>
                                                                    <asp:Label ID="Label4" 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_DomainName" runat="server"></asp:TextBox>
                                                                    <asp:Label ID="Label6" 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_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="Label8" 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="TD_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="Label15" 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="TD_Company" runat="server">
                                                            <div class="form-group form-float">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_Company" runat="server"></asp:TextBox>
                                                                    <asp:Label ID="Lbl_Search_WHMCS_Id_Title" 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_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">
                                                            <div class="form-group form-float">
                                                                <asp:DropDownList ID="Ddl_SubscriptionOptions" runat="server"></asp:DropDownList>
                                                            </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 Div_OpsRow" runat="server" id="Tbl_operations">
                                <div class="col-xs-12">
                                    <div class="card">
                                        <div class="header">
                                            <h3>
                                                <%= Resources.Content.GN00001320%>      <%--Operations--%>
                                            </h3>
                                        </div>
                                        <div class="body">
                                            <asp:Button ID="Btn_AddOU" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,String433%>" />
                                            <asp:Button ID="Btn_DisableAll" runat="server" Custom1="Custom" Style="display: none" Text="<%$ Resources:Content,AD123%>"
                                                class="btn btn-primary waves-effect btnAction" />
                                            <asp:Button ID="Btn_EnableAll" runat="server" Custom1="Custom" Style="display: none" Text="<%$ Resources:Content,AD124%>"
                                                class="btn btn-primary waves-effect btnAction" />
                                            <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_SyncFromBackend" runat="server" Custom1="Custom" Style="display: none" Text="<%$ Resources:Content,USM0163%>" class="btn btn-primary waves-effect btnAction" />
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <%--Start GV_List--%>
                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:GridView CssClass="table table-bordered table-striped table-hover" EmptyDataText="<%$ Resources:Content, GN00001375 %>"
                                        ID="GV_List" AllowPaging="True" AllowSorting="True" runat="server" DataKeyNames="ADDomainId,OrgLDAP,OrganizationName,OrganizationInternalName,PrefDomContrlr,HostedOrgId,OrgGUID"
                                        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 SortExpression="OrganizationName" HeaderText="<%$ Resources:Content, DGN1110608 %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                <ItemTemplate>
                                                    <asp:Label ID="LB_OUName" Text='<%#DataBinder.Eval(Container, "DataItem.OrganizationName")%>'
                                                        runat="server">
                                                    </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField SortExpression="OrganizationInternalName" HeaderText="<%$ Resources:Content, USM0181 %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                <ItemTemplate>
                                                    <asp:Label ID="LB_OUInternalName" Text='<%#DataBinder.Eval(Container, "DataItem.OrganizationInternalName")%>'
                                                        runat="server">
                                                    </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000636 %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="LB_Users" Text='<%#DataBinder.Eval(Container, "DataItem.Users")%>' runat="server">
                                                    </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_addomainname" runat="server">
                                                            <td class="row-label"><%= Resources.Content.DGN1110433%>:</td>
                                                            <td>
                                                                <asp:Label ID="LB_PreferredDC" Text='<%#DataBinder.Eval(Container, "DataItem.ADDomainName")%>'
                                                                    runat="server">
                                                                </asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="row-label"><%= Resources.Content.AD125%>:</td>
                                                            <td>
                                                                <asp:Label ID="lbl_ADSync" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="row-label"><%= Resources.Content.strADSyncTemplate%>:</td>
                                                            <td>
                                                                <asp:Label ID="lblAdSyncTemplate" Text='<%# IIf(DataBinder.Eval(Container, "DataItem.SyncEnabled") = "True", DataBinder.Eval(Container, "DataItem.AdSyncTemplate"), "")%>'
                                                                    runat="server">
                                                                </asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="row-label"><%= Resources.Content.M0091%>:</td>
                                                            <td>
                                                                <asp:Label ID="lblIsAnySubscription" runat="server" Text="<%$Resources:Content,GN0000005 %>"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr id="TR_ClientID" runat="server">
                                                            <td class="row-label"><%= Resources.Content.GN0000850%>:</td>
                                                            <td>
                                                                <asp:HyperLink ID="LB_ClientID" runat="server"></asp:HyperLink>
                                                            </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="row">
                                                        <div class="col-xs-12">
                                                            <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">
                                                                            <asp:Repeater ID="Rep_ExchOrgs" runat="server" OnItemDataBound="Rep_ExchOrgs_ItemDataBound">
                                                                                <ItemTemplate>
                                                                                    <li>
                                                                                        <asp:HyperLink ID="LB_ExchOrgs" runat="server" Target="_blank" /></li>
                                                                                </ItemTemplate>
                                                                                <AlternatingItemTemplate>
                                                                                    <li>
                                                                                        <asp:HyperLink ID="LB_ExchOrgs" runat="server" Target="_blank" /></li>
                                                                                </AlternatingItemTemplate>
                                                                            </asp:Repeater>
                                                                        </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_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">
                                                                            <asp:Repeater ID="Rep_OCSOrgs" runat="server" OnItemDataBound="Rep_OCSOrgs_ItemDataBound">
                                                                                <ItemTemplate>
                                                                                    <li>
                                                                                        <asp:HyperLink ID="LB_OCSOrgs" runat="server" Target="_blank" /></li>
                                                                                </ItemTemplate>
                                                                                <AlternatingItemTemplate>
                                                                                    <li>
                                                                                        <asp:HyperLink ID="LB_OCSOrgs" 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" Target="_blank" /></li>
                                                                                </ItemTemplate>
                                                                                <AlternatingItemTemplate>
                                                                                    <li>
                                                                                        <asp:HyperLink ID="LB_RDSOrgs" runat="server" Target="_blank" /></li>
                                                                                </AlternatingItemTemplate>
                                                                            </asp:Repeater>
                                                                        </ul>
                                                                    </li>
                                                                </ul>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                <ItemTemplate>
                                                    <div class="row">
                                                        <div class="col-md-3 col-sm-6 col-xs-12">
                                                            <asp:HyperLink ID="Lb_Manage" Text="<%$ Resources:Content,L0086%>" class="btn btn-primary waves-effect" runat="server" />
                                                        </div>
                                                    </div>
                                                    <%--<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:LinkButton ID="LB_Edit" runat="server" Text="<%$Resources:Content,GN0000276%>" CommandName="EditOrg"
                                                                        CommandArgument='<%#DataBinder.Eval(Container, "DataItem.HostedOrgId")%>'></asp:LinkButton></li>
                                                                <li>
                                                                    <asp:HyperLink ID="Lbtn_AddUser" runat="server" Text="<%$Resources:Content,DEV1101%>"
                                                                        NavigateUrl='<%# ResolveUrl("~/PCC/DC/AddADUser.aspx") & "?OrgId=" & Eval("HostedOrgId")%>'></asp:HyperLink></li>

                                                                <li>
                                                                    <asp:HyperLink ID="Lbtn_AddBulkADUsers" runat="server" Text="<%$Resources:Content,strAddBulkUsers%>"
                                                                        NavigateUrl='<%# ResolveUrl("~/PCC/DC/AddADUser.aspx") & "?OrgId=" & Eval("HostedOrgId") & "&Tab=2"%>'></asp:HyperLink></li>

                                                                <li>
                                                                    <asp:HyperLink ID="Lbtn_UpdateBulkADUsers" runat="server" Text="<%$Resources:Content,strUpdateBulkUsers%>"
                                                                        NavigateUrl='<%# ResolveUrl("~/PCC/DC/AddADUser.aspx") & "?OrgId=" & Eval("HostedOrgId") & "&Tab=3"%>'></asp:HyperLink></li>

                                                                <li>
                                                                    <asp:HyperLink ID="LB_ListUsers" runat="server" Text="<%$Resources:Content,SMI0572%>"></asp:HyperLink></li>

                                                                <li>
                                                                    <asp:LinkButton ID="LB_ADSync" runat="server" CommandArgument='<%#DataBinder.Eval(Container, "DataItem.HostedOrgId")%>'></asp:LinkButton></li>
                                                                <li>
                                                                    <asp:LinkButton ID="Lbtn_SyncFromBackend" runat="server" CommandName="SyncFromBackend" Text='<%$Resources:Content,USM0163%>'
                                                                        CommandArgument='<%#DataBinder.Eval(Container, "DataItem.HostedOrgId")%>'></asp:LinkButton></li>
                                                                <li>
                                                                    <asp:HyperLink ID="LB_SecurityGroup" Text="<%$ Resources:Content,SecurityGroups%>" runat="server">
                                                                    </asp:HyperLink></li>
                                                                <li>
                                                                    <asp:LinkButton ID="LB_RemoveOrg" Text="<%$ Resources:Content,GN0000278%>"
                                                                        CommandArgument='<%#DataBinder.Eval(Container, "DataItem.HostedOrgId")%>' runat="server"
                                                                        CommandName="DeleteOrg">
                                                                    </asp:LinkButton></li>
                                                                <li>
                                                                    <asp:LinkButton ID="LB_Settings" Text="<%$ Resources:Content,M0027%>" CommandName="Settings" runat="server" CommandArgument='<%#DataBinder.Eval(Container, "DataItem.HostedOrgId")%>'></asp:LinkButton></li>
                                                                
                                                                <li>
                                                                    <asp:LinkButton ID="LB_ExportLockedExpiredUsers" Text="<%$ Resources:Content,ExportLockedExpiredUsers%>" CommandName="ExportLockedExpiredUsers" runat="server" CommandArgument='<%#DataBinder.Eval(Container, "DataItem.HostedOrgId")%>'></asp:LinkButton></li>
                                                        </li>

                                                        <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,CBE001%>"
                                                            runat="server" TargetControlID="LB_RemoveOrg" />
                                                    </ul>
                                                    </li>
                                                    </ul>--%>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <PagerTemplate>
                                            <EM:Pager ID="Pager1" runat="server" />
                                        </PagerTemplate>
                                    </asp:GridView>
                                </div>
                            </div>
                        </asp:Panel>

                    </asp:Panel>
                </ContentTemplate>
            </EM:TabPanel>
            <EM:TabPanel ID="Tab_LogonHourTemplates" runat="server" HeaderText='<%$ Resources:Content,strLogonHoursTemplate%>'>
                <ContentTemplate>
                    <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                    <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                        <asp:Panel ID="Pnl_Search_InnerLogonHours" DefaultButton="Btn_SearchLogonHours" runat="server">
                            <div class="row">
                                <div class="panel-group search-panel" id="AS_LogonHours" role="tablist" aria-multiselectable="true">
                                    <div class="col-xs-12" role="tab" id="SH_LogonHours">
                                        <div class="card">
                                            <div class="header" role="button" data-toggle="collapse" data-parent="#AS_LogonHours" href="#<%= CSB_LogonHours.ClientID%>" aria-expanded="true" aria-controls="SH_LogonHours">
                                                <h3>
                                                    <%= Resources.Content.GN0000395%>
                                                </h3>
                                            </div>
                                            <div id="CSB_LogonHours" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_LogonHours" aria-expanded="false">
                                                <div class="row">
                                                    <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_TemplateName" runat="server"></asp:TextBox>
                                                                <asp:Label ID="Label1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,String273%>" 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_OrgName" runat="server"></asp:TextBox>
                                                                <asp:Label ID="Label2" 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_DomainNameLogonHours" runat="server"></asp:TextBox>
                                                                <asp:Label ID="Label3" 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">
                                                        <div class="form-group form-float">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_OwnerFilter" runat="server"></asp:TextBox>
                                                                <asp:Label ID="Label5" runat="server" EnableViewState="false" Text="<%$ Resources:Content,strOwnerEmailName%>" class="form-label"></asp:Label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-xs-12">
                                                        <div class="form-group form-float">
                                                            <asp:Button ID="Btn_SearchLogonHours" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                                            <asp:Button ID="Btn_ClearLogonHours" 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 Div_OpsRow" runat="server" id="Tbl_operationsLogonHours">
                            <div class="col-xs-12">
                                <div class="card">
                                    <div class="header">
                                        <h3>
                                            <%= Resources.Content.GN00001320%>      <%--Operations--%>
                                        </h3>
                                    </div>
                                    <div class="body">
                                        <asp:Button ID="Btn_AddNewTemplate" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,SMI704%>" />
                                    </div>
                                </div>
                            </div>
                        </div>

                        <%--Start GV_List--%>
                        <div class="row">
                            <div class="col-xs-12">
                                <asp:GridView CssClass="table table-bordered table-striped table-hover" EmptyDataText="<%$ Resources:Content, GN00001375 %>"
                                    ID="GV_ListLogonHours" AllowPaging="True" AllowSorting="True" runat="server"
                                    AutoGenerateColumns="False">

                                    <Columns>
                                        <asp:TemplateField HeaderText='<%$ Resources:Content,String234 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_TemplateId" runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField SortExpression="TemplateName" HeaderText="<%$ Resources:Content, String273 %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <asp:Label ID="LB_TemplateName" runat="server">
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField SortExpression="TimeZone" HeaderText="<%$ Resources:Content, Lync179 %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="LB_TimeZone" runat="server">
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content, Exh505 %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="LB_Owner" runat="server">
                                                </asp:HyperLink>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <%--<asp:TemplateField HeaderText="<%$ Resources:Content, assignedToOrgs %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                            <ItemTemplate>
                                                <asp:Label ID="LB_AssignedToOrgs" runat="server">
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>--%>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content, assignedToUsers %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                            <ItemTemplate>
                                                <asp:Label ID="LB_AssignedToUsers" runat="server">
                                                </asp:Label>
                                            </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="LB_Edit" runat="server" Text="<%$Resources:Content,GN0000276%>"></asp:HyperLink></li>
                                                            <li>
                                                                <asp:LinkButton ID="LB_Clone" CssClass="btnAction" runat="server" Text="<%$Resources:Content,DGN1110198%>" CommandName="CloneTemplate"></asp:LinkButton></li>
                                                            <li>
                                                                <asp:LinkButton ID="LB_Remove" CssClass="btnAction" Text="<%$ Resources:Content,GN0000278%>" runat="server"
                                                                    CommandName="DeleteTemplate"></asp:LinkButton></li>

                                                            <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,CBE001%>"
                                                                runat="server" TargetControlID="LB_Remove" />
                                                        </ul>
                                                    </li>
                                                </ul>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerTemplate>
                                        <EM:Pager ID="Pager1" runat="server" />
                                    </PagerTemplate>
                                </asp:GridView>
                            </div>
                        </div>
                    </asp:Panel>
                </ContentTemplate>
            </EM:TabPanel>
        </EM:TabContainer>

    </div>
</div>

<asp:Panel ID="Pnl_ChangePWD" runat="server" CssClass="width-modal-popup-auto" DefaultButton='Btn_OK' Style="display: none">
    <div class="col-xs-12">
        <div class="card">
            <div class="header container-fluid">
                <h3 class="pull-left">
                    <asp:Literal ID="Ltl_AdSyncTemp" runat="server" Text='<%$Resources:Content, strADSyncTemplates %>'></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-md-2 col-sm-3 col-xs-12 row-label">
                        <label>*<asp:Literal ID="Ltrl_SelectTemp" runat="server" Text="<%$ Resources:Content, Dev453 %>"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-8 col-xs-12">
                        <div class="row">
                            <asp:Repeater ID="Rep_AdsyncTemplates" runat="server">
                                <ItemTemplate>
                                    <div class="col-md-4 col-sm-6 col-xs-12">
                                        <EM:GroupRadioButton ID="RB_AdsyncTemplates" runat="server" GroupName="AdSyncTemplates" />
                                        <label id="Lbl_Template" runat="server">
                                            <div id="Div_Template" runat="server" class="display-inline">
                                            </div>
                                        </label>
                                        <asp:HiddenField ID="HF_AdSyncTemplate" runat="server" />
                                    </div>
                                </ItemTemplate>
                            </asp:Repeater>
                        </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>
