Merge
This commit is contained in:
commit
d67ac1ebba
18 changed files with 168 additions and 62 deletions
|
@ -2102,7 +2102,7 @@ AS
|
||||||
|
|
||||||
RETURN @Result
|
RETURN @Result
|
||||||
END
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2173,6 +2173,12 @@ exec sp_executesql @sql, N'@ItemID int, @IncludeMailboxes int, @IncludeContacts
|
||||||
RETURN
|
RETURN
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SearchExchangeAccountsByTypes')
|
||||||
|
DROP PROCEDURE [dbo].[SearchExchangeAccountsByTypes]
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
CREATE PROCEDURE [dbo].[SearchExchangeAccountsByTypes]
|
CREATE PROCEDURE [dbo].[SearchExchangeAccountsByTypes]
|
||||||
(
|
(
|
||||||
@ActorID int,
|
@ActorID int,
|
||||||
|
|
|
@ -188,6 +188,22 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// get type properties
|
// get type properties
|
||||||
PropertyInfo[] props = GetTypeProperties(type);
|
PropertyInfo[] props = GetTypeProperties(type);
|
||||||
|
|
||||||
|
// leave only a property from the DataReader
|
||||||
|
DataTable readerSchema = reader.GetSchemaTable();
|
||||||
|
if (readerSchema != null)
|
||||||
|
{
|
||||||
|
List<PropertyInfo> propslist = new List<PropertyInfo>();
|
||||||
|
foreach (DataRow field in readerSchema.Rows)
|
||||||
|
{
|
||||||
|
string columnName = System.Convert.ToString(field["ColumnName"]);
|
||||||
|
|
||||||
|
foreach (PropertyInfo prop in props)
|
||||||
|
if (columnName.ToLower() == prop.Name.ToLower())
|
||||||
|
propslist.Add(prop);
|
||||||
|
}
|
||||||
|
props = propslist.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
// iterate through reader
|
// iterate through reader
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
|
|
|
@ -2034,6 +2034,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
DataProvider.SearchOrganizationAccounts(SecurityContext.User.UserId, itemId,
|
DataProvider.SearchOrganizationAccounts(SecurityContext.User.UserId, itemId,
|
||||||
filterColumn, filterValue, sortColumn, includeMailboxes));
|
filterColumn, filterValue, sortColumn, includeMailboxes));
|
||||||
|
|
||||||
|
return Tmpaccounts;
|
||||||
|
|
||||||
|
// on large lists is very slow
|
||||||
|
/*
|
||||||
List<OrganizationUser> Accounts = new List<OrganizationUser>();
|
List<OrganizationUser> Accounts = new List<OrganizationUser>();
|
||||||
|
|
||||||
foreach (OrganizationUser user in Tmpaccounts.ToArray())
|
foreach (OrganizationUser user in Tmpaccounts.ToArray())
|
||||||
|
@ -2042,6 +2046,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
return Accounts;
|
return Accounts;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName)
|
public static int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName)
|
||||||
|
|
|
@ -45,6 +45,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string[] GetGroupObjects(string group, string objectType)
|
public static string[] GetGroupObjects(string group, string objectType)
|
||||||
|
{
|
||||||
|
return GetGroupObjects(group, objectType, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string[] GetGroupObjects(string group, string objectType, DirectoryEntry entry)
|
||||||
{
|
{
|
||||||
List<string> rets = new List<string>();
|
List<string> rets = new List<string>();
|
||||||
|
|
||||||
|
@ -54,6 +59,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
"(&(objectClass=" + objectType + "))"
|
"(&(objectClass=" + objectType + "))"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (entry != null)
|
||||||
|
{
|
||||||
|
deSearch.SearchRoot = entry;
|
||||||
|
}
|
||||||
|
|
||||||
SearchResultCollection srcObjects = deSearch.FindAll();
|
SearchResultCollection srcObjects = deSearch.FindAll();
|
||||||
|
|
||||||
foreach (SearchResult srcObject in srcObjects)
|
foreach (SearchResult srcObject in srcObjects)
|
||||||
|
|
|
@ -918,8 +918,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
throw new ArgumentNullException("groupName");
|
throw new ArgumentNullException("groupName");
|
||||||
|
|
||||||
string path = GetGroupPath(organizationId, groupName);
|
string path = GetGroupPath(organizationId, groupName);
|
||||||
|
string organizationPath = GetOrganizationPath(organizationId);
|
||||||
|
|
||||||
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
DirectoryEntry organizationEntry = ActiveDirectoryUtils.GetADObject(organizationPath);
|
||||||
|
|
||||||
|
|
||||||
OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup();
|
OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup();
|
||||||
|
|
||||||
|
@ -930,7 +933,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
List<ExchangeAccount> members = new List<ExchangeAccount>();
|
List<ExchangeAccount> members = new List<ExchangeAccount>();
|
||||||
|
|
||||||
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user"))
|
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user", organizationEntry))
|
||||||
{
|
{
|
||||||
OrganizationUser tmpUser = GetUser(userPath);
|
OrganizationUser tmpUser = GetUser(userPath);
|
||||||
|
|
||||||
|
@ -941,7 +944,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (string groupPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "group"))
|
foreach (string groupPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "group", organizationEntry))
|
||||||
{
|
{
|
||||||
DirectoryEntry groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);
|
DirectoryEntry groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
members.Enabled = false;
|
members.Enabled = false;
|
||||||
|
|
||||||
btnSave.Visible = false;
|
btnSave.Visible = false;
|
||||||
|
tabs.IsDefault = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -51,7 +51,6 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
{
|
{
|
||||||
// get settings
|
// get settings
|
||||||
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
//OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
litDisplayName.Text = group.DisplayName;
|
litDisplayName.Text = group.DisplayName;
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
chkIncludeLists.Visible = DistributionListsEnabled;
|
chkIncludeLists.Visible = DistributionListsEnabled;
|
||||||
chkIncludeLists.Checked = DistributionListsEnabled;
|
chkIncludeLists.Checked = DistributionListsEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// increase timeout
|
||||||
|
ScriptManager scriptMngr = ScriptManager.GetCurrent(this.Page);
|
||||||
|
scriptMngr.AsyncPostBackTimeout = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindSelectedAccount(ExchangeAccount account)
|
private void BindSelectedAccount(ExchangeAccount account)
|
||||||
|
|
|
@ -44,6 +44,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
set { selectedTab = value; }
|
set { selectedTab = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool isDefault = false;
|
||||||
|
public bool IsDefault
|
||||||
|
{
|
||||||
|
get { return isDefault; }
|
||||||
|
set { isDefault = value; }
|
||||||
|
}
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
BindTabs();
|
BindTabs();
|
||||||
|
@ -53,7 +60,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
{
|
{
|
||||||
List<Tab> tabsList = new List<Tab>();
|
List<Tab> tabsList = new List<Tab>();
|
||||||
tabsList.Add(CreateTab("secur_group_settings", "Tab.Settings"));
|
tabsList.Add(CreateTab("secur_group_settings", "Tab.Settings"));
|
||||||
|
if (!isDefault)
|
||||||
|
{
|
||||||
tabsList.Add(CreateTab("secur_group_memberof", "Tab.MemberOf"));
|
tabsList.Add(CreateTab("secur_group_memberof", "Tab.MemberOf"));
|
||||||
|
}
|
||||||
|
|
||||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
// increase timeout
|
||||||
|
ScriptManager scriptMngr = ScriptManager.GetCurrent(this.Page);
|
||||||
|
scriptMngr.AsyncPostBackTimeout = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindSelectedAccount(OrganizationUser account)
|
private void BindSelectedAccount(OrganizationUser account)
|
||||||
|
@ -288,6 +290,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
if (e.CommandName == "SelectAccount")
|
if (e.CommandName == "SelectAccount")
|
||||||
{
|
{
|
||||||
string[] parts = e.CommandArgument.ToString().Split('|');
|
string[] parts = e.CommandArgument.ToString().Split('|');
|
||||||
|
|
||||||
|
/*
|
||||||
OrganizationUser account = new OrganizationUser();
|
OrganizationUser account = new OrganizationUser();
|
||||||
account.AccountName = parts[0];
|
account.AccountName = parts[0];
|
||||||
account.DisplayName = parts[1];
|
account.DisplayName = parts[1];
|
||||||
|
@ -295,6 +299,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
account.AccountId = Utils.ParseInt(parts[3]);
|
account.AccountId = Utils.ParseInt(parts[3]);
|
||||||
account.SamAccountName = parts[4];
|
account.SamAccountName = parts[4];
|
||||||
account.SubscriberNumber = parts[5];
|
account.SubscriberNumber = parts[5];
|
||||||
|
*/
|
||||||
|
|
||||||
|
int AccountId = Utils.ParseInt(parts[3]);
|
||||||
|
|
||||||
|
OrganizationUser account = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, AccountId);
|
||||||
|
|
||||||
// set account
|
// set account
|
||||||
BindSelectedAccount(account);
|
BindSelectedAccount(account);
|
||||||
|
|
|
@ -42,12 +42,10 @@ namespace WebsitePanel.Portal.Lync
|
||||||
{
|
{
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
PackageContext cntx = null;
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
|
|
||||||
|
|
||||||
string[] archivePolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Archiving, null);
|
string[] archivePolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Archiving, null);
|
||||||
if (archivePolicy != null)
|
if (archivePolicy != null)
|
||||||
{
|
{
|
||||||
|
@ -95,22 +93,15 @@ namespace WebsitePanel.Portal.Lync
|
||||||
*/
|
*/
|
||||||
|
|
||||||
chkRemoteUserAccess.Checked = plan.RemoteUserAccess;
|
chkRemoteUserAccess.Checked = plan.RemoteUserAccess;
|
||||||
|
|
||||||
chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous;
|
chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous;
|
||||||
|
|
||||||
ddTelephony.SelectedIndex = plan.Telephony;
|
Utils.SelectListItem(ddTelephony, plan.Telephony);
|
||||||
|
|
||||||
tbServerURI.Text = plan.ServerURI;
|
tbServerURI.Text = plan.ServerURI;
|
||||||
|
|
||||||
locTitle.Text = plan.LyncUserPlanName;
|
string planArchivePolicy = ""; if (plan.ArchivePolicy != null) planArchivePolicy = plan.ArchivePolicy;
|
||||||
this.DisableControls = true;
|
string planTelephonyDialPlanPolicy = ""; if (plan.TelephonyDialPlanPolicy != null) planTelephonyDialPlanPolicy = plan.TelephonyDialPlanPolicy;
|
||||||
|
string planTelephonyVoicePolicy = ""; if (plan.TelephonyVoicePolicy != null) planTelephonyVoicePolicy = plan.TelephonyVoicePolicy;
|
||||||
string planArchivePolicy = "";
|
|
||||||
if (plan.ArchivePolicy != null) planArchivePolicy = plan.ArchivePolicy;
|
|
||||||
string planTelephonyDialPlanPolicy = "";
|
|
||||||
if (plan.TelephonyDialPlanPolicy != null) planTelephonyDialPlanPolicy = plan.TelephonyDialPlanPolicy;
|
|
||||||
string planTelephonyVoicePolicy = "";
|
|
||||||
if (plan.TelephonyVoicePolicy != null) planTelephonyVoicePolicy = plan.TelephonyVoicePolicy;
|
|
||||||
|
|
||||||
ddArchivingPolicy.Items.Clear();
|
ddArchivingPolicy.Items.Clear();
|
||||||
ddArchivingPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planArchivePolicy.Replace("Tag:", ""), planArchivePolicy));
|
ddArchivingPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planArchivePolicy.Replace("Tag:", ""), planArchivePolicy));
|
||||||
|
@ -119,12 +110,16 @@ namespace WebsitePanel.Portal.Lync
|
||||||
ddTelephonyVoicePolicy.Items.Clear();
|
ddTelephonyVoicePolicy.Items.Clear();
|
||||||
ddTelephonyVoicePolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planTelephonyVoicePolicy.Replace("Tag:", ""), planTelephonyVoicePolicy));
|
ddTelephonyVoicePolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planTelephonyVoicePolicy.Replace("Tag:", ""), planTelephonyVoicePolicy));
|
||||||
|
|
||||||
|
locTitle.Text = plan.LyncUserPlanName;
|
||||||
|
this.DisableControls = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
chkIM.Checked = true;
|
chkIM.Checked = true;
|
||||||
chkIM.Enabled = false;
|
chkIM.Enabled = false;
|
||||||
|
|
||||||
// chkNone.Checked = true; because not used
|
// chkNone.Checked = true; because not used
|
||||||
|
|
||||||
if (cntx != null)
|
if (cntx != null)
|
||||||
{
|
{
|
||||||
foreach (QuotaValueInfo quota in cntx.QuotasArray)
|
foreach (QuotaValueInfo quota in cntx.QuotasArray)
|
||||||
|
@ -139,10 +134,6 @@ namespace WebsitePanel.Portal.Lync
|
||||||
chkConferencing.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
chkConferencing.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
||||||
chkConferencing.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
chkConferencing.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
||||||
break;
|
break;
|
||||||
case 375:
|
|
||||||
chkEnterpriseVoice.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
|
||||||
chkEnterpriseVoice.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,32 +142,29 @@ namespace WebsitePanel.Portal.Lync
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||||
|
|
||||||
|
PlanFeaturesTelephony.Visible = enterpriseVoiceQuota;
|
||||||
|
secPlanFeaturesTelephony.Visible = enterpriseVoiceQuota;
|
||||||
|
if (!enterpriseVoiceQuota) Utils.SelectListItem(ddTelephony, "0");
|
||||||
|
|
||||||
|
bool enterpriseVoice = enterpriseVoiceQuota && (ddTelephony.SelectedValue == "2");
|
||||||
|
|
||||||
chkEnterpriseVoice.Enabled = false;
|
chkEnterpriseVoice.Enabled = false;
|
||||||
chkEnterpriseVoice.Checked = false;
|
chkEnterpriseVoice.Checked = enterpriseVoice;
|
||||||
|
pnEnterpriseVoice.Visible = enterpriseVoice;
|
||||||
|
|
||||||
pnEnterpriseVoice.Visible = false;
|
switch (ddTelephony.SelectedValue)
|
||||||
pnServerURI.Visible = false;
|
|
||||||
|
|
||||||
switch (ddTelephony.SelectedIndex)
|
|
||||||
{
|
{
|
||||||
case 1:
|
case "3":
|
||||||
break;
|
case "4":
|
||||||
case 2:
|
|
||||||
pnEnterpriseVoice.Visible = true;
|
|
||||||
chkEnterpriseVoice.Checked = true;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
pnServerURI.Visible = true;
|
pnServerURI.Visible = true;
|
||||||
break;
|
break;
|
||||||
case 4:
|
default:
|
||||||
pnServerURI.Visible = true;
|
pnServerURI.Visible = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
|
||||||
PlanFeaturesTelephony.Visible = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
|
||||||
secPlanFeaturesTelephony.Visible = PlanFeaturesTelephony.Visible;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,6 +208,8 @@ namespace WebsitePanel.Portal.Lync
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
|
||||||
Providers.HostedSolution.LyncUserPlan plan = new Providers.HostedSolution.LyncUserPlan();
|
Providers.HostedSolution.LyncUserPlan plan = new Providers.HostedSolution.LyncUserPlan();
|
||||||
plan.LyncUserPlanName = txtPlan.Text;
|
plan.LyncUserPlanName = txtPlan.Text;
|
||||||
plan.IsDefault = false;
|
plan.IsDefault = false;
|
||||||
|
@ -229,8 +219,10 @@ namespace WebsitePanel.Portal.Lync
|
||||||
plan.Federation = chkFederation.Checked;
|
plan.Federation = chkFederation.Checked;
|
||||||
plan.Conferencing = chkConferencing.Checked;
|
plan.Conferencing = chkConferencing.Checked;
|
||||||
|
|
||||||
|
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||||
|
bool enterpriseVoice = enterpriseVoiceQuota && (ddTelephony.SelectedValue == "2");
|
||||||
|
|
||||||
plan.EnterpriseVoice = chkEnterpriseVoice.Checked;
|
plan.EnterpriseVoice = enterpriseVoice;
|
||||||
|
|
||||||
plan.VoicePolicy = LyncVoicePolicyType.None;
|
plan.VoicePolicy = LyncVoicePolicyType.None;
|
||||||
|
|
||||||
|
@ -259,7 +251,9 @@ namespace WebsitePanel.Portal.Lync
|
||||||
|
|
||||||
plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked;
|
plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked;
|
||||||
|
|
||||||
plan.Telephony = ddTelephony.SelectedIndex;
|
int telephonyId = -1;
|
||||||
|
int.TryParse(ddTelephony.SelectedValue, out telephonyId);
|
||||||
|
plan.Telephony = telephonyId;
|
||||||
|
|
||||||
plan.ServerURI = tbServerURI.Text;
|
plan.ServerURI = tbServerURI.Text;
|
||||||
|
|
||||||
|
|
|
@ -75,21 +75,24 @@ namespace WebsitePanel.Portal.Lync
|
||||||
|
|
||||||
protected void Page_PreRender(object sender, EventArgs e)
|
protected void Page_PreRender(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
bool EnterpriseVoice = false;
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||||
|
|
||||||
|
bool enterpriseVoice = false;
|
||||||
|
|
||||||
WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan;
|
WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan;
|
||||||
if (plan != null)
|
if (plan != null)
|
||||||
EnterpriseVoice = plan.EnterpriseVoice;
|
enterpriseVoice = plan.EnterpriseVoice && enterpriseVoiceQuota && (ddlPhoneNumber.Items.Count > 0);
|
||||||
|
|
||||||
pnEnterpriseVoice.Visible = EnterpriseVoice && (ddlPhoneNumber.Items.Count>0);
|
pnEnterpriseVoice.Visible = enterpriseVoice;
|
||||||
|
|
||||||
if (!EnterpriseVoice)
|
if (!enterpriseVoice)
|
||||||
{
|
{
|
||||||
ddlPhoneNumber.Text = "";
|
ddlPhoneNumber.Text = "";
|
||||||
tbPin.Text = "";
|
tbPin.Text = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EnterpriseVoice)
|
if (enterpriseVoice)
|
||||||
{
|
{
|
||||||
string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength");
|
string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength");
|
||||||
if (pinPolicy != null)
|
if (pinPolicy != null)
|
||||||
|
@ -115,9 +118,15 @@ namespace WebsitePanel.Portal.Lync
|
||||||
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||||
|
|
||||||
|
string lineUri = "";
|
||||||
|
if (enterpriseVoiceQuota) lineUri = ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text;
|
||||||
|
|
||||||
//#1
|
//#1
|
||||||
LyncUser lyncUser = ES.Services.Lync.GetLyncUserGeneralSettings(PanelRequest.ItemID, accountId);
|
LyncUser lyncUser = ES.Services.Lync.GetLyncUserGeneralSettings(PanelRequest.ItemID, accountId);
|
||||||
ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, accountId, lyncUser.SipAddress, ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text);
|
ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, accountId, lyncUser.SipAddress, lineUri);
|
||||||
|
|
||||||
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_lync_user",
|
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_lync_user",
|
||||||
"SpaceID=" + PanelSecurity.PackageId,
|
"SpaceID=" + PanelSecurity.PackageId,
|
||||||
|
|
|
@ -70,21 +70,24 @@ namespace WebsitePanel.Portal.Lync
|
||||||
|
|
||||||
protected void Page_PreRender(object sender, EventArgs e)
|
protected void Page_PreRender(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
bool EnterpriseVoice = false;
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||||
|
|
||||||
|
bool enterpriseVoice = false;
|
||||||
|
|
||||||
WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan;
|
WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan;
|
||||||
if (plan != null)
|
if (plan != null)
|
||||||
EnterpriseVoice = plan.EnterpriseVoice;
|
enterpriseVoice = plan.EnterpriseVoice && enterpriseVoiceQuota && (ddlPhoneNumber.Items.Count > 0);
|
||||||
|
|
||||||
pnEnterpriseVoice.Visible = EnterpriseVoice && (ddlPhoneNumber.Items.Count>0);
|
pnEnterpriseVoice.Visible = enterpriseVoice;
|
||||||
|
|
||||||
if (!EnterpriseVoice)
|
if (!enterpriseVoice)
|
||||||
{
|
{
|
||||||
ddlPhoneNumber.Text = "";
|
ddlPhoneNumber.Text = "";
|
||||||
tbPin.Text = "";
|
tbPin.Text = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EnterpriseVoice)
|
if (enterpriseVoice)
|
||||||
{
|
{
|
||||||
string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength");
|
string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength");
|
||||||
if (pinPolicy != null)
|
if (pinPolicy != null)
|
||||||
|
@ -123,10 +126,16 @@ namespace WebsitePanel.Portal.Lync
|
||||||
return;
|
return;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||||
|
|
||||||
|
string lineUri = "";
|
||||||
|
if (enterpriseVoiceQuota) lineUri = ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text;
|
||||||
|
|
||||||
LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId));
|
LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId));
|
||||||
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
||||||
{
|
{
|
||||||
res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text);
|
res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, lineUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Security;
|
using System.Web.Security;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
|
@ -73,7 +74,15 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ddlServer.DataSource = ES.Services.Servers.GetServers();
|
ServerInfo[] allServers = ES.Services.Servers.GetServers();
|
||||||
|
List<ServerInfo> servers = new List<ServerInfo>();
|
||||||
|
foreach(ServerInfo server in allServers)
|
||||||
|
{
|
||||||
|
ServiceInfo[] service = ES.Services.Servers.GetServicesByServerIdGroupName(server.ServerId, ResourceGroups.Lync);
|
||||||
|
if (service.Length>0) servers.Add(server);
|
||||||
|
}
|
||||||
|
|
||||||
|
ddlServer.DataSource = servers;
|
||||||
ddlServer.DataBind();
|
ddlServer.DataBind();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Security;
|
using System.Web.Security;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
|
@ -96,7 +97,16 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
private void BindServers()
|
private void BindServers()
|
||||||
{
|
{
|
||||||
ddlServer.DataSource = ES.Services.Servers.GetServers();
|
ServerInfo[] allServers = ES.Services.Servers.GetServers();
|
||||||
|
List<ServerInfo> servers = new List<ServerInfo>();
|
||||||
|
foreach (ServerInfo server in allServers)
|
||||||
|
{
|
||||||
|
ServiceInfo[] service = ES.Services.Servers.GetServicesByServerIdGroupName(server.ServerId, ResourceGroups.Lync);
|
||||||
|
if (service.Length > 0) servers.Add(server);
|
||||||
|
}
|
||||||
|
|
||||||
|
ddlServer.DataSource = servers;
|
||||||
|
|
||||||
ddlServer.DataBind();
|
ddlServer.DataBind();
|
||||||
ddlServer.Items.Insert(0, new ListItem(GetLocalizedString("Text.NotAssigned"), ""));
|
ddlServer.Items.Insert(0, new ListItem(GetLocalizedString("Text.NotAssigned"), ""));
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,5 +79,11 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
ddlFilterColumn.Items.Add(new ListItem(columnTitle, columnName));
|
ddlFilterColumn.Items.Add(new ListItem(columnTitle, columnName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Focus()
|
||||||
|
{
|
||||||
|
base.Focus();
|
||||||
|
txtFilterValue.Focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -67,7 +67,10 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
|
|
||||||
gvUsers.Sort("Username", System.Web.UI.WebControls.SortDirection.Ascending);
|
gvUsers.Sort("Username", System.Web.UI.WebControls.SortDirection.Ascending);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
searchBox.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetUserHomePageUrl(int userId)
|
public string GetUserHomePageUrl(int userId)
|
||||||
|
|
|
@ -44,6 +44,9 @@ namespace WebsitePanel.Portal
|
||||||
this.ContainerControl.Visible = (PanelSecurity.SelectedUser.Role != UserRole.User);
|
this.ContainerControl.Visible = (PanelSecurity.SelectedUser.Role != UserRole.User);
|
||||||
lnkAllCustomers.NavigateUrl = NavigatePageURL(PortalUtils.GetUserCustomersPageId(),
|
lnkAllCustomers.NavigateUrl = NavigatePageURL(PortalUtils.GetUserCustomersPageId(),
|
||||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString());
|
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString());
|
||||||
|
|
||||||
|
if (!IsPostBack)
|
||||||
|
txtFilterValue.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindGroupings()
|
private void BindGroupings()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue