Beispiel #1
0
        public static List <Periodo> GetPeriodo(string idCurso)
        {
            database       db      = getDataBase();
            var            query   = from p in db.Periodo where p.IdCurso == idCurso select p;
            List <Periodo> periodo = new List <Periodo>(query.AsEnumerable());

            return(periodo);
        }
Beispiel #2
0
        public static List <Disciplina> GetDisciplina(string idPeriodo)
        {
            database          db         = getDataBase();
            var               query      = from d in db.Disciplina where d.idPeriodo == idPeriodo select d;
            List <Disciplina> disciplina = new List <Disciplina>(query.AsEnumerable());

            return(disciplina);
        }
Beispiel #3
0
        public static void DropGraus()
        {
            database db = getDataBase();

            if (db.DatabaseExists() == true)
            {
                db.DeleteDatabase();
            }
        }
Beispiel #4
0
        public static List <Graus> GetGraus(string idDisciplina)
        {
            database db    = getDataBase();
            var      query = from g in db.Graus where g.idDisciplina == idDisciplina select g;

            List <Graus> graus = new List <Graus>(query.AsEnumerable());

            return(graus);
        }
Beispiel #5
0
        private static database getDataBase()
        {
            database db = new database();

            if (db.DatabaseExists() == false)
            {
                db.CreateDatabase();
            }
            return(db);
        }