public Fato_Plantao GetbyIDs(string idAluno, string idPlantao) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.FatPlantao.Where(x => x.id_plantao == idPlantao && x.id_aluno_preceptor == idAluno).FirstOrDefault()); } }
public Dim_Aluno_Preceptor GetbyID(string id) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Aluno.Where(x => x.id_aluno_preceptor == id).FirstOrDefault()); } }
public Dim_Aula GetByName(string nome) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Aula.Where(x => x.titulo_aula.ToUpper() == nome.ToUpper()).FirstOrDefault()); } }
public Fato_Plantao GetbyID(string id) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.FatPlantao.Where(x => x.id_plantao == id).FirstOrDefault()); } }
public virtual bool UpdateOrInsert(Tipo item) { try { using (WSNEOEntities context = new WSNEOEntities()) { context.Entry <Tipo>(item).State = System.Data.Entity.EntityState.Modified; int rows = 0; bool concurrency = false; try { rows = context.SaveChanges(); } catch (DbUpdateConcurrencyException ex) { concurrency = true; ex.Entries.Single().Reload(); rows = context.SaveChanges(); } if (rows <= 0) { context.Entry <Tipo>(item).State = System.Data.Entity.EntityState.Added; rows = context.SaveChanges(); } return(rows > 0); } } catch (Exception ex) { throw ex; } }
public virtual List <Tipo> ListAll() { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Set <Tipo>().ToList()); } }
public Dim_Professor GetbyID(string id) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Professor.Where(x => x.id_professor == id).FirstOrDefault()); } }
public Dim_Curso GetByName(string nome) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Curso.Where(x => x.nome_curso.ToUpper() == nome.ToUpper()).FirstOrDefault()); } }
public Dim_Modulo GetbyID(string id) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Modulo.Where(x => x.id_modulo == id).FirstOrDefault()); } }
public Dim_Aluno_Preceptor GetbyIDs(string idAluno, string idMatricula, string idTurma) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Aluno.Where(x => x.id_aluno_preceptor == idAluno && x.idmatricula_aluno == idMatricula && x.id_turma == idTurma).FirstOrDefault()); } }
public Dim_Aula GetbyID(string id) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Aula.Where(x => x.id_aula == id).FirstOrDefault()); } }
public Dim_Especialidade GetbyID(string id) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Especialidade.Where(x => x.id_especialidade == id).FirstOrDefault()); } }
public Dim_Curso GetbyID(string id) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Curso.Where(x => x.id_curso == id).FirstOrDefault()); } }
public Dim_Hospital GetByName(string nome) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Hospital.Where(x => x.nome_hospital.ToUpper() == nome.ToUpper()).FirstOrDefault()); } }
public Dim_Hospital GetbyID(string id) { using (WSNEOEntities context = new WSNEOEntities()) { return(context.Hospital.Where(x => x.id_hospital == id).FirstOrDefault()); } }
public List <Dim_Aluno_Preceptor> Buscar(Dim_Aluno_Preceptor criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.Aluno.Where(x => x.nome_aluno_preceptor == criterio.nome_aluno_preceptor).OrderBy(x => x.nome_aluno_preceptor); return(query.ToList()); } }
public List <Dim_Professor> Buscar(Dim_Professor criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.Professor.Where(x => x.nome_professor == criterio.nome_professor).OrderBy(x => x.nome_professor); return(query.ToList()); } }
public List <Dim_Especialidade> Buscar(Dim_Especialidade criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.Especialidade.Where(x => x.nome_especialidade == criterio.nome_especialidade).OrderBy(x => x.nome_especialidade); return(query.ToList()); } }
public List <Dim_Hospital> Buscar(Dim_Hospital criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.Hospital.Where(x => x.nome_hospital == criterio.nome_hospital).OrderBy(x => x.nome_hospital); return(query.ToList()); } }
public List <Dim_Aula> Buscar(Dim_Aula criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.Aula.Where(x => x.titulo_aula == criterio.titulo_aula).OrderBy(x => x.titulo_aula); return(query.ToList()); } }
public List <Fato_Presenca> Buscar(Fato_Presenca criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.FatPresenca.Where(x => x.id_aula == criterio.id_aula && x.id_aluno_preceptor == criterio.id_aluno_preceptor).OrderBy(x => x.id_aula); return(query.ToList()); } }
public List <Fato_Permanencia_Plataforma> Buscar(Fato_Permanencia_Plataforma criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.FatPermanenciaPlataforma.Where(x => x.id_aluno_preceptor == criterio.id_aluno_preceptor).OrderBy(x => x.id_aluno_preceptor); return(query.ToList()); } }
public List <Dim_Curso> Buscar(Dim_Curso criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.Curso.Where(x => x.nome_curso == criterio.nome_curso).OrderBy(x => x.nome_curso); return(query.ToList()); } }
public List <Dim_Turma> Buscar(Dim_Turma criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.Turma.Where(x => x.nome_turma == criterio.nome_turma).OrderBy(x => x.nome_turma); return(query.ToList()); } }
public List <Fato_Plantao> Buscar(Fato_Plantao criterio) { using (WSNEOEntities context = new WSNEOEntities()) { var query = context.FatPlantao.Where(x => x.id_plantao == criterio.id_plantao && x.id_aluno_preceptor == criterio.id_aluno_preceptor).OrderBy(x => x.id_plantao); return(query.ToList()); } }
public Fato_Permanencia_Plataforma GetbyIDs(string idAluno, DateTime dataEntrada) { using (WSNEOEntities context = new WSNEOEntities()) { //return context.FatPermanenciaPlataforma.Where(x => x.id_aluno_preceptor == idAluno && x.id_turma == idTurma && x.idmatricula_aluno == idMatricula).FirstOrDefault(); return(context.FatPermanenciaPlataforma.Where(x => x.id_aluno_preceptor == idAluno && x.data_entrada == dataEntrada).FirstOrDefault()); } }
public bool Insert(Tipo item) { try { using (WSNEOEntities context = new WSNEOEntities()) { context.Entry <Tipo>(item).State = System.Data.Entity.EntityState.Added; return(context.SaveChanges() > 0); } } catch (Exception ex) { throw ex; } }
public virtual bool DeleteItem(Tipo item) { try { using (WSNEOEntities context = new WSNEOEntities()) { context.Entry <Tipo>(item).State = System.Data.Entity.EntityState.Deleted; return(context.SaveChanges() > 0); } } catch (Exception ex) { throw ex; } }