Ejemplo n.º 1
0
        public void ExecuteLanguageChanged(CultureInfo ci)
        {
            DateTime d = TimeStampDate;

            TimeStampDate = TimeStampDate.AddDays(1);
            TimeStampDate = d;
        }
Ejemplo n.º 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");
        }