コード例 #1
0
 protected void SaveEventSchedule(FIL.Contracts.Commands.CreateEventV1.EventRecurranceCommand eventRecurranceCommand)
 {
     if (eventRecurranceCommand.ActionType == Contracts.Commands.CreateEventV1.ActionType.BulkReschedule)
     {
         var eventSchedule = _eventScheduleRepository.Get(eventRecurranceCommand.EventScheduleId);
         eventSchedule.StartDateTime = _commonUtilityProvider.GetUtcDate(eventRecurranceCommand.StartDateTime, eventRecurranceCommand.LocalStartTime, eventRecurranceCommand.TimeZoneOffSet);
         eventSchedule.EndDateTime   = _commonUtilityProvider.GetUtcDate(eventRecurranceCommand.StartDateTime, eventRecurranceCommand.LocalStartTime, eventRecurranceCommand.TimeZoneOffSet);
         eventSchedule.Name          = eventRecurranceCommand.StartDateTime.ToString() + " - " + eventRecurranceCommand.EndDateTime.ToString();
         eventSchedule.ModifiedBy    = eventRecurranceCommand.ModifiedBy;
         eventSchedule.UpdatedBy     = eventRecurranceCommand.ModifiedBy;
         eventSchedule.UpdatedUtc    = DateTime.UtcNow;
         _eventScheduleRepository.Save(eventSchedule);
     }
 }
コード例 #2
0
        public void DeleteEventSchedule(FIL.Contracts.Commands.CreateEventV1.EventRecurranceCommand eventRecurranceCommand)
        {
            var eventSchedule = _eventScheduleRepository.Get(eventRecurranceCommand.EventScheduleId);

            _eventScheduleRepository.Delete(eventSchedule);
        }