Ejemplo n.º 1
0
        internal DataTable UsuarioObtenerXParametro(String rut, String nombre, String apellido, bool solo_activos, int id_tipo_usuario)
        {
            SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION);

            String query = "[dbo].[CARGA_USUARIOS_X_CRITERIO] ";

            if (rut != null && rut != String.Empty)
            {
                query += "@RUT = N'" + rut + "',";
            }
            else
            {
                query += "@RUT = NULL,";
            }

            if (nombre != null && nombre != String.Empty)
            {
                query += "@NOMBRE = N'" + nombre + "',";
            }
            else
            {
                query += "@NOMBRE = NULL,";
            }

            if (apellido != null && apellido != String.Empty)
            {
                query += "@APELLIDO = N'" + apellido + "',";
            }
            else
            {
                query += "@APELLIDO = NULL,";
            }

            if (solo_activos)
            {
                query += "@ESTADO = 'ACTIVO',";
            }
            else
            {
                query += "@ESTADO = null,";
            }

            if (id_tipo_usuario != 0)
            {
                query += "@ID_TIPOUSUARIO = " + id_tipo_usuario + "";
            }
            else
            {
                query += "@ID_TIPOUSUARIO = NULL";
            }


            return(accesoDatos.dsCargarSqlQuery(query).Tables[0]);
        }
Ejemplo n.º 2
0
        public DataTable obtenerTodas()
        {
            SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION);

            return(accesoDatos.dsCargarSqlQuery("[dbo].[LISTAR_MENU] ").Tables[0]);
        }
Ejemplo n.º 3
0
        public DataTable obtenerPaginasMenu(int OrdenEncabezado)
        {
            SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION);

            return(accesoDatos.dsCargarSqlQuery("[dbo].[LISTAR_PAGINAS_MENU] " + OrdenEncabezado).Tables[0]);
        }
Ejemplo n.º 4
0
        public DataTable obtenerEncabezadosMenu()
        {
            SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION);

            return(accesoDatos.dsCargarSqlQuery("[dbo].[LISTAR_ENCABEZADOS_PAGINAS_MENU] ").Tables[0]);
        }
Ejemplo n.º 5
0
 internal DataTable UsuarioObtenerTodos()
 {
     return(accesoDatos.dsCargarSqlQuery("[dbo].[CARGA_TODO_USUARIO]").Tables[0]);
 }
Ejemplo n.º 6
0
        internal DataTable UsuarioObtenerAsignados(int usua_id)
        {
            SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION);

            return(accesoDatos.dsCargarSqlQuery("[dbo].[CARGA_LUGARES_ASIGNADOS_SITE_USUARIO] " + usua_id).Tables[0]);
        }