public static DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume CustomCopy(this BO.CustomVolume @this) { using (new zAppDev.DotNet.Framework.Profiling.Profiler("CustomVolume", zAppDev.DotNet.Framework.Profiling.AppDevSymbolType.ClassOperation, "CustomCopy")) { DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume returnVolume = new DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume(); returnVolume.Label = (@this?.Label ?? ""); returnVolume.Weight = (@this?.Weight ?? 0); foreach (var j in @this?.VolumeComposition ?? Enumerable.Empty <DSS3_LogisticsPoolingForUrbanDistribution.BO.VolumeComposition>()) { DSS3_LogisticsPoolingForUrbanDistribution.BO.VolumeComposition currentVolume = new DSS3_LogisticsPoolingForUrbanDistribution.BO.VolumeComposition(); currentVolume.Units = (j?.Units ?? 0); currentVolume.VolumeComponent = j?.VolumeComponent; returnVolume?.AddVolumeComposition(currentVolume); } return(returnVolume); } }
public static int?Compare(this BO.CustomVolume @this, DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume Volume) { using (new zAppDev.DotNet.Framework.Profiling.Profiler("CustomVolume", zAppDev.DotNet.Framework.Profiling.AppDevSymbolType.ClassOperation, "Compare")) { int?compare = 0; for (var i = 0; i < (@this?.VolumeComposition?.Count() ?? 0); i = i + 1) { if ((zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(@this?.VolumeComposition, i)?.Units != zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(Volume?.VolumeComposition, i)?.Units)) { compare = compare.GetValueOrDefault(0) + 1; } } return(compare); } }