Ejemplo n.º 1
0
        public void EditEvent(MemberEventPart part, MemberEventVM model)
        {
            if (part == null)
            {
                throw new ArgumentNullException("part");
            }
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            var eventRecord = new MemberEventPartRecord
            {
                Id = part.Record.ContentItemRecord.Id,

                EventAddress        = model.EventAddress,
                EventDescription    = model.EventDescription,
                GoogleStaticMapLink = model.GoogleStaticMapLink,
                EventStartUtc       = model.EventStartUtc,
                EventStopUtc        = model.EventStopUtc,
                Shown        = model.Shown,
                MaxAttendees = model.MaxAttendees,
                WaitingList  = model.WaitingList,

                ContentItemRecord = part.Record.ContentItemRecord
            };

            UpdateEvent(eventRecord);
        }
 public EventEntry CreateEventEntry(MemberEventPartRecord e)
 {
     if (e == null)
     {
         throw new ArgumentNullException("MemberEvent");
     }
     return(new EventEntry
     {
         EventTitle = _eventService.GetEventTitle(e.Id),
         Event = e,
         IsChecked = false
     });
 }
Ejemplo n.º 3
0
 public MemberEventVM(MemberEventPartRecord partRecord, IList <ParticipantRecord> participants)
 {
     EventId             = partRecord.Id;
     EventAddress        = partRecord.EventAddress;
     EventDescription    = partRecord.EventDescription;
     EventStartUtc       = partRecord.EventStartUtc;
     EventStopUtc        = partRecord.EventStopUtc;
     GoogleStaticMapLink = partRecord.GoogleStaticMapLink;
     MaxAttendees        = partRecord.MaxAttendees;
     Shown                = partRecord.Shown;
     WaitingList          = partRecord.WaitingList;
     ParticipatingMembers = participants;
 }
Ejemplo n.º 4
0
 public void UpdateEvent(MemberEventPartRecord eventRecord)
 {
     _eventRepository.Update(eventRecord);
 }