private void BindPolicy() { try { // read limits ExchangeActiveSyncPolicy policy = ES.Services.ExchangeServer.GetActiveSyncPolicy(PanelRequest.ItemID); // bind data chkAllowNonProvisionable.Checked = policy.AllowNonProvisionableDevices; chkAllowAttachments.Checked = policy.AttachmentsEnabled; sizeMaxAttachmentSize.ValueKB = policy.MaxAttachmentSizeKB; chkWindowsFileShares.Checked = policy.UNCAccessEnabled; chkWindowsSharePoint.Checked = policy.WSSAccessEnabled; chkRequirePasword.Checked = policy.DevicePasswordEnabled; chkRequireAlphaNumeric.Checked = policy.AlphanumericPasswordRequired; chkEnablePasswordRecovery.Checked = policy.PasswordRecoveryEnabled; chkRequireEncryption.Checked = policy.DeviceEncryptionEnabled; chkAllowSimplePassword.Checked = policy.AllowSimplePassword; sizeNumberAttempts.ValueKB = policy.MaxPasswordFailedAttempts; sizeMinimumPasswordLength.ValueKB = policy.MinPasswordLength; sizeTimeReenter.ValueKB = policy.InactivityLockMin; sizePasswordExpiration.ValueKB = policy.PasswordExpirationDays; sizePasswordHistory.ValueKB = policy.PasswordHistory; hoursRefreshInterval.ValueHours = policy.RefreshInterval; ToggleControls(); } catch (Exception ex) { messageBox.ShowErrorMessage("EXCHANGE_GET_ACTIVESYNC_POLICY", ex); } }
public ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId) { try { LogStart("GetActiveSyncPolicy"); ExchangeActiveSyncPolicy ret = ES.GetActiveSyncPolicy(organizationId); LogEnd("GetActiveSyncPolicy"); return(ret); } catch (Exception ex) { LogError("GetActiveSyncPolicy", ex); throw; } }