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); } }
public void DeleteEventSchedule(FIL.Contracts.Commands.CreateEventV1.EventRecurranceCommand eventRecurranceCommand) { var eventSchedule = _eventScheduleRepository.Get(eventRecurranceCommand.EventScheduleId); _eventScheduleRepository.Delete(eventSchedule); }