Esempio n. 1
0
 public async Task <List <Usuarios> > GetList()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Usuarios.Include(x => x.Grupos).ToListAsync());
     }
 }
Esempio n. 2
0
 public async Task <List <Periodo> > GetList()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Periodo.ToListAsync());
     }
 }
Esempio n. 3
0
 public async Task <List <Logs> > GetList()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Logs.ToListAsync());
     }
 }
Esempio n. 4
0
 public async Task <int> GetCount(string id)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Periodo.Where(x => x.PeriodoNome.ToUpper() == id.ToUpper()).CountAsync());
     }
 }
Esempio n. 5
0
 public async Task <List <Logs> > GetList(int UserID)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Logs.Include(x => x.Usuarios).Where(x => x.UsuariosId == UserID).ToListAsync());
     }
 }
Esempio n. 6
0
 public async Task <int> GetCount()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.professor_Disciplina.CountAsync());
     }
 }
Esempio n. 7
0
 public async Task <int> GetCount()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Macs1.CountAsync());
     }
 }
Esempio n. 8
0
 public async Task <int> GetCount(string nome)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Classes.Where(x => x.ClassesNome.ToUpper() == nome.ToUpper()).CountAsync());
     }
 }
Esempio n. 9
0
 public async Task <int> GetCount(string nome)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Escola.CountAsync());
     }
 }
Esempio n. 10
0
 public async Task <List <Grupos> > GetList(int param)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Grupos.Where(x => x.GrupoId == param)
                .ToListAsync());
     }
 }
Esempio n. 11
0
 public async Task <List <Faltas> > GetList()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Faltas.Include(x => x.Alunos)
                .ToListAsync());
     }
 }
Esempio n. 12
0
 public async Task <int> GetCount(object value)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Alunos.Where(x => x.Nome == value.ToString())
                .CountAsync());
     }
 }
Esempio n. 13
0
 public async Task <int> GetCount(object value)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Macs1.Where(x => x.TrimestreID == (int)value)
                .CountAsync());
     }
 }
Esempio n. 14
0
 public async Task <Usuarios> GetListFirstOrDefault()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Usuarios
                .FirstOrDefaultAsync());
     }
 }
Esempio n. 15
0
 public async Task <int> GetCount(object value)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Disciplina.Where(x => x.Designacao == value.ToString())
                .CountAsync());
     }
 }
Esempio n. 16
0
 public async Task <List <Permissoes> > GetList()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Permissoes.Include(x => x.Grupo)
                .ToListAsync());
     }
 }
Esempio n. 17
0
 public async Task <List <Logs> > GetList(string param)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Logs.Where(x => x.Operacao.ToLower().Contains(param.ToLower()))
                .ToListAsync());
     }
 }
Esempio n. 18
0
 public async Task <List <Alunos> > GetList(string param)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Alunos.Where(x => x.Nome.ToLower().Contains(param.ToLower()))
                .ToListAsync());
     }
 }
Esempio n. 19
0
 public async Task <List <Disciplina> > GetList(string param)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Disciplina.Where(x => x.Designacao.ToLower().Contains(param.ToLower()))
                .ToListAsync());
     }
 }
Esempio n. 20
0
 public async Task <int> GetCount(string value, string Bi)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Professor.Where(x => x.Nome == value.ToString() &&
                                         x.Bi == Bi)
                .CountAsync());
     }
 }
Esempio n. 21
0
 public async Task <List <Professor> > GetList()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Professor
                .OrderBy(x => x.Nome)
                .ToListAsync());
     }
 }
Esempio n. 22
0
 public async Task <int> GetCount(int professor, int disciplina)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.professor_Disciplina.Where(x => x.DisciplinaID == disciplina &&
                                                    x.ProfessorID == professor)
                .CountAsync());
     }
 }
Esempio n. 23
0
 public async Task <Permissoes> GetList(int param)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Permissoes.Include(x => x.Grupo)
                .Where(x => x.GrupoId == param)
                .FirstOrDefaultAsync());
     }
 }
Esempio n. 24
0
 public async Task <List <Permissoes> > GetList(string param)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Permissoes.Include(x => x.Grupo)
                .Where(x => x.Grupo.GrupoNome.ToLower().Contains(param.ToLower()))
                .ToListAsync());
     }
 }
Esempio n. 25
0
 public async Task <List <Disciplina> > GetList()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Disciplina
                .OrderBy(x => x.Designacao)
                .ToListAsync());
     }
 }
Esempio n. 26
0
 public async Task <int> GetCount(string nome, string republica, string ministerio)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Escola.Where(x => x.Nome.ToUpper() == nome.ToUpper() &&
                                      x.republica.ToUpper() == republica.ToUpper() &&
                                      x.Ministerio.ToUpper() == ministerio.ToUpper()).CountAsync());
     }
 }
Esempio n. 27
0
 public async Task <List <Alunos> > GetList()
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Alunos.Include(x => x.Turmas)
                .Include(x => x.Faltas)
                .OrderBy(x => x.Nome)
                .ToListAsync());
     }
 }
Esempio n. 28
0
 public async Task <List <Macs> > GetList(int turma)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Macs1.Include(x => x.Alunos)
                .Include(x => x.Trimestres)
                .Where(x => x.Alunos.TurmasID == turma)
                .ToListAsync());
     }
 }
Esempio n. 29
0
 public async Task <List <Macs> > GetList(string param)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Macs1.Include(x => x.Alunos)
                .Include(x => x.Trimestres)
                .Where(x => x.Alunos.Nome.ToLower().Contains(param.ToLower()))
                .ToListAsync());
     }
 }
Esempio n. 30
0
 public async Task <int> GetCount(string nome, int classe1, int periodo, int cursos)
 {
     using (AppProfessorContext db = new AppProfessorContext())
     {
         return(await db.Turmas.Where(x => x.TurmasNome.ToUpper() == nome.ToUpper() &&
                                      x.ClassesID == classe1 &&
                                      x.PeriodoID == periodo &&
                                      x.CursosID == cursos).CountAsync());
     }
 }