コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: NRol.cs プロジェクト: KielMC02/sis_ventas
        //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());
        }
コード例 #3
0
ファイル: NRol.cs プロジェクト: fredreyes/SGA
 public void ModificarRol(ERol rol)
 {
     try
     {
         DRol d = new DRol();
         d.ModificarRol(rol);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
ファイル: NRol.cs プロジェクト: fredreyes/SGA
 public void IngresarRol(ERol rol)
 {
     try
     {
         DRol d = new DRol();
         d.IngresarRol(rol);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #5
0
ファイル: NRol.cs プロジェクト: fredreyes/SGA
 public List <ERol> ListaRol()
 {
     try
     {
         DRol        d     = new DRol();
         List <ERol> lista = d.ListaRoles();
         return(lista);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #6
0
        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;
        }
コード例 #7
0
        public static DataTable Listar()
        {
            DRol Datos = new DRol();

            return(Datos.Listar());
        }
コード例 #8
0
        public static string ActualizarRolFuncionalidad(Rol rol, Funcionalidad funcionalidad)
        {
            DRol Objeto = new DRol();

            return(Objeto.ActualizarRolFuncionalidad(rol, funcionalidad));
        }
コード例 #9
0
        public static string ActualizarRol(Rol rol)
        {
            DRol Objeto = new DRol();

            return(Objeto.ActualizarRol(rol));
        }
コード例 #10
0
        public static string AgregarRolFuncionalidad(int idRol, int idFuncionalidad, int habilitado)
        {
            DRol Objeto = new DRol();

            return(Objeto.AgregarRolFuncionalidad(idRol, idFuncionalidad, habilitado));
        }
コード例 #11
0
        public static DataTable ObtenerRol(string nombreRol)
        {
            DRol Objeto = new DRol();

            return(Objeto.ObtenerRol(nombreRol));
        }
コード例 #12
0
        public static string AgregarRol(string nombreRol)
        {
            DRol Objeto = new DRol();

            return(Objeto.AgregarRol(nombreRol));
        }
コード例 #13
0
        public static DataTable ObtenerFuncionalidades(int rolId)
        {
            DRol Objeto = new DRol();

            return(Objeto.ObtenerFuncionalidades(rolId));
        }
コード例 #14
0
        public static DataTable buscarRoles(string rolNombre) // por usuario
        {
            DRol Objeto = new DRol();

            return(Objeto.buscarRoles(rolNombre));
        }
コード例 #15
0
        public static DataTable ObtenerRoles(int idUsuario)
        {
            DRol Objeto = new DRol();

            return(Objeto.ObtenerRoles(idUsuario));
        }