예제 #1
0
        public static bool ExisteCuenta(string username, string password)
        {
            bool existe = false;

            if (!String.IsNullOrWhiteSpace(username) && !String.IsNullOrWhiteSpace(password))
            {
                CuentaDAO cuentaDao = new CuentaDAO();
                int       resultadoDeConsulta;

                try
                {
                    resultadoDeConsulta = cuentaDao.ExisteCuenta(username, password);
                }
                catch (MySqlException)
                {
                    throw;
                }

                if (resultadoDeConsulta == EXISTE_CUENTA)
                {
                    existe = true;
                }
            }

            return(existe);
        }