SubmitInternally() public method

public SubmitInternally ( System.DateTime prenotificationDate ) : void
prenotificationDate System.DateTime
return void
Example #1
0
        public static Movement Capture(int movementNumber, Guid notificationId, DateTime actualDate,
                                       DateTime?prenotificationDate, bool hasNoPrenotification, Guid createdBy)
        {
            if (hasNoPrenotification && prenotificationDate.HasValue)
            {
                throw new ArgumentException("Can't provide prenotification date if there is no prenotification", "prenotificationDate");
            }

            var movement = new Movement
            {
                NotificationId       = notificationId,
                Number               = movementNumber,
                Date                 = actualDate,
                Status               = MovementStatus.Captured,
                HasNoPrenotification = hasNoPrenotification,
                CreatedBy            = createdBy.ToString(),
                CreatedOnDate        = SystemTime.UtcNow
            };

            if (prenotificationDate.HasValue)
            {
                movement.SubmitInternally(prenotificationDate.Value);
            }

            return(movement);
        }
Example #2
0
        public static Movement Capture(int movementNumber, Guid notificationId, DateTime actualDate,
            DateTime? prenotificationDate, bool hasNoPrenotification, Guid createdBy)
        {
            if (hasNoPrenotification && prenotificationDate.HasValue)
            {
                throw new ArgumentException("Can't provide prenotification date if there is no prenotification", "prenotificationDate");
            }

            var movement = new Movement
            {
                NotificationId = notificationId,
                Number = movementNumber,
                Date = actualDate,
                Status = MovementStatus.Captured,
                HasNoPrenotification = hasNoPrenotification,
                CreatedBy = createdBy.ToString()
            };

            if (prenotificationDate.HasValue)
            {
                movement.SubmitInternally(prenotificationDate.Value);
            }

            return movement;
        }