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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }