public static List <SyncOfferInfo> GetOfferInfos(string tourOperatorId, string siteCode) { List <SyncOfferInfo> list = new List <SyncOfferInfo>(); List <UnitOffer> offers = manager.GetUnitOffer(tourOperatorId, siteCode); foreach (var unitoffer in offers) { SyncOfferInfo offer = new SyncOfferInfo(); string unitcode = unitoffer.UnitCode; var touristunit = manager.GetTouristUnitByUnitCode(unitcode); offer.AirConditioning = touristunit.AirConditioning; offer.AllowedPets = true; offer.Bathrooms = touristunit.Bathrooms.ToString(); offer.Bedroom = touristunit.Bedroom; offer.ExtraBeds = touristunit.ExtraBeds; offer.MaxAdults = touristunit.MaxAdults; offer.MaxPersons = touristunit.MaxPersons; offer.MobilhomeArea = touristunit.MobilhomeArea; offer.TerraceArea = touristunit.TerraceArea; offer.OfferCode = unitoffer.OfferCode; offer.OfferDescriptionHtml = unitoffer.OfferDescription; offer.OfferCount = unitoffer.OfferCount; offer.OfferTitel = unitoffer.OfferTitel; offer.ProviderNotice = unitoffer.ProviderNotice; offer.SiteCode = unitoffer.SiteCode; list.Add(offer); } return(list); }
public static SyncOfferInfo GetOfferInfo(string tourOperatorId, string siteCode, string offerCode) { var unitoffer = manager.GetUnitOffer(tourOperatorId, siteCode, offerCode); SyncOfferInfo offer = new SyncOfferInfo(); string unitcode = unitoffer.UnitCode; var touristunit = manager.GetTouristUnitByUnitCode(unitcode); offer.AirConditioning = touristunit.AirConditioning; offer.AllowedPets = true; offer.Bathrooms = touristunit.Bathrooms.ToString(); offer.Bedroom = touristunit.Bedroom; offer.ExtraBeds = touristunit.ExtraBeds; offer.MaxAdults = touristunit.MaxAdults; offer.MaxPersons = touristunit.MaxPersons; offer.MobilhomeArea = touristunit.MobilhomeArea; offer.TerraceArea = touristunit.TerraceArea; offer.OfferCode = unitoffer.OfferCode; offer.OfferDescriptionHtml = unitoffer.OfferDescription; offer.OfferCount = unitoffer.OfferCount; offer.OfferTitel = unitoffer.OfferTitel; offer.ProviderNotice = unitoffer.ProviderNotice; offer.SiteCode = unitoffer.SiteCode; return(offer); }