private void GetRandomData() { Conn = new Coneccion(); Query = @"SELECT TOP 1 * FROM MAEEN WITH ( NOLOCK ) WHERE KOEN= @RUT"; try { Conn.ConnGlasser.Open(); Conn.CmdPlabal = new SqlCommand(Query, Conn.ConnGlasser); Conn.CmdPlabal.Parameters.AddWithValue("@RUT", Rut); dr = Conn.CmdPlabal.ExecuteReader(); dr.Read(); if (dr.HasRows) { Validadores Val = new Validadores(); Bloqueado = Val.ParseoBoolean(dr["BLOQUEADO"].ToString()); Nombre = dr["NOKOEN"].ToString().Trim(); CondPago = dr["CPEN"].ToString().Trim(); Region = dr["CIEN"].ToString().Trim().Substring(1); } dr.Close(); Conn.ConnGlasser.Close(); } catch (Exception EX) { string ERRORSTR = "Mensaje:" + EX.Message + " trace: " + EX.StackTrace + " Rut:" + Rut; ErrorCatching gETerror = new ErrorCatching(); gETerror.ErrorCatch(ERRORSTR, HttpContext.Current.Request.Url.ToString()); dr.Close(); Conn.ConnGlasser.Close(); } }