Beispiel #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);
        }
Beispiel #2
0
 public MemberEventVM(MemberEventPart part)
 {
     EventId             = part.Id;
     EventAddress        = part.EventAddress == null ? "" : part.EventAddress;
     EventDescription    = part.EventDescription == null ? "" : part.EventDescription;
     EventStartUtc       = part.EventStartUtc == null ? DateTime.Now : part.EventStartUtc.Value;
     EventStopUtc        = part.EventStopUtc == null ? DateTime.Now : part.EventStopUtc.Value;
     GoogleStaticMapLink = part.GoogleStaticMapLink == null ? "" : part.GoogleStaticMapLink;
     MaxAttendees        = part.MaxAttendees;
     Shown       = part.Shown;
     WaitingList = part.WaitingList;
 }