add crm 2011 support

This commit is contained in:
dev 2013-01-17 08:54:31 +04:00
parent 14426b0216
commit 9a82cd5990
17 changed files with 170641 additions and 18 deletions

View file

@ -0,0 +1,2 @@
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (1201, 21, N'CRM', N'Hosted MS CRM 2011', N'WebsitePanel.Providers.HostedSolution.CRMProvider2011, WebsitePanel.Providers.HostedSolution', N'CRM', NULL)
GO

File diff suppressed because it is too large Load diff

View file

@ -63,8 +63,9 @@
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Crm.Admin.AdminService.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="microsoft.crm.sdk.proxy">
<HintPath>..\..\..\..\..\Projects\websitepanel_v2.0.0.CRM2011.Patch\WebsitePanel\Sources\WebsitePanel.Server\bin\microsoft.crm.sdk.proxy.dll</HintPath>
<Reference Include="microsoft.crm.sdk.proxy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.crm.sdk.proxy.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Crm.Setup.Common">
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Crm.Setup.Common.dll</HintPath>
@ -122,26 +123,33 @@
<HintPath>..\..\Lib\References\Microsoft\Microsoft.SharePoint.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="microsoft.xrm.client">
<HintPath>..\..\..\..\..\Projects\websitepanel_v2.0.0.CRM2011.Patch\WebsitePanel\Sources\WebsitePanel.Server\bin\microsoft.xrm.client.dll</HintPath>
<Reference Include="microsoft.xrm.client, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.client.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.client.codegeneration">
<HintPath>..\..\..\..\..\Projects\websitepanel_v2.0.0.CRM2011.Patch\WebsitePanel\Sources\WebsitePanel.Server\bin\microsoft.xrm.client.codegeneration.dll</HintPath>
<Reference Include="microsoft.xrm.client.codegeneration, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.client.codegeneration.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.portal">
<HintPath>..\..\..\..\..\Projects\websitepanel_v2.0.0.CRM2011.Patch\WebsitePanel\Sources\WebsitePanel.Server\bin\microsoft.xrm.portal.dll</HintPath>
<Reference Include="microsoft.xrm.portal, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.portal.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.portal.files">
<HintPath>..\..\..\..\..\Projects\websitepanel_v2.0.0.CRM2011.Patch\WebsitePanel\Sources\WebsitePanel.Server\bin\microsoft.xrm.portal.files.dll</HintPath>
<Reference Include="microsoft.xrm.portal.files, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.portal.files.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.sdk">
<HintPath>..\..\..\..\..\Projects\websitepanel_v2.0.0.CRM2011.Patch\WebsitePanel\Sources\WebsitePanel.Server\bin\microsoft.xrm.sdk.dll</HintPath>
<Reference Include="microsoft.xrm.sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.sdk.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.sdk.deployment">
<HintPath>..\..\..\..\..\Projects\websitepanel_v2.0.0.CRM2011.Patch\WebsitePanel\Sources\WebsitePanel.Server\bin\microsoft.xrm.sdk.deployment.dll</HintPath>
<Reference Include="microsoft.xrm.sdk.deployment, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.sdk.deployment.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.sdk.workflow">
<HintPath>..\..\..\..\..\Projects\websitepanel_v2.0.0.CRM2011.Patch\WebsitePanel\Sources\WebsitePanel.Server\bin\microsoft.xrm.sdk.workflow.dll</HintPath>
<Reference Include="microsoft.xrm.sdk.workflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.sdk.workflow.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
@ -153,6 +161,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\System.Management.Automation.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml" />
@ -163,11 +173,13 @@
</Compile>
<Compile Include="BlackBerry5Provider.cs" />
<Compile Include="BlackBerryProvider.cs" />
<Compile Include="CRMProvider2011.cs" />
<Compile Include="Exchange2010.cs" />
<Compile Include="Exchange2010SP2.cs" />
<Compile Include="HostedSharePointServer2010.cs" />
<Compile Include="Lync2010.cs" />
<Compile Include="LyncTransaction.cs" />
<Compile Include="myorganizationcrmsdktypes.cs" />
<Compile Include="OCSEdge2007R2.cs" />
<Compile Include="OCS2007R2.cs" />
<Compile Include="CRMProvider.cs" />

View file

@ -172,8 +172,12 @@ namespace WebsitePanel.Portal.CRM
return;
}
OrganizationResult res = ES.Services.CRM.CreateOrganization(org.Id, cuurrencyData[0], cuurrencyData[1], cuurrencyData[2], cuurrencyData[3],
EnterpriseServer.esCRM CRM = ES.Services.CRM;
CRM.Timeout = 7200000; //# Set longer timeout
OrganizationResult res = CRM.CreateOrganization(org.Id, cuurrencyData[0], cuurrencyData[1], cuurrencyData[2], cuurrencyData[3],
administrator.GetAccountId(), ddlCollation.SelectedValue);
messageBox.ShowMessage(res, "CreateCrmOrganization", "HostedCRM");

View file

@ -0,0 +1,64 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CRM2011_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.CRM2011_Settings" %>
<%@ Register Src="../UserControls/SelectIPAddress.ascx" TagName="SelectIPAddress" TagPrefix="wsp" %>
<table>
<tr>
<td class="SubHead" width="200" nowrap>Sql Server</td>
<td>
<asp:TextBox runat="server" ID="txtSqlServer" MaxLength="256" Width="200px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSqlServer" Display="Dynamic" ErrorMessage="*" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Reporting URL </td>
<td class="Normal" width="100%">
<asp:TextBox runat="server" Width="200px" ID="txtReportingService" MaxLength="256" />
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtReportingService" Display="Dynamic" ErrorMessage="*" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Web Application Server Domain</td>
<td class="Normal" width="100%">
<asp:TextBox runat="server" Width="200px" ID="txtDomainName" MaxLength="256" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtDomainName" Display="Dynamic" ErrorMessage="*" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Web Application Domain Scheme</td>
<td class="Normal" width="100%">
<asp:DropDownList runat="server" ID="ddlSchema">
<asp:ListItem Text="http" Value="http" />
<asp:ListItem Text="https" Value="https" />
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>CRM Website IP</td>
<td class="Normal" width="100%">
<wsp:SelectIPAddress ID="ddlCrmIpAddress" runat="server" ServerIdParam="ServerID" AllowEmptySelection="false" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>CRM Website Port</td>
<td class="Normal" width="100%">
<asp:TextBox runat="server" ID="txtPort" Width="200px" />
<asp:RangeValidator runat="server" ControlToValidate="txtPort" Display="dynamic" ErrorMessage="*" Type="String" MinimumValue="0" MaximumValue="9" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Deployment web service</td>
<td class="Normal" width="100%">
<asp:TextBox runat="server" ID="txtAppRootDomain" Width="200px" />
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtAppRootDomain" ErrorMessage="*" />
</td>
</tr>
</table>

View file

@ -0,0 +1,99 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.Common;
namespace WebsitePanel.Portal.ProviderControls
{
public partial class CRM2011_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
{
protected void Page_Load(object sender, EventArgs e)
{
}
public void BindSettings(System.Collections.Specialized.StringDictionary settings)
{
txtReportingService.Text = settings[Constants.ReportingServer];
txtSqlServer.Text = settings[Constants.SqlServer];
txtDomainName.Text = settings[Constants.IFDWebApplicationRootDomain];
txtPort.Text = settings[Constants.Port];
txtAppRootDomain.Text = settings[Constants.AppRootDomain];
int selectedAddressid = FindAddressByText(settings[Constants.CRMWebsiteIP]);
ddlCrmIpAddress.AddressId = (selectedAddressid > 0) ? selectedAddressid : 0;
ddlSchema.SelectedValue = settings[Constants.UrlSchema];
}
public void SaveSettings(System.Collections.Specialized.StringDictionary settings)
{
settings[Constants.ReportingServer] = txtReportingService.Text;
settings[Constants.SqlServer] = txtSqlServer.Text;
settings[Constants.IFDWebApplicationRootDomain] = txtDomainName.Text;
settings[Constants.Port] = txtPort.Text;
settings[Constants.AppRootDomain] = txtAppRootDomain.Text;
if (ddlCrmIpAddress.AddressId > 0)
{
IPAddressInfo address = ES.Services.Servers.GetIPAddress(ddlCrmIpAddress.AddressId);
if (String.IsNullOrEmpty(address.ExternalIP))
{
settings[Constants.CRMWebsiteIP] = address.InternalIP;
}
else
{
settings[Constants.CRMWebsiteIP] = address.ExternalIP;
}
}
else
{
settings[Constants.CRMWebsiteIP] = String.Empty;
}
settings[Constants.UrlSchema] = ddlSchema.SelectedValue;
}
private static int FindAddressByText(string address)
{
foreach (IPAddressInfo addressInfo in ES.Services.Servers.GetIPAddresses(IPAddressPool.General, PanelRequest.ServerId))
{
if (addressInfo.InternalIP == address || addressInfo.ExternalIP == address)
{
return addressInfo.AddressId;
}
}
return 0;
}
}
}

View file

@ -0,0 +1,96 @@
//------------------------------------------------------------------------------
// <автоматически создаваемое>
// Этот код создан программой.
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </автоматически создаваемое>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.ProviderControls {
public partial class CRM2011_Settings {
/// <summary>
/// txtSqlServer элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtSqlServer;
/// <summary>
/// RequiredFieldValidator1 элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
/// <summary>
/// txtReportingService элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtReportingService;
/// <summary>
/// txtDomainName элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtDomainName;
/// <summary>
/// RequiredFieldValidator2 элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
/// <summary>
/// ddlSchema элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlSchema;
/// <summary>
/// ddlCrmIpAddress элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::WebsitePanel.Portal.SelectIPAddress ddlCrmIpAddress;
/// <summary>
/// txtPort элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPort;
/// <summary>
/// txtAppRootDomain элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtAppRootDomain;
}
}

View file

@ -318,6 +318,12 @@
<Compile Include="Lync\UserControls\LyncUserPlanSelector.ascx.designer.cs">
<DependentUpon>LyncUserPlanSelector.ascx</DependentUpon>
</Compile>
<Compile Include="ProviderControls\CRM2011_Settings.ascx.cs">
<DependentUpon>CRM2011_Settings.ascx</DependentUpon>
</Compile>
<Compile Include="ProviderControls\CRM2011_Settings.ascx.designer.cs">
<DependentUpon>CRM2011_Settings.ascx</DependentUpon>
</Compile>
<Compile Include="ProviderControls\hMailServer5_EditAccount.ascx.cs">
<DependentUpon>hMailServer5_EditAccount.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -3823,6 +3829,7 @@
<Content Include="ExchangeServer\OrganizationDomainNames.ascx" />
<Content Include="ExchangeServer\ExchangeAddMailboxPlan.ascx" />
<Content Include="Lync\UserControls\LyncUserSettings.ascx" />
<Content Include="ProviderControls\CRM2011_Settings.ascx" />
<Content Include="ServersEditWebPlatformInstaller.ascx" />
<Content Include="ExchangeServer\ExchangeMailboxPlans.ascx" />
<Content Include="ExchangeServer\UserControls\AccountsListWithPermissions.ascx" />