protected void OnDeleteUserClick(object sender, EventArgs e) { LitMsg.Visible = true; try { SubSonic.StoredProcedure sp = SPs.HispUserDeleteaspnetuser(User.ObjectID.Value); sp.Execute(); ((IReloadable)this.Page).Reload(); } catch { LitMsg.Text = language.GetString("MessageDeleteUserError"); } }
protected void OnDeleteProfileClick(object sender, EventArgs e) { try { lblMsg.Visible = false; MembershipUser membershipUser = Membership.GetUser(UserProfile.Current.UserName); if (usedSingleSignOn || membershipUser.ChangePassword(TxtPw.Text, Constants.DEFAULT_USER_PASSWORD)) { try { List <string> friendIds = new List <string>(); if (cbxInfo.Checked) { friendIds = GetFriends(); } SubSonic.StoredProcedure sp = SPs.HispUserDeleteaspnetuser(UserProfile.Current.UserId); sp.Execute(); if (cbxInfo.Checked) { SendMessages(friendIds); } try { Response.Redirect("/Pages/Other/logout.ashx", true); } catch { return; } } catch { lblMsg.Text = language.GetString("MessageProfileDeleteError"); lblMsg.Visible = true; } } else { lblMsg.Text = language.GetString("MessageProfileDeletePassword"); lblMsg.Visible = true; } } catch { lblMsg.Text = language.GetString("MessageProfileDeletePassword"); lblMsg.Visible = true; } }