Ejemplo n.º 1
0
        public void MapItem_Return_Success()
        {
            Guid id = Guid.NewGuid();
            GarmentPreparingItemDto dto             = new GarmentPreparingItemDto(new GarmentPreparingItem(id, 1, new ProductId(1), "productCode", "productName", "designColor", 1, new UomId(1), "uomUnit", "fabricType", 1, 1, id, null));
            CreateViewModelMapper   viewModelMapper = new CreateViewModelMapper();

            viewModelMapper.MapItem(dto, id);
        }
 public GarmentPreparingItem MapItem(GarmentPreparingItemDto viewModel, Guid headerId)
 {
     return(new GarmentPreparingItem(Guid.NewGuid(), viewModel.UENItemId, new ProductId(viewModel.Product.Id), viewModel.Product.Code, viewModel.Product.Name, viewModel.DesignColor, (double)viewModel.Quantity, new UomId(viewModel.Uom.Id), viewModel.Uom.Unit, viewModel.FabricType, (double)viewModel.RemainingQuantity, (double)viewModel.BasicPrice, headerId, viewModel.ROSource));
 }