public static Rol Select(int id)
 {
     RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
     RolDS.RolesDataTable table = adapter.Select(id);
     Rol objRol = RowToDto(table[0]);
     return objRol;
 }
Exemplo n.º 2
0
 public static Rol SelectById(int id)
 {
     RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
     RolDS.RolesDataTable table = adapter.SelectAll();
     if (table.Rows.Count == 0)
     {
         return(null);
     }
     return(rowToDto(table[0]));
 }
 public static List<Rol> SelectAll()
 {
     RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
     RolDS.RolesDataTable table = adapter.SelectAll();
     List<Rol> listaRoles = new List<Rol>();
     foreach (RolDS.RolesRow row in table)
     {
         listaRoles.Add(RowToDto(row));
     }
     return listaRoles;
 }
Exemplo n.º 4
0
    public static List <Rol> SelectAll()
    {
        List <Rol> listaRoles = new List <Rol>();

        RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
        RolDS.RolesDataTable table = adapter.SelectAll();
        foreach (RolDS.RolesRow row in table)
        {
            listaRoles.Add(rowToDto(row));
        }
        return(listaRoles);
    }
Exemplo n.º 5
0
 public static void delete(int id)
 {
     RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
     adapter.Delete(id);
 }
Exemplo n.º 6
0
 public static void update(string nombreRol, int id)
 {
     RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
     adapter.Update(nombreRol, id);
 }
Exemplo n.º 7
0
 public static void insert(string nombreRol)
 {
     RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
     adapter.Insert(nombreRol);
 }
 public static void Update(string nombreRol, int id)
 {
     RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
     adapter.Update(nombreRol, id);
 }
 public static void Insert(string nombreRol)
 {
     RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
     adapter.Insert(nombreRol);
 }
 public static void Delete(int id)
 {
     RolDSTableAdapters.RolesTableAdapter adapter = new RolDSTableAdapters.RolesTableAdapter();
     adapter.Delete(id);
 }