public void AddNewEvent(EventBL eventInfo) { Event ev = new Event(); ev.name = eventInfo.name; ev.description = eventInfo.description; ev.start = eventInfo.start; ev.deadline = eventInfo.deadline; ev.userId = eventInfo.userId; AddEvent(ev); }
public EventBL GetActiveEvent(string eventId) { Event singleEvent = GetEvent(eventId); EventBL singleEventBL = new EventBL(); singleEventBL.name = singleEvent.name; singleEventBL.description = singleEvent.description; singleEventBL.eventId = singleEvent.eventId; singleEventBL.daysDelayed = singleEvent.daysDelayed; singleEventBL.start = singleEvent.start; singleEventBL.deadline = singleEvent.deadline; singleEventBL.userId = singleEvent.userId; return(singleEventBL); }
// All this should go - Saxon //Needs to get the user id from session data, should otherwise return a list of guests associated with the logged in user to be worked with by the user layer - Saxon public List <EventBL> GetActiveEvents(string userId) { List <Event> eventList = GetEvents(userId); List <EventBL> activeEvents = new List <EventBL>(); foreach (Event singleEvent in eventList) { if (singleEvent.active) { EventBL singleEventBL = new EventBL(); singleEventBL.name = singleEvent.name; singleEventBL.description = singleEvent.description; singleEventBL.eventId = singleEvent.eventId; singleEventBL.daysDelayed = singleEvent.daysDelayed; singleEventBL.start = singleEvent.start; singleEventBL.deadline = singleEvent.deadline; singleEventBL.userId = singleEvent.userId; activeEvents.Add(singleEventBL); } } return(activeEvents); }