public DTO.OfferMng.Offer DB2DTO_Offer(OfferMng_Offer_View dbItem) { DTO.OfferMng.Offer dtoItem = AutoMapper.Mapper.Map <OfferMng_Offer_View, DTO.OfferMng.Offer>(dbItem); /* * FORMAT FIELDS DATETIME */ if (dbItem.ConcurrencyFlag != null) { dtoItem.ConcurrencyFlag_String = Convert.ToBase64String(dbItem.ConcurrencyFlag); } if (dbItem.OfferDate.HasValue) { dtoItem.OfferDateFormated = dbItem.OfferDate.Value.ToString("dd/MM/yyyy"); } if (dbItem.ValidUntil.HasValue) { dtoItem.ValidUntilFormated = dbItem.ValidUntil.Value.ToString("dd/MM/yyyy"); } if (dbItem.LDS.HasValue) { dtoItem.LDSFormated = dbItem.LDS.Value.ToString("dd/MM/yyyy"); } if (dbItem.EstimatedDeliveryDate.HasValue) { dtoItem.EstimatedDeliveryDateFormated = dbItem.EstimatedDeliveryDate.Value.ToString("dd/MM/yyyy"); } if (dbItem.UpdatedDate.HasValue) { dtoItem.UpdatedDateFormated = dbItem.UpdatedDate.Value.ToString("dd/MM/yyyy"); } if (dbItem.CreatedDate.HasValue) { dtoItem.CreatedDateFormated = dbItem.UpdatedDate.Value.ToString("dd/MM/yyyy"); } return(dtoItem); }
public DTO.OfferMng.OfferLine DB2DTO_OfferLineEdit(OfferMng_Offer_View dbItem) { DTO.OfferMng.OfferLine dtoItem = AutoMapper.Mapper.Map <OfferMng_Offer_View, DTO.OfferMng.OfferLine>(dbItem); return(dtoItem); }