Beispiel #1
0
/// <summary>
///     Returns true if self and the provided entity have the same Id values
///     and the Ids are not of the default Id value
/// </summary>
        protected bool HasSameNonDefaultIdAs(OrderDTO compareTo)
        {
            return(!this.IsTransient() && !compareTo.IsTransient() && this.OrderDTOKey.Equals(compareTo.OrderDTOKey));
        }
Beispiel #2
0
/// <summary>
/// Copies the current object to a new instance
/// </summary>
/// <param name="deep">Copy members that refer to objects external to this class (not dependent)</param>
/// <param name="copiedObjects">Objects that should be reused</param>
/// <param name="asNew">Copy the current object as a new one, ready to be persisted, along all its members.</param>
/// <param name="reuseNestedObjects">If asNew is true, this flag if set, forces the reuse of all external objects.</param>
/// <param name="copy">Optional - An existing [OrderDTO] instance to use as the destination.</param>
/// <returns>A copy of the object</returns>
        public virtual OrderDTO Copy(bool deep = false, Hashtable copiedObjects = null, bool asNew = false, bool reuseNestedObjects = false, OrderDTO copy = null)
        {
            if (copiedObjects == null)
            {
                copiedObjects = new Hashtable();
            }
            if (copy == null && copiedObjects.Contains(this))
            {
                return((OrderDTO)copiedObjects[this]);
            }
            copy = copy ?? new OrderDTO();
            if (!asNew)
            {
                copy.TransientId = this.TransientId;
                copy.OrderDTOKey = this.OrderDTOKey;
            }
            copy.OrdID                 = this.OrdID;
            copy.OrdOrderID_Remote     = this.OrdOrderID_Remote;
            copy.OrdOrderExternalCode  = this.OrdOrderExternalCode;
            copy.OrdOrderDescr         = this.OrdOrderDescr;
            copy.OrdRegDateTime        = this.OrdRegDateTime;
            copy.OrdDateTime           = this.OrdDateTime;
            copy.OrdDeliveryDateTime   = this.OrdDeliveryDateTime;
            copy.OrdDepositorCode      = this.OrdDepositorCode;
            copy.OrdDepositorFullName  = this.OrdDepositorFullName;
            copy.OrdCustomerCode       = this.OrdCustomerCode;
            copy.OrdCustomerFullName   = this.OrdCustomerFullName;
            copy.OrdStatus             = this.OrdStatus;
            copy.OrdMemo               = this.OrdMemo;
            copy.OrdPurpose            = this.OrdPurpose;
            copy.OrdDeliveryValue      = this.OrdDeliveryValue;
            copy.OrdDeliveryNotes      = this.OrdDeliveryNotes;
            copy.OrdIsReturn           = this.OrdIsReturn;
            copy.OrdPrdTypeDescr       = this.OrdPrdTypeDescr;
            copy.OrdWrhRoutingCode     = this.OrdWrhRoutingCode;
            copy.OrdDlsId              = this.OrdDlsId;
            copy.OrdDlsDescr           = this.OrdDlsDescr;
            copy.OrdDlsAddress         = this.OrdDlsAddress;
            copy.OrdDlsZipCode         = this.OrdDlsZipCode;
            copy.OrdDlsCity            = this.OrdDlsCity;
            copy.OrdDlsArea            = this.OrdDlsArea;
            copy.OrdRoutingStatus      = this.OrdRoutingStatus;
            copy.OrdLfdWeight          = this.OrdLfdWeight;
            copy.OrdLfdVol             = this.OrdLfdVol;
            copy.OrdLfdCtn             = this.OrdLfdCtn;
            copy.OrdLfdBar             = this.OrdLfdBar;
            copy.OrdLfdPalEuro         = this.OrdLfdPalEuro;
            copy.OrdLfdPalInd          = this.OrdLfdPalInd;
            copy.OrdLfdPalElsa         = this.OrdLfdPalElsa;
            copy.OrdLfdParOU           = this.OrdLfdParOU;
            copy.OrdLfdVar             = this.OrdLfdVar;
            copy.OrdVoucherDateTime    = this.OrdVoucherDateTime;
            copy.OrdVoucherNumber      = this.OrdVoucherNumber;
            copy.OrdVoucherSeries      = this.OrdVoucherSeries;
            copy.OrdVoucherId          = this.OrdVoucherId;
            copy.OrdAgencyCode         = this.OrdAgencyCode;
            copy.OrdAgencyDescr        = this.OrdAgencyDescr;
            copy.OrdAgencyAddress      = this.OrdAgencyAddress;
            copy.OrdTelRouteId         = this.OrdTelRouteId;
            copy.OrdVchPlateNr         = this.OrdVchPlateNr;
            copy.OrdVchRouteNr         = this.OrdVchRouteNr;
            copy.OrdVhrDate            = this.OrdVhrDate;
            copy.OrdVhrID              = this.OrdVhrID;
            copy.OrdLastUpdateDateTime = this.OrdLastUpdateDateTime;
            copy.OrdReadyForLoading    = this.OrdReadyForLoading;
            copy.Warehouse             = this.Warehouse;
            copy.WarehouseAddress      = this.WarehouseAddress;
            copy.Polyline              = this.Polyline;
            if (!copiedObjects.Contains(this))
            {
                copiedObjects.Add(this, copy);
            }
            return(copy);
        }