private void btnRemove_Click(object sender, EventArgs e) { if (usersGrid1.CurrentUser == null) { btnRemove.Enabled = false; btnUpdate.Enabled = false; return; } String wUserName = usersGrid1.CurrentUser.UserName; FwkMembership.DeleteUser(wUserName, frmAdmin.Provider.Name); MessageViewInfo.Show("User was successfully removed"); lblRolesByUser.Text = string.Empty; txtEmail.Text = String.Empty; txtUserName.Text = String.Empty; btnRemove.Enabled = false; btnUpdate.Enabled = false; usersGrid1.Initialize(); }
public void DeleteUser(String userName) { FwkMembership.DeleteUser(userName, ProviderName); }