public OxiteViewModelItems <ScheduleItem> ListByEventAndWorkshops(EventAddress eventAddress, TagAddress tagAddress, ScheduleItemFilterCriteria scheduleItemFilterCriteria) { Event evnt = eventService.GetEvent(eventAddress); if (evnt == null) { return(null); } Tag tag = tagService.GetTag(tagAddress); if (!string.IsNullOrEmpty(tagAddress.TagName) && tag == null) { return(null); } ScheduleItemTag scheduleItemTag = scheduleItemService.GetScheduleItemTag(tagService.GetTag(tagAddress)); if (!string.IsNullOrEmpty(tagAddress.TagName) && scheduleItemTag == null) { return(null); } scheduleItemFilterCriteria.PageSize = 100; //show all workshops on workshop page IPageOfItems <ScheduleItem> scheduleItems = scheduleItemService.GetScheduleItemsByTag(eventAddress, scheduleItemTag != null ? scheduleItemTag.ID : Guid.Empty, scheduleItemFilterCriteria); SetUserScheduleStatus(); var model = new OxiteViewModelItems <ScheduleItem>(scheduleItems) { Container = evnt }; model.AddModelItem(scheduleItemTag); return(model); }
public OxiteViewModelItemItems <Tag, ScheduleItem> ListByEventAndTag(Event evnt, Tag tag, ScheduleItemFilterCriteria scheduleItemFilterCriteria) { if (evnt == null) { return(null); } if (tag == null) { return(null); } IPageOfItems <ScheduleItem> scheduleItems = scheduleItemService.GetScheduleItemsByTag(evnt, tag, scheduleItemFilterCriteria); return(new OxiteViewModelItemItems <Tag, ScheduleItem>(tag, scheduleItems) { Container = evnt }); }