BF2Statistics.Database.GamespyDatabase.DeleteUser C# (CSharp) Method

DeleteUser() public method

Deletes a Gamespy Account
public DeleteUser ( int Pid ) : int
Pid int
return int
        public int DeleteUser(int Pid)
        {
            return base.Execute("DELETE FROM accounts WHERE id=@P0", Pid);
        }

Same methods

GamespyDatabase::DeleteUser ( string Nick ) : int

Usage Example

 /// <summary>
 /// Event fired when the Delete button is pushed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DeleteBtn_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you sure you want to delete account?", "Confirm",
         MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         using (GamespyDatabase Database = new GamespyDatabase())
         {
             if (Database.DeleteUser(AccountId) == 1)
                 Notify.Show("Account deleted successfully!", "Operation Successful", AlertType.Success);
             else
                 Notify.Show("Failed to remove account from database!", "Operation failed", AlertType.Warning);
         }
         this.Close();
     }
 }
All Usage Examples Of BF2Statistics.Database.GamespyDatabase::DeleteUser