private void BindUser() { try { UserInfo user = UsersHelper.GetUser(PanelSecurity.SelectedUserId); if (user != null) { // account info lblUsername.Text = user.Username; // password policy userPassword.SetUserPolicy(PanelSecurity.SelectedUserId, UserSettings.SolidCP_POLICY, "PasswordPolicy"); userPassword.ValidationGroup = "NewPassword"; } else { // can't be found RedirectBack(); } if (PanelSecurity.LoggedUserId == PanelSecurity.SelectedUserId) { trChangePasswordWarning.Visible = true; string changePasswordWarningText = GetSharedLocalizedString(changePasswordWarningKey); if (!String.IsNullOrEmpty(changePasswordWarningText)) { lblChangePasswordWarning.Text = changePasswordWarningText; } } if (PanelRequest.GetBool("onetimepassword")) { ShowWarningMessage("USER_SHOULD_CHANGE_ONETIMEPASSWORD"); } } catch (Exception ex) { ShowErrorMessage("USER_GET_USER", ex); return; } }
protected void bntAddTag_Click(object sender, EventArgs e) { int addTagId; if (!int.TryParse(ddTags.SelectedValue, out addTagId)) { return; } Providers.HostedSolution.ExchangeRetentionPolicyTag tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, addTagId); if (tag == null) { return; } List <ExchangeMailboxPlanRetentionPolicyTag> res = ViewState["Tags"] as List <ExchangeMailboxPlanRetentionPolicyTag>; if (res == null) { res = new List <ExchangeMailboxPlanRetentionPolicyTag>(); } ExchangeMailboxPlanRetentionPolicyTag add = new ExchangeMailboxPlanRetentionPolicyTag(); add.MailboxPlanId = PanelRequest.GetInt("MailboxPlanId"); add.TagID = tag.TagID; add.TagName = tag.TagName; res.Add(add); ViewState["Tags"] = res; gvPolicy.DataSource = res; gvPolicy.DataBind(); UpdateTags(); }