<%@ page language="VB" masterpagefile="~/Template/Master.master" autoeventwireup="false" inherits="Admin_System_HMCProvider, MachSol.MachPanel.Web" title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/PCC/System/CC/Provider_HMC4.ascx" TagName="ProviderHMC4" TagPrefix="EM" %>
<%@ Register Src="~/PCC/System/CC/Provider_Exchange2007.ascx" TagName="ProviderExchange2007" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<asp:Content ID="Content4" ContentPlaceHolderID="CPH_Content" runat="Server">


    <script type="text/javascript">
        function CreateLDAP(ResselleerOU, ActiveDirDomain, DefResellerLDAPURL) {
            var retarray = new Array();
            //var TxBx_ActiveDirDomain=document.getElementById(ActiveDirDomain);
            var TxBx_DefResellerLDAPURL = document.getElementById(DefResellerLDAPURL);
            var Txt_ResselleerOU = document.getElementById(ResselleerOU);
            retarray = ActiveDirDomain.split(".");
            //OU=Hosting,DC=fabrikam,DC=Com

            if (Txt_ResselleerOU.value == "") {
                var LDAP = "LDAP://" + "OU=Hosting";
            }
            else {
                var LDAP = "LDAP://OU=" + Txt_ResselleerOU.value + ",OU=Hosting";
            }

            for (i = 0 ; i < retarray.length ; i++) {
                LDAP += ",DC=";
                LDAP += retarray[i];

            }

            TxBx_DefResellerLDAPURL.value = LDAP;

        }
        function SetOU(ResselleerOU, ActiveDirDomain, DefResellerLDAPURL) {

            var TxBx_DefResellerLDAPURL = document.getElementById(DefResellerLDAPURL);
            var Txt_ResselleerOU = document.getElementById(ResselleerOU);

            if (TxBx_DefResellerLDAPURL == "") {
                retarray = ActiveDirDomain.split(".");
            }
            else {

            }

            var retarray = new Array();
            retarray = TxBx_DefResellerLDAPURL.value.split("OU=");

            if (Txt_ResselleerOU.value == "") {
                TxBx_DefResellerLDAPURL.value = "LDAP://" + "OU=" + retarray[2];
            }
            else {
                TxBx_DefResellerLDAPURL.value = "LDAP://OU=" + Txt_ResselleerOU.value + ",OU=" + retarray[2];
            }
        }
        function GetString(MPSServer, ADWSUrl, HEWSURL, MPWSURL, MADWSUrl, MEmail2007, MSPWSUrl, HSPWSUrl) {
            var retarray = new Array();
            var TxBx_ADWSUrl = document.getElementById(ADWSUrl);
            var TxBx_HEWSURL = document.getElementById(HEWSURL);
            var TxBx_MPWSURL = document.getElementById(MPWSURL);
            var TxBx_MADWSUrl = document.getElementById(MADWSUrl);
            var TxBx_MEmail2007 = document.getElementById(MEmail2007);
            var Txt_MPSServer = document.getElementById(MPSServer);
            var Txt_MSPWSUrl = document.getElementById(MSPWSUrl);
            var Txt_HSPWSUrl = document.getElementById(HSPWSUrl);
            if (Txt_MPSServer.value == "") {
                TxBx_ADWSUrl.value = "http://prov01/mpsws/HostedActiveDirectory/Service.asmx";
                TxBx_HEWSURL.value = "http://prov01/mpsws/HostedEmail2007/Service.asmx";
                TxBx_MPWSURL.value = "http://prov01/mpsws/ManagedPlans/service.asmx";
                TxBx_MADWSUrl.value = "http://prov01/mpsws/ManagedActiveDirectory/service.asmx";
                TxBx_MEmail2007.value = "http://prov01/mpsws/ManagedEmail2007/service.asmx";
                Txt_HSPWSUrl.value = "http://prov01/MPSWS/HostedSharePoint2007/Service.asmx";
                Txt_MSPWSUrl.value = "http://prov01/MPSWS/ManagedSharePoint2007/service.asmx"
            }
            else {
                var str = "http://" + Txt_MPSServer.value;
                TxBx_ADWSUrl.value = str + "/mpsws/HostedActiveDirectory/Service.asmx";
                TxBx_HEWSURL.value = str + "/mpsws/HostedEmail2007/Service.asmx";
                TxBx_MPWSURL.value = str + "/mpsws/ManagedPlans/service.asmx";
                TxBx_MADWSUrl.value = str + "/mpsws/ManagedActiveDirectory/service.asmx";
                TxBx_MEmail2007.value = str + "/mpsws/ManagedEmail2007/service.asmx";
                Txt_HSPWSUrl.value = str + "/MPSWS/HostedSharePoint2007/Service.asmx";
                Txt_MSPWSUrl.value = str + "/MPSWS/ManagedSharePoint2007/service.asmx"
            }
        }
    </script>

    <div class="col-xs-12">
        <div class="card">
            <%--<div class="header">
                <h2>
                    <asp:Literal ID="Ltl_SubsInfo" runat="server" Text="<%$ Resources:Content,SM055 %>" /></h2>
            </div>--%>
            <div class="body">
                <ajax:UpdatePanel ID="UP_Providers" runat="server">
                    <ContentTemplate>
                        <EM:TabContainer ID="TC_Providers" runat="server" OnClientActiveTabChanged="loadTabPanel">
                            <EM:TabPanel ID="Tab_List" runat="server" HeaderText="<%$ Resources:Content,SM055%>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent0" runat="server">
                                        <asp:SqlDataSource runat="server" ID="SqlDS_ExProvider"></asp:SqlDataSource>
                                        <asp:GridView Width="100%" ID="GV_ExProvider" runat="server" AutoGenerateColumns="False" EmptyDataText='<%$ Resources:Content, GN00001375 %>' 
                                            DataSourceID="SqlDS_ExProvider" AllowPaging="true" PageSize="25" CssClass="table table-bordered table-striped table-hover">
                                            
                                            <Columns>
                                                <asp:TemplateField HeaderText="<%$ Resources:Content,DGN1110096%>" HeaderStyle-CssClass="col-xs-6" ItemStyle-CssClass="col-xs-6">
                                                    <ItemTemplate>
                                                        <asp:Label ID="Lbl_Module" runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001102%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                    <ItemTemplate>
                                                        <asp:Label ID="Lbl_IntegrationStatus" runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="<%$ Resources:Content,String385%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                    <ItemTemplate>

                                                        <asp:Label ID="Lbl_Status" runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000360%>" HeaderStyle-CssClass="col-xs-6" ItemStyle-CssClass="col-xs-6">
                                                    <ItemTemplate>
                                                        <asp:LinkButton ID="LB_Edit" CommandName="RowEdit" class="btn btn-primary waves-effect" CommandArgument='<%#DataBinder.Eval(Container, "DataItem.ProviderID")%>' runat="server" Text="<%$ Resources:Content,DGN1110331 %>"></asp:LinkButton>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <%--PagerTemplate Start--%>
                                            <PagerTemplate>
                                                <EM:Pager ID="Pager1" runat="server" />
                                            </PagerTemplate>

                                            <%--PagerTemplate End--%>
                                        </asp:GridView>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_Detail" Enabled="false" runat="server" HeaderText='<%$ Resources:Content, DGN1110331 %>'>
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                        <EM:ProviderHMC4 ID="ProviderHMC4" runat="server" Visible="false" />
                                        <EM:ProviderExchange2007 ID="ProviderExchange2007" runat="server" Visible="false" />
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                        </EM:TabContainer>
                    </ContentTemplate>
                </ajax:UpdatePanel>
            </div>
        </div>
    </div>
</asp:Content>


