private bool ValidateAccount(string Account, string Password) { try { MDB mDB = new MDB(); if (mDB.GetUserPassword(Account) != "" && Password == mDB.GetUserPassword(Account)) { return(true); } return(false); } catch (Exception ex) { Console.WriteLine(ex.Message + ex.StackTrace); return(false); } }
private bool CreateAccount(string Account, string Password) { try { MDB mDB = new MDB(); if (mDB.ExistUser(Account)) { return(false); } else { return(mDB.CreateUser(Account, Password) >= 0); } } catch (Exception ex) { Console.WriteLine(ex.Message + ex.StackTrace); return(false); } }