public List <DropDownList> ListaNivelAcesso()
        {
            List <DropDownList> lista = new List <DropDownList>();

            using (dbWebEventoEntities dbContext = new dbWebEventoEntities())
            {
                lista = (from x in dbContext.tbAcesso orderby x.tbAcesso_Nivel select new DropDownList()
                {
                    Id = x.tbAcesso_Id.ToString(), Value = x.tbAcesso_Nivel
                }).ToList();
            }

            return(lista);
        }
Пример #2
0
        public List <DropDownList> ListaArquivo()
        {
            List <DropDownList> lista = new List <DropDownList>();

            using (dbWebEventoEntities dbContext = new dbWebEventoEntities())
            {
                lista = (from x in dbContext.tbArquivo
                         select new DropDownList()
                {
                    Id = x.tbArquivo_Id.ToString(), Value = x.tbArquivo_Titulo
                }).ToList();
            }

            return(lista);
        }
        public List <DropDownList> ListaResponsavel()
        {
            List <DropDownList> lista = new List <DropDownList>();

            using (dbWebEventoEntities dbContext = new dbWebEventoEntities())
            {
                lista = (from x in dbContext.tbUsuario
                         where x.tbUsuario_Ativo == true
                         select new DropDownList()
                {
                    Id = x.tbUsuario_Id.ToString(),
                    Value = x.tbUsuario_Email
                }).ToList();
            }

            return(lista);
        }
        public List <DropDownList> ListaArea()
        {
            List <DropDownList> lista = new List <DropDownList>();

            using (dbWebEventoEntities dbContext = new dbWebEventoEntities())
            {
                lista = (from x in dbContext.tbArea
                         where x.tbArea_Ativo == true
                         select new DropDownList()
                {
                    Id = x.tbArea_Id.ToString(),
                    Value = x.tbArea_Descricao
                }).ToList();
            }

            return(lista);
        }
        public List <DropDownList> ListaAtivo()
        {
            List <DropDownList> lista = new List <DropDownList>();

            using (dbWebEventoEntities dbContext = new dbWebEventoEntities())
            {
                lista.Add(new DropDownList()
                {
                    Id = "Sim", Value = "Sim"
                });
                lista.Add(new DropDownList()
                {
                    Id = "Não", Value = "Não"
                });
            }

            return(lista);
        }
Пример #6
0
        public List <DropDownList> ListaStatus()
        {
            List <DropDownList> lista = new List <DropDownList>();

            using (dbWebEventoEntities dbContext = new dbWebEventoEntities())
            {
                lista.Add(new DropDownList()
                {
                    Id = "Aprovado", Value = "Aprovado"
                });
                lista.Add(new DropDownList()
                {
                    Id = "Reprovado", Value = "Reprovado"
                });
            }

            return(lista);
        }
Пример #7
0
        public List <DropDownList> ListaResponsavel()
        {
            List <DropDownList> lista = new List <DropDownList>();

            using (dbWebEventoEntities dbContext = new dbWebEventoEntities())
            {
                lista = (from x in dbContext.tbUsuario
                         join z in dbContext.tbAcesso
                         on x.tbAcesso_Id equals z.tbAcesso_Id
                         where x.tbUsuario_Ativo == true && z.tbAcesso_Nivel != "Baixo"
                         select new DropDownList()
                {
                    Id = x.tbUsuario_Id.ToString(), Value = x.tbUsuario_Email
                }).ToList();
            }

            return(lista);
        }