Exemple #1
0
    public static Roles_DTO MostrarIDRoles(int id_rol)
    {
        Roles_DSTableAdapters.RolesTableAdapter adaptador = new Roles_DSTableAdapters.RolesTableAdapter();
        Roles_DS.RolesDataTable tabla = adaptador.MostrarRolesID(id_rol);

        if (tabla.Rows.Count == 0)
        {
            return(null);
        }
        return(filaDTOroles(tabla[0]));
    }
Exemple #2
0
    public static List <Roles_DTO> MostrarTodosRoles()
    {
        List <Roles_DTO> ListarRoles = new List <Roles_DTO>();

        Roles_DSTableAdapters.RolesTableAdapter adaptador = new Roles_DSTableAdapters.RolesTableAdapter();
        Roles_DS.RolesDataTable tabla = adaptador.MostrarRoles();
        foreach (Roles_DS.RolesRow filas in tabla)
        {
            ListarRoles.Add(filaDTOroles(filas));
        }
        return(ListarRoles);
    }