Exemplo n.º 1
0
 public static TrainingCenter getTc(string tcUrl, TrainingCentersDBEntities db)
 {
     try
     {
         TrainingCenter tc = db.TrainingCenters.Where(a => a.Url == tcUrl).ToList().First();
         if (tc == null)
         {
             throw new HttpException(404, "NotFound");
         }
         return(tc);
     }
     catch (Exception ex)
     {
         throw new HttpException(404, "NotFound");
     }
 }
Exemplo n.º 2
0
 public static TrainingCenter GetCurrentTc(TrainingCentersDBEntities db)
 {
     return(getTc(GetCurrentTCName(), db));
 }
Exemplo n.º 3
0
        public static TrainingCenter GetCurrentTc()
        {
            TrainingCentersDBEntities db = new TrainingCentersDBEntities();

            return(getTc(GetCurrentTCName(), db));
        }
Exemplo n.º 4
0
        public static List <TrainingCenter> GetAllTc()
        {
            TrainingCentersDBEntities db = new TrainingCentersDBEntities();

            return(db.TrainingCenters.ToList());
        }