예제 #1
0
파일: CDuser.cs 프로젝트: jossell25/is2
        public Boolean userValidate(CEuser oCEUser)
        {
            bool result = false;
            String procedure = "spGetUser";
            try
            {
                SqlConnection oSqlConnection = new SqlConnection();
                CDConnection oCDConnection = new CDConnection();
                oSqlConnection= oCDConnection.openDB();
                SqlCommand oSqlCommand = oSqlConnection.CreateCommand();
                oSqlCommand.CommandText = procedure;
                oSqlCommand.CommandType = CommandType.StoredProcedure;
                oSqlCommand.Parameters.Add("@id",SqlDbType.VarChar,25).Value=oCEUser.id_usuario;
                oSqlCommand.Parameters.Add("@clave", SqlDbType.VarChar, 25).Value = oCEUser.clave;
                SqlDataReader oSqlDataReader= oSqlCommand.ExecuteReader();
                if (oSqlDataReader.HasRows)
                {
                   result = true;
                }

                return result;
            }
            catch(Exception e)
            {
                e.ToString();
                return result;
            }
        }
예제 #2
0
파일: CCUser.cs 프로젝트: jossell25/is2
 public bool validateUSer(string email , string clave)
 {
     CEuser oCEuser = new CEuser();
     oCEuser.id_usuario = email.Trim();
     oCEuser.clave = clave.Trim();
     oCEuser.id_Rol = "";
     return oCDUser.userValidate(oCEuser);
 }