/// Get ID Of The Account public static int AccountId(string username) { AccountsTable table = new AccountsTable(); int id = table.GetUserId(username); table.Dispose(); return(id); }
/// Remove Account From Id public static void RemoveAccount(string username) { AccountsTable table = new AccountsTable(); table.Remove(username); table.Dispose(); }
/// Set Account Password From UserName public static void SetAccountPassword(string username, string password) { AccountsTable table = new AccountsTable(); table.SetPassword(username, password); table.Dispose(); }
/// Get Account Password From User ID public static string AccountPassword(int id) { AccountsTable table = new AccountsTable(); string password = table.GetPassword(id); table.Dispose(); return(password); }
/// Set Account Password From User Id public static void SetAccountPassword(int id, string password) { AccountsTable table = new AccountsTable(); table.SetPassword(id, password); table.Dispose(); }
/// Remove Account From Id public static void RemoveAccount(int id) { AccountsTable table = new AccountsTable(); table.Remove(id); table.Dispose(); }
/// Add New Account Into DB Table public static int AddAccount(string username, string password) { AccountsTable table = new AccountsTable(); int id = table.Insert(username, password); table.Dispose(); return(id); }
/// Get Account Password From UserName public static string AccountPassword(string username) { AccountsTable table = new AccountsTable(); string password = table.GetPassword(username); table.Dispose(); return(password); }
// ============================================ // PUBLIC Accounts Methods // ============================================ /// Return All The Stored Accounts (Name) public static string[] Accounts() { AccountsTable table = new AccountsTable(); string[] accounts = table.GetAllAccounts(); table.Dispose(); return(accounts); }