public static string ConvertToString(TourTypesEnum tourType) { switch (tourType) { case TourTypesEnum.Beach: return(beach); case TourTypesEnum.Bus: return(bus); case TourTypesEnum.Corporate: return(corporate); case TourTypesEnum.Individual: return(individual); case TourTypesEnum.NewYear: return(newYear); case TourTypesEnum.Skiing: return(skiing); default: throw new UnknownTourTypeException(); } }
public ITour CreateTour( string name, string urlName, string city, TourTypesEnum category, decimal price, int stars, string description, string country, int nights, bool isFlightIncluded) { var tour = new TourModel( _tourDataManager, _imageDataManager, name, urlName, city, category, price, stars, description, country, nights, isFlightIncluded ); return(tour); }
public ICountry GetCountry(TourTypesEnum tourType, string countryUrl) { var tourTypeData = TourTypesEnumConverter.ConvertToDbValue(tourType); var countryDataModel = _countryDataManager.GetCountry(tourTypeData, countryUrl); if (countryDataModel == null) { throw new CountryNotFoundException(); } var country = new CountryModel(countryDataModel, _countryDataManager); return(country); }
public ITour GetTour(TourTypesEnum tourType, string countryUrl, string tourUrl) { var tourTypeData = TourTypesEnumConverter.ConvertToDbValue(tourType); var tourDataModel = _tourDataManager.GetTour(tourTypeData, countryUrl, tourUrl); if (tourDataModel == null) { throw new TourNotFoundException(); } var tour = new TourModel(tourDataModel, _tourDataManager, _imageDataManager); return(tour); }
public ICountry CreateCountry( string name, string urlName, TourTypesEnum category, decimal threeStarsPrice, decimal fourStarsPrice, decimal fiveStarsPrice, string description, string pageContent) { var country = new CountryModel( _countryDataManager, name, urlName, category, threeStarsPrice, fourStarsPrice, fiveStarsPrice, description, pageContent ); return(country); }