public void Clear()
 {
     NewStartDate.Clear();
     NewStartTime.Clear();
     NewEndDate.Clear();
     NewEndTime.Clear();
     NewStartDateTime  = null;
     MoveTimeSpan      = 0;
     RecurrencePattern = null;
 }
Beispiel #2
0
        public DomainEvent GetDomainEvent()
        {
            switch (DomainEventType)
            {
            case EventType.Added:
            {
                return(new AppointmentAdded(AggregateId.GetAggregateIdentifier(),
                                            AggregateVersion,
                                            UserId,
                                            new Tuple <Date, Time>(TimeStampDate.GetDate(), TimeStampTime.GetTime()),
                                            ActionTag,
                                            PatientId,
                                            Description,
                                            StartTime.GetTime(),
                                            EndTime.GetTime(),
                                            TherapyPlaceId.Value,
                                            LabelId.Value,
                                            AppointmentId.Value));
            }

            case EventType.Replaced:
            {
                return(new AppointmentReplaced(AggregateId.GetAggregateIdentifier(),
                                               AggregateVersion,
                                               UserId,
                                               PatientId,
                                               new Tuple <Date, Time>(TimeStampDate.GetDate(), TimeStampTime.GetTime()),
                                               ActionTag,
                                               NewDescription,
                                               NewDate.GetDate(),
                                               NewStartTime.GetTime(),
                                               NewEndTime.GetTime(),
                                               NewTherapyPlaceId.Value,
                                               NewLabelId.Value,
                                               OriginalAppointmendId.Value));
            }

            case EventType.Removed:
            {
                return(new AppointmentDeleted(AggregateId.GetAggregateIdentifier(),
                                              AggregateVersion,
                                              UserId,
                                              PatientId,
                                              new Tuple <Date, Time>(TimeStampDate.GetDate(), TimeStampTime.GetTime()),
                                              ActionTag,
                                              RemovedAppointmentId.Value));
            }
            }
            throw new Exception("inner error");
        }