public static System.Collections.Generic.List <DSS3_LogisticsPoolingForUrbanDistribution.BO.PubMessage> testReflectionImplementation() { var _count0 = 0; DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS order = zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().GetAll <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>(01, 10, out _count0), 3); return(DSS3_LogisticsPoolingForUrbanDistribution.BO.UtilsExtensions.InitPubMessage(order)); }
/// <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(OrderWMS compareTo) { return(!this.IsTransient() && !compareTo.IsTransient() && this.Id.Equals(compareTo.Id)); }
/// <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 [OrderWMS] instance to use as the destination.</param> /// <returns>A copy of the object</returns> public virtual OrderWMS Copy(bool deep = false, Hashtable copiedObjects = null, bool asNew = false, bool reuseNestedObjects = false, OrderWMS copy = null) { if (copiedObjects == null) { copiedObjects = new Hashtable(); } if (copy == null && copiedObjects.Contains(this)) { return((OrderWMS)copiedObjects[this]); } copy = copy ?? new OrderWMS(); if (!asNew) { copy.TransientId = this.TransientId; copy.Id = this.Id; } 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.OrdStatusString = this.OrdStatusString; copy.Polyline = this.Polyline; copy.Warehouse = this.Warehouse; copy.Truck = this.Truck; copy.WarehouseAddress = this.WarehouseAddress; copy.ETA = this.ETA; copy.ATA = this.ATA; copy.DestLat = this.DestLat; copy.DestLong = this.DestLong; copy.COE = this.COE; if (!copiedObjects.Contains(this)) { copiedObjects.Add(this, copy); } if (deep && this.proofOfDelivery != null) { if (!copiedObjects.Contains(this.proofOfDelivery)) { if (asNew && reuseNestedObjects) { copy.ProofOfDelivery = this.ProofOfDelivery; } else if (asNew) { copy.ProofOfDelivery = this.ProofOfDelivery.Copy(deep, copiedObjects, true); } else { copy.proofOfDelivery = this.proofOfDelivery.Copy(deep, copiedObjects, false); } } else { if (asNew) { copy.ProofOfDelivery = (ProofOfDelivery)copiedObjects[this.ProofOfDelivery]; } else { copy.proofOfDelivery = (ProofOfDelivery)copiedObjects[this.ProofOfDelivery]; } } } return(copy); }
public static void SaveOrderImplementation(DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS order) { new DSS3_LogisticsPoolingForUrbanDistribution.DAL.Repository().Save <DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS>(order); }
public void ProofOfDelivery_persistence_test() { DateTime now = DateTime.Now; // Get datetime without milliseconds now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind); var _order_truckdriver_proofofdelivery = new DSS3_LogisticsPoolingForUrbanDistribution.BO.TruckDriver { UserName = "******", PasswordHash = "TruckDriver_PasswordHash", SecurityStamp = "TruckDriver_SecurityStamp", EmailConfirmed = true, LockoutEnabled = true, PhoneNumberConfirmed = true, TwoFactorEnabled = true, AccessFailedCount = 4146, Name = "TruckDriver_Name", Email = "TruckDriver_Email", PhoneNumber = "TruckDriver_PhoneNumber", LockoutEndDate = now, }; var _order_orderwms_proofofdelivery = new DSS3_LogisticsPoolingForUrbanDistribution.BO.OrderWMS { OrdID = 2278, OrdOrderID_Remote = 5488, OrdOrderExternalCode = "OrderWMS_OrdOrderExternalCode", OrdOrderDescr = "OrderWMS_OrdOrderDescr", OrdRegDateTime = now, OrdDateTime = now, OrdDeliveryDateTime = now, OrdDepositorCode = "OrderWMS_OrdDepositorCode", OrdDepositorFullName = "OrderWMS_OrdDepositorFullName", OrdCustomerCode = "OrderWMS_OrdCustomerCode", OrdCustomerFullName = "OrderWMS_OrdCustomerFullName", OrdStatus = 8366, OrdMemo = "OrderWMS_OrdMemo", OrdPurpose = "OrderWMS_OrdPurpose", OrdDeliveryValue = 222.222f, OrdDeliveryNotes = "OrderWMS_OrdDeliveryNotes", OrdIsReturn = 8057, OrdPrdTypeDescr = "OrderWMS_OrdPrdTypeDescr", OrdWrhRoutingCode = "OrderWMS_OrdWrhRoutingCode", OrdDlsId = 8986, OrdDlsDescr = "OrderWMS_OrdDlsDescr", OrdDlsAddress = "OrderWMS_OrdDlsAddress", OrdDlsZipCode = "OrderWMS_OrdDlsZipCode", OrdDlsCity = "OrderWMS_OrdDlsCity", OrdDlsArea = "OrderWMS_OrdDlsArea", OrdRoutingStatus = 1780, OrdLfdWeight = 222.222f, OrdLfdVol = 222.222f, OrdLfdCtn = 4656, OrdLfdBar = 5560, OrdLfdPalEuro = 125, OrdLfdPalInd = 5995, OrdLfdPalElsa = 7619, OrdLfdParOU = 9209, OrdLfdVar = 6875, OrdVoucherDateTime = now, OrdVoucherNumber = "OrderWMS_OrdVoucherN", OrdVoucherSeries = "OrderWMS_OrdVoucherS", OrdVoucherId = 8674, OrdAgencyCode = "OrderWMS_OrdAgencyCode", OrdAgencyDescr = "OrderWMS_OrdAgencyDescr", OrdAgencyAddress = "OrderWMS_OrdAgencyAddress", OrdTelRouteId = 8028, OrdVchPlateNr = "OrderWMS_OrdVchPlateNr", OrdVchRouteNr = 7075, OrdVhrDate = now, OrdVhrID = 8017, OrdLastUpdateDateTime = now, OrdReadyForLoading = 4850, Polyline = "OrderWMS_Polyline", Warehouse = "OrderWMS_Warehouse", Truck = "OrderWMS_Truck", WarehouseAddress = "OrderWMS_WarehouseAddress", ETA = "OrderWMS_ETA", ATA = now, DestLat = 222.222f, DestLong = 222.222f, COE = 222.222f, }; new PersistenceSpecification <DSS3_LogisticsPoolingForUrbanDistribution.BO.ProofOfDelivery>(Session) .CheckProperty(p => p.DateIssued, now) .CheckProperty(p => p.PODNumber, 3476) .CheckProperty(p => p.QualityStatus, "ProofOfDelivery_QualityStatus") .CheckProperty(p => p.QuantityStatus, "ProofOfDelivery_QuantityStatus") .CheckProperty(p => p.DeliveryStatus, "ProofOfDelivery_DeliveryStatus") .CheckProperty(p => p.PODAttachment, "ProofOfDelivery_PODAttachment") .CheckProperty(p => p.Comments, "ProofOfDelivery_Comments") .CheckProperty(p => p.DamagedPackaging, true) .CheckProperty(p => p.DamagedProducts, true) .CheckProperty(p => p.CloseToExpiry, true) .CheckReference(p => p.TruckDriver, _order_truckdriver_proofofdelivery) .CheckReference(p => p.OrderWMS, _order_orderwms_proofofdelivery) .VerifyTheMappings(); }