Esempio n. 1
0
 /*
  * 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));
 }
Esempio n. 2
0
 /*
  * 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));
 }
Esempio n. 3
0
        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);
        }