/* * Transaction: Delete an event from the database * Returns true if the event exists in the database and * it was successfully deleted. */ public static bool DeleteEvent(Events delEvent) { if (EventPersistence.getEvent(delEvent) == null) { return(false); } return(EventPersistence.DeleteEvent(delEvent)); }
/* * Transaction: Update an event in the database * Returns true if the event exists in the database and * it was successfully changed. */ public static bool ChangeEvent(Events changeEvent) { if (EventPersistence.getEvent(changeEvent) == null) { return(false); } return(EventPersistence.UpdateEvent(changeEvent)); }
public static bool AddNewEvent(Events newEvent) { bool eventChecker = EventPersistence.CheckEventname(newEvent); Events oldEvent = EventPersistence.getEvent(newEvent); if (eventChecker == true) { return(EventPersistence.AddEvent(newEvent)); } return(false); }