public static void PostClosedGroups(ClosedGroupes Cg) { try { using (GymDBEntities g = new GymDBEntities()) { g.ClosedGroupes.Add(Cg); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void DeleteClosedGroups(int id) { try { using (GymDBEntities g = new GymDBEntities()) { g.ClosedGroupes.Remove(g.ClosedGroupes.Where(a => a.team_id == id).First()); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void PostSMessege(SystemMessege sm) { try { using (GymDBEntities g = new GymDBEntities()) { g.SystemMessege.Add(sm); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void DeleteSMessege(int id) { try { using (GymDBEntities g = new GymDBEntities()) { g.SystemMessege.Remove(g.SystemMessege.Where(a => a.Messege_id == id).First()); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void PostSubscription(SubscriptionsTypes s) { try { using (GymDBEntities g = new GymDBEntities()) { g.SubscriptionsTypes.Add(s); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void DeleteSubscription(int id) { try { using (GymDBEntities g = new GymDBEntities()) { g.SubscriptionsTypes.Remove(g.SubscriptionsTypes.Where(a => a.sub_id == id).First()); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void DeleteFitnessLesson(int id) { try { using (GymDBEntities g = new GymDBEntities()) { g.FitnessLessons.Remove(g.FitnessLessons.Where(a => a.lesson_id == id).First()); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void PostFitnessLesson(FitnessLessons f) { try { using (GymDBEntities g = new GymDBEntities()) { g.FitnessLessons.Add(f); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void PostPresence(Presence p) { try { using (GymDBEntities g = new GymDBEntities()) { g.Presence.Add(p); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void DeleteTraining(int id) { try { using (GymDBEntities g = new GymDBEntities()) { g.Training.Remove(g.Training.Where(a => a.training_id == id).First()); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void PostTrain(Training t) { try { using (GymDBEntities g = new GymDBEntities()) { g.Training.Add(t); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void DeleteCustomer(int id) { try { using (GymDBEntities g = new GymDBEntities()) { g.Customers.Remove(g.Customers.Where(x => x.customer_id == id).First()); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }
public static void PostCustomer(Customers c) { try { using (GymDBEntities g = new GymDBEntities()) { g.Customers.Add(c); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }