Beispiel #1
0
        protected virtual IPicklistStateMergePatched Map(IMergePatchPicklist c)
        {
            var stateEventId             = new PicklistEventId(c.PicklistId, c.Version);
            IPicklistStateMergePatched e = NewPicklistStateMergePatched(stateEventId);

            e.Description          = c.Description;
            e.FacilityId           = c.FacilityId;
            e.ShipmentMethodTypeId = c.ShipmentMethodTypeId;
            e.StatusId             = c.StatusId;
            e.PicklistDate         = c.PicklistDate;
            e.PickwaveId           = c.PickwaveId;
            e.Active = c.Active;
            e.IsPropertyDescriptionRemoved          = c.IsPropertyDescriptionRemoved;
            e.IsPropertyFacilityIdRemoved           = c.IsPropertyFacilityIdRemoved;
            e.IsPropertyShipmentMethodTypeIdRemoved = c.IsPropertyShipmentMethodTypeIdRemoved;
            e.IsPropertyStatusIdRemoved             = c.IsPropertyStatusIdRemoved;
            e.IsPropertyPicklistDateRemoved         = c.IsPropertyPicklistDateRemoved;
            e.IsPropertyPickwaveIdRemoved           = c.IsPropertyPickwaveIdRemoved;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            var version = c.Version;

            foreach (IPicklistRoleCommand innerCommand in c.PicklistRoleCommands)
            {
                ThrowOnInconsistentCommands(c, innerCommand);

                IPicklistRoleEvent innerEvent = Map(innerCommand, c, version, _state);
                e.AddPicklistRoleEvent(innerEvent);
            }


            return(e);
        }
 void IPicklistApplicationService.When(IMergePatchPicklist c)
 {
     this.When((MergePatchPicklistDto)c);
 }
Beispiel #3
0
 public virtual void When(IMergePatchPicklist c)
 {
     Update(c, ar => ar.MergePatch(c));
 }
Beispiel #4
0
        public virtual void MergePatch(IMergePatchPicklist c)
        {
            IPicklistStateMergePatched e = Map(c);

            Apply(e);
        }