示例#1
0
 public ReOrderLevel Map(ReorderLevelDTO dto)
 {
     if (dto == null) return null;
     var reorderLevel = Mapper.Map<ReorderLevelDTO, ReOrderLevel>(dto);
     reorderLevel.DistributorId = _costCentreRepository.GetById(dto.DistributorMasterId);
     reorderLevel.ProductId = _productRepository.GetById(dto.ProductMasterId);
     return reorderLevel;
 }
 private ReorderLevelDTO Map(tblReOrderLevel tbl)
 {
     var dto = new ReorderLevelDTO
                   {
                       MasterId = tbl.id,
                       DateCreated = tbl.IM_DateCreated,
                       DateLastUpdated = tbl.IM_DateLastUpdated,
                       StatusId = tbl.IM_Status,
                       DistributorMasterId = tbl.DistributorId,
                       ProductMasterId = tbl.ProductId,
                       ProductReOrderLevel = tbl.ProductReOrderLevel
                   };
     return dto;
 }