Beispiel #1
0
        /// <summary>
        /// Clones all properties in a new POShipment instance,
        /// except PrimaryKey(s)
        /// </summary>
        /// <returns>New POShipment instance</returns>
        public POShipment Clone()
        {
            var clone = new POShipment();

            clone.ShippingNr      = ShippingNr;
            clone.ShippingDate    = ShippingDate;
            clone.DeliveryNr      = DeliveryNr;
            clone.DeliveryDate    = DeliveryDate;
            clone.DestinationNr   = DestinationNr;
            clone.RefCode         = RefCode;
            clone.CustomerRefNr   = CustomerRefNr;
            clone.Quantity        = Quantity;
            clone.IsShipped       = IsShipped;
            clone.IsDelivered     = IsDelivered;
            clone.PurchaseOrderId = PurchaseOrderId;
            clone.FreightTermId   = FreightTermId;
            clone.ModifyNr        = ModifyNr;
            clone.ModifyDate      = ModifyDate;
            clone.ModifierId      = ModifierId;
            clone.ModifierIp      = ModifierIp;
            clone.CreateDate      = CreateDate;
            clone.CreatorId       = CreatorId;
            clone.CreatorIp       = CreatorIp;

            Cloning(clone);

            return(clone);
        }
Beispiel #2
0
        public POShipmentDTO(POShipment entity)
        {
            Id              = entity.Id;
            ShippingNr      = entity.ShippingNr;
            ShippingDate    = entity.ShippingDate;
            DeliveryNr      = entity.DeliveryNr;
            DeliveryDate    = entity.DeliveryDate;
            DestinationNr   = entity.DestinationNr;
            RefCode         = entity.RefCode;
            CustomerRefNr   = entity.CustomerRefNr;
            Quantity        = entity.Quantity;
            IsShipped       = entity.IsShipped;
            IsDelivered     = entity.IsDelivered;
            PurchaseOrderId = entity.PurchaseOrderId;
            FreightTermId   = entity.FreightTermId;

            Initiliazing(entity);
        }
Beispiel #3
0
        public virtual POShipment ToPOShipment()
        {
            var entity = new POShipment();

            entity.Id              = Id;
            entity.ShippingNr      = ShippingNr;
            entity.ShippingDate    = ShippingDate;
            entity.DeliveryNr      = DeliveryNr;
            entity.DeliveryDate    = DeliveryDate;
            entity.DestinationNr   = DestinationNr;
            entity.RefCode         = RefCode;
            entity.CustomerRefNr   = CustomerRefNr;
            entity.Quantity        = Quantity;
            entity.IsShipped       = IsShipped;
            entity.IsDelivered     = IsDelivered;
            entity.PurchaseOrderId = PurchaseOrderId;
            entity.FreightTermId   = FreightTermId;

            Converting(entity);

            return(entity);
        }
Beispiel #4
0
 partial void Converting(POShipment entity);
Beispiel #5
0
 partial void Initiliazing(POShipment entity);
Beispiel #6
0
 // Use below function in a partial class file (eg. POShipment.part.cs)
 // to add more complexity to clone
 partial void Cloning(POShipment clone);