Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. public IEnumerable<EjecutivosCapacitacionActivos> ObtenerEjecutivos()
  2.         {
  3.             var query = "select 0 cod_usuario,'(Seleccione)' nombre " +
  4.                         " UNION " +
  5.                         " SELECT us.rut_usuario cod_usuario,us.nombres nombre " +
  6.                         " FROM Usuario us, perfil_usuario pu " +
  7.                         " left join empleado em on pu.rut_usuario = em.rut_empleado " +
  8.                         " where pu.cod_perfil = 7 " +
  9.                         " and pu.rut_usuario = us.rut_usuario " +
  10.                         " and (em.flag_estado_emp = 1 or em.flag_estado_emp is null) " +
  11.                         " ORDER BY nombre";
  12.             var reporte = _contexto.SiscapBci.Database.SqlQuery<EjecutivosCapacitacionActivos>(query).ToList();
  13.             return reporte;
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement