コード例 #1
0
        public static List <EventViewModel> GetEventsForMentee(ref DAO.ApplicationContext context, int menteeId)
        {
            var myEvents = CalendarHelper.GetEvents(ref context)
                           .Where(x => x.MenteeId == menteeId);

            return((List <EventViewModel>)myEvents.ToList());
        }
コード例 #2
0
        public static List <EventViewModel> GetEventsByUserId(ref DAO.ApplicationContext context, int creatorId)
        {
            var myEvents = CalendarHelper.GetEvents(ref context)
                           .Where(x => x.CreatorId == creatorId);

            return((List <EventViewModel>)myEvents.ToList());
        }
コード例 #3
0
        public static List <EventViewModel> GetMenteeMeetingRequests(ref DAO.ApplicationContext context, int mentorId)
        {
            int eventType = DomainHelper.GetIdByKeyValue(ref context, "EventType", "Mentee Meeting Request");

            var myEvents = CalendarHelper.GetEvents(ref context)
                           .Where(x => x.EventType == eventType && x.MentorId == mentorId);

            return((List <EventViewModel>)myEvents.ToList());
        }
コード例 #4
0
        public static List <EventViewModel> GetPublicEvents(ref DAO.ApplicationContext context)
        {
            int eventType = DomainHelper.GetIdByKeyValue(ref context, "EventType", "Public");

            var myEvents = CalendarHelper.GetEvents(ref context)
                           .Where(x => x.EventType == eventType);

            return((List <EventViewModel>)myEvents.ToList());
        }