private void DisplayResults <T>(PowerShellResults <T> results) where T : PimSubscription { if (results.Failed) { if (results.ErrorRecords[0].Exception is ManagementObjectNotFoundException) { ErrorHandlingUtil.TransferToErrorPage("liveidmismatch"); return; } if (results.ErrorRecords[0].Exception is ValidateSecretFailureException) { ErrorHandlingUtil.TransferToErrorPage("verificationfailed"); return; } ErrorHandlingUtil.TransferToErrorPage("verificationprocessingerror"); return; } else { if (results.Output.Length == 0) { ErrorHandlingUtil.TransferToErrorPage("verificationprocessingerror"); return; } this.msgText.Text = OwaOptionStrings.VerificationSuccessText(results.Output[0].EmailAddress); base.Title = OwaOptionStrings.VerificationSuccessPageTitle; return; } }
protected override void CreateChildControls() { this.summaryTable = new Table(); this.summaryTable.ID = "summaryTable"; TableRow tableRow = new TableRow(); EncodingLabel encodingLabel = new EncodingLabel(); encodingLabel.Text = OwaOptionStrings.SummaryToDate; this.recipientsStatusLinksCell = new TableCell(); this.recipientsStatusLinksCell.Controls.Add(encodingLabel); this.recipientsStatusLinksCell.ID = "recipientStatusLinks"; tableRow.Cells.Add(this.recipientsStatusLinksCell); this.largeRecipientsTextRow = new TableRow(); this.largeRecipientsTextRow.ID = "largeRecipTxtRow"; TableCell tableCell = new TableCell(); EncodingLabel encodingLabel2 = new EncodingLabel(); encodingLabel2.Text = OwaOptionStrings.LargeRecipientList(30); tableCell.Controls.Add(encodingLabel2); this.largeRecipientsTextRow.Cells.Add(tableCell); this.summaryTable.Rows.Add(tableRow); this.summaryTable.Rows.Add(this.largeRecipientsTextRow); this.Controls.Add(this.summaryTable); this.AddNewMailMessageWebServiceMthod(); base.CreateChildControls(); }
public PowerShellResults JoinGroups(Identity[] identities) { identities.FaultIfNullOrEmpty(); Identity groupIdentityForTranslation = DistributionGroupServiceBase.GetGroupIdentityForTranslation(identities); PowerShellResults powerShellResults = new PowerShellResults(); int num = 0; int num2 = -1; for (int i = 0; i < identities.Length; i++) { PSCommand psCommand = new PSCommand().AddCommand("Add-DistributionGroupMember").AddParameter("Identity", identities[i]); PowerShellResults powerShellResults2 = base.Invoke(psCommand, groupIdentityForTranslation, null); if (powerShellResults2.SucceededWithoutWarnings) { num++; if (num == 1) { num2 = i; } } powerShellResults.MergeErrors(powerShellResults2); } if (num > 0) { string text = (num == 1) ? OwaOptionStrings.JoinDlSuccess(identities[num2].DisplayName) : ((num == identities.Length) ? OwaOptionStrings.JoinDlsSuccess(num) : OwaOptionStrings.JoinOtherDlsSuccess(num)); powerShellResults.Informations = new string[] { text }; } return(powerShellResults); }
private void InitializePage2() { if (this.importResult != null) { Label label = (Label)this.wizardPage2.FindControl("lblImportResult"); label.Text = OwaOptionStrings.ImportContactListPage2Result(this.filename); Label label2 = (Label)this.wizardPage2.FindControl("lblImportResultNumber"); label2.Text = OwaOptionStrings.ImportContactListPage2ResultNumber(this.importResult.ContactsImported); } }
public PowerShellResults <PimSubscription> NewObject(NewSubscription properties) { PowerShellResults <PimSubscription> powerShellResults = base.NewObject <PimSubscription, NewSubscription>("New-Subscription", properties); if (powerShellResults.Succeeded) { string text = OwaOptionStrings.NewSubscriptionSucceed(powerShellResults.Output[0].VerificationFeedbackString); powerShellResults.Informations = new string[] { text }; Util.NotifyOWAUserSettingsChanged(UserSettings.Mail); } return(powerShellResults); }
private string GetVoiceMailAccessNumbers() { string text = string.Empty; if (base.UMDialPlan.AccessTelephoneNumbers != null) { foreach (string text2 in base.UMDialPlan.AccessTelephoneNumbers) { if (!string.IsNullOrEmpty(text2)) { if (text.Length == 0) { text = text2; } else { text = text + " " + OwaOptionStrings.VoicemailAccessNumbersTemplate(text2).ToString(); } } } } return(text); }
public PowerShellResults <PopSubscription> SetObject(Identity identity, SetPopSubscription properties) { PowerShellResults <PopSubscription> powerShellResults = base.SetObject <PopSubscription, SetPopSubscription>("Set-PopSubscription", identity, properties); if (powerShellResults.Succeeded) { PowerShellResults <PopSubscription> @object = this.GetObject(identity); if (@object.Succeeded) { string verificationFeedbackString = @object.Output[0].VerificationFeedbackString; if (verificationFeedbackString != null) { string text = OwaOptionStrings.SetSubscriptionSucceed(verificationFeedbackString); powerShellResults.Informations = new string[] { text }; } } Util.NotifyOWAUserSettingsChanged(UserSettings.Mail); } return(powerShellResults); }