示例#1
0
 public PlasticSpoolViewModel(PlasticSpoolDto dto, IList <PlasticDto> plastics)
 {
     Id = dto.Id;
     TimeToManufacture = dto.TimeToManufacture;
     Hours             = TimeToManufacture.Hours;
     Min             = TimeToManufacture.Minutes;
     Mass            = dto.Mass;
     ManufactureCost = dto.ManufactureCost;
     SellValue       = dto.SellValue;
     PlasticId       = dto.PlasticId;
     PlasticList     = plastics.Select(x => new SelectListItem(x.Name + " -- " + x.LocationSource.Name, x.Id.ToString()));
 }
示例#2
0
 public PlasticSpoolViewModel(PlasticSpoolDto dto)
 {
     Id = dto.Id;
     TimeToManufacture = dto.TimeToManufacture;
     Hours             = TimeToManufacture.Hours;
     Min             = TimeToManufacture.Minutes;
     Mass            = dto.Mass;
     ManufactureCost = dto.ManufactureCost;
     SellValue       = dto.SellValue;
     PlasticId       = dto.PlasticId;
     PlasticNameLoc  = dto.Plastic.Name + " -- " + dto.Plastic.LocationSource.Name;
 }