Esempio n. 1
0
 public List <pilot> ReadPilots()
 {
     using (var db = new DbSimaer())
     {
         return(db.pilot.Include("grade").ToList());
     }
 }
Esempio n. 2
0
 public attribute Find(int attribute_id)
 {
     using (var db = new DbSimaer())
     {
         return(db.attribute.Find(attribute_id));
     }
 }
Esempio n. 3
0
 public List <action> ReadActions()
 {
     using (var db = new DbSimaer())
     {
         return(db.action.ToList());
     }
 }
Esempio n. 4
0
 public List <system> ReadSystems()
 {
     using (var db = new DbSimaer())
     {
         return(db.system.ToList());
     }
 }
Esempio n. 5
0
 public List <procedure> ReadProcedures()
 {
     using (var db = new DbSimaer())
     {
         return(db.procedure.ToList());
     }
 }
Esempio n. 6
0
 public List <grade> ReadGrades()
 {
     using (var db = new DbSimaer())
     {
         return(db.grade.OrderBy(ograde => ograde.grade_id).ToList());
     }
 }
Esempio n. 7
0
 public action Find(int action_id)
 {
     using (var db = new DbSimaer())
     {
         return(db.action.Find(action_id));
     }
 }
Esempio n. 8
0
 public List <report> ReadReports()
 {
     using (var db = new DbSimaer())
     {
         return(db.report.ToList());
     }
 }
Esempio n. 9
0
 public List <scenario> ReadScenarios()
 {
     using (var db = new DbSimaer())
     {
         return(db.scenario.Include("time_day").Include("runway_tol").ToList());
     }
 }
Esempio n. 10
0
 public List <exercise> ReadExercises()
 {
     using (var db = new DbSimaer())
     {
         return(db.exercise.ToList());
     }
 }
Esempio n. 11
0
 public List <attribute> ReadAttributes()
 {
     using (var db = new DbSimaer())
     {
         return(db.attribute.ToList());
     }
 }
Esempio n. 12
0
 public List <procedure> ReadProceduresBySystemProcType(system i_system, procedure_type i_procedureType)
 {
     using (var db = new DbSimaer())
     {
         return(db.procedure.Include("procedure_type").Include("system").Include("action")
                .Where(oprocedure => oprocedure.procedure_type_id == i_procedureType.procedure_type_id)
                .Where(oprocedure => oprocedure.system_id == i_system.system_id).OrderBy(oprocedure => oprocedure.procedure_id).ToList());
     }
 }
Esempio n. 13
0
        public bool DeleteExercise(exercise DeleteExercise)
        {
            using (var db = new DbSimaer())
            {
                db.exercise.Remove(DeleteExercise);
                db.SaveChanges();

                return(true);
            }
        }
Esempio n. 14
0
        public bool CreateExercise(exercise InsertExercise)
        {
            using (var db = new DbSimaer())
            {
                db.exercise.Add(InsertExercise);
                db.SaveChanges();

                return(true);
            }
        }
Esempio n. 15
0
        public bool DeletePilot(pilot DeletePilot)
        {
            using (var db = new DbSimaer())
            {
                //db.pilot.Remove(DeletePilot);
                //db.SaveChanges();

                return(true);
            }
        }
Esempio n. 16
0
        public bool UpdateReport(report UpdateReport)
        {
            using (var db = new DbSimaer())
            {
                db.report.AddOrUpdate(UpdateReport);
                db.SaveChanges();

                return(true);
            }
        }
Esempio n. 17
0
        public bool DeleteReport(report DeleteReport)
        {
            using (var db = new DbSimaer())
            {
                db.report.Remove(DeleteReport);
                db.SaveChanges();

                return(true);
            }
        }
Esempio n. 18
0
        public bool CreateReport(report InsertReport)
        {
            using (var db = new DbSimaer())
            {
                db.report.Add(InsertReport);
                db.SaveChanges();

                return(true);
            }
        }
Esempio n. 19
0
        public bool UpdateExercise(exercise UpdateExercise)
        {
            using (var db = new DbSimaer())
            {
                db.exercise.AddOrUpdate(UpdateExercise);
                db.SaveChanges();

                return(true);
            }
        }
Esempio n. 20
0
        public bool UpdatePilot(pilot UpdatePilot)
        {
            using (var db = new DbSimaer())
            {
                db.pilot.AddOrUpdate(UpdatePilot);
                db.SaveChanges();

                return(true);
            }
        }