Пример #1
0
        internal PullRequestSkuModel(RequestSku entity)
        {
            this.SourceSku = new SkuModel
            {
                Style     = entity.SourceSku.Style,
                Color     = entity.SourceSku.Color,
                Dimension = entity.SourceSku.Dimension,
                SkuSize   = entity.SourceSku.SkuSize,
                SkuId     = entity.SourceSku.SkuId,
            };
            if (entity.TargetSku != null)
            {
                this.TargetSku = new SkuModel
                {
                    Style     = entity.TargetSku.Style,
                    Color     = entity.TargetSku.Color,
                    Dimension = entity.TargetSku.Dimension,
                    SkuSize   = entity.TargetSku.SkuSize,
                    // SkuId = entity.TargetSku.SkuId,
                };
            }

            //Pcs requested
            this.RequestedPieces = entity.RequestedPieces;
        }
Пример #2
0
 internal RequestSkuViewModel(RequestSku entity)
 {
     this.Pieces    = entity.RequestedPieces;
     this.SourceSku = new SkuModel
     {
         Style     = entity.SourceSku.Style,
         Color     = entity.SourceSku.Color,
         Dimension = entity.SourceSku.Dimension,
         SkuSize   = entity.SourceSku.SkuSize,
         SkuId     = entity.SourceSku.SkuId,
         UpcCode   = entity.SourceSku.UpcCode
     };
     if (entity.TargetSku != null)
     {
         this.TargetSku = new SkuModel
         {
             Style     = entity.TargetSku.Style,
             Color     = entity.TargetSku.Color,
             Dimension = entity.TargetSku.Dimension,
             SkuSize   = entity.TargetSku.SkuSize,
             SkuId     = entity.TargetSku.SkuId,
             UpcCode   = entity.TargetSku.UpcCode
         };
     }
 }