예제 #1
0
        /// <summary>
        /// Updates a event
        /// </summary>
        /// <param name="pEvent">Event</param>
        public void UpdateEvent(CameleoEvent pEvent)
        {
            if (pEvent == null)
            {
                throw new ArgumentNullException("event");
            }

            _eventRepository.Update(pEvent);

            //event notification
            _eventPublisher.EntityUpdated(pEvent);
        }
예제 #2
0
        /// <summary>
        /// Inserts a event
        /// </summary>
        /// <param name="pEvent">Event</param>
        public void InsertEvent(CameleoEvent pEvent)
        {
            if (pEvent == null)
            {
                throw new ArgumentNullException("event");
            }

            pEvent.CreatedOnUtc = DateTime.Now;

            _eventRepository.Insert(pEvent);

            //event notification
            _eventPublisher.EntityInserted(pEvent);
        }
예제 #3
0
 public CameleoEventViewModel(CameleoEvent pEvent, List <CameleoSelectListItem> pGroups, string pStatusString)
 {
     Id                      = pEvent.Id;
     EventName               = pEvent.EventName;
     EventCode               = pEvent.EventCode;
     ClientName              = pEvent.ClientName;
     CreatedOnUtc            = pEvent.CreatedOnUtc;
     ShootedOnUtc            = pEvent.ShootedOnUtc;
     AcceptReminderDateUtc   = pEvent.AcceptReminderDateUtc;
     AcceptReminderDelay     = pEvent.AcceptReminderDelay;
     AcceptMinimumPercentage = pEvent.AcceptMinimumPercentage;
     PayReminderDateUtc      = pEvent.PayReminderDateUtc;
     PayReminderDelay        = pEvent.PayReminderDelay;
     PayMinimumPercentage    = pEvent.PayMinimumPercentage;
     Status                  = pEvent.Status;
     StatusString            = pStatusString;
     Groups                  = pGroups;
     ShowGroupDetails        = false;
     ClientLogo              = pEvent.ClientLogo;
     IntroLogo               = pEvent.IntroLogo;
     ParticipationFee        = pEvent.ParticipationFee;
 }