void RefreshDG() { var usuarios = Metodos.Mostrar(""); List <ModeloUsuario> NoEntrevistadores = new List <ModeloUsuario>(); List <ModeloUsuario> Entrevistadores = new List <ModeloUsuario>(); MRol MEtR = new MRol(); var resp = MEtR.Mostrar(); foreach (DUsuario item in usuarios) { if (item.idRol != 4) { continue; } DRol DAR = resp.Find((Rol) => (Rol.idRol == item.idRol)); if (item.entrevistando == 0) { NoEntrevistadores.Add(new ModeloUsuario(item.idUsuario, item.usuario, DAR.nombre)); } else { Entrevistadores.Add(new ModeloUsuario(item.idUsuario, item.usuario, DAR.nombre)); } } DgUsuarios.ItemsSource = NoEntrevistadores; DgEntrevistadores.ItemsSource = Entrevistadores; }
//Creamos las funciones acordes a los metodos de la Clase Drol. public static DataTable Listar() { //Llamamos el metodo Listar de la clase Drol. DRol Datos = new DRol(); return(Datos.Listar()); }
public void ModificarRol(ERol rol) { try { DRol d = new DRol(); d.ModificarRol(rol); } catch (Exception ex) { throw ex; } }
public void IngresarRol(ERol rol) { try { DRol d = new DRol(); d.IngresarRol(rol); } catch (Exception ex) { throw ex; } }
public List <ERol> ListaRol() { try { DRol d = new DRol(); List <ERol> lista = d.ListaRoles(); return(lista); } catch (Exception ex) { throw ex; } }
public void Refresh(string search) { List <DUsuario> items = Metodos.Mostrar(search); List <ModelUsuario> MIT = new List <ModelUsuario>(); MRol MEtR = new MRol(); var resp = MEtR.Mostrar(); foreach (DUsuario item in items) { DRol DAR = resp.Find((Rol) => Rol.idRol == item.idRol); MIT.Add(new ModelUsuario(item.idUsuario, item.usuario, DAR.nombre)); } dgOperaciones.ItemsSource = MIT; }
public static DataTable Listar() { DRol Datos = new DRol(); return(Datos.Listar()); }
public static string ActualizarRolFuncionalidad(Rol rol, Funcionalidad funcionalidad) { DRol Objeto = new DRol(); return(Objeto.ActualizarRolFuncionalidad(rol, funcionalidad)); }
public static string ActualizarRol(Rol rol) { DRol Objeto = new DRol(); return(Objeto.ActualizarRol(rol)); }
public static string AgregarRolFuncionalidad(int idRol, int idFuncionalidad, int habilitado) { DRol Objeto = new DRol(); return(Objeto.AgregarRolFuncionalidad(idRol, idFuncionalidad, habilitado)); }
public static DataTable ObtenerRol(string nombreRol) { DRol Objeto = new DRol(); return(Objeto.ObtenerRol(nombreRol)); }
public static string AgregarRol(string nombreRol) { DRol Objeto = new DRol(); return(Objeto.AgregarRol(nombreRol)); }
public static DataTable ObtenerFuncionalidades(int rolId) { DRol Objeto = new DRol(); return(Objeto.ObtenerFuncionalidades(rolId)); }
public static DataTable buscarRoles(string rolNombre) // por usuario { DRol Objeto = new DRol(); return(Objeto.buscarRoles(rolNombre)); }
public static DataTable ObtenerRoles(int idUsuario) { DRol Objeto = new DRol(); return(Objeto.ObtenerRoles(idUsuario)); }