public string MultiCityLink(string DepartureAirportOne, bool NearbyDepartureOne, string TargetAiportOne, bool NearbyTargetOne, string DepartureAirportTwo, bool NearbyDepartureTwo, string TargetAiportTwo, bool NearbyTargetTwo, int Adults, int Youth, int Children, int SeatInfant, int LapInfant, DateTime DepartureDateOne, DateTime DepartureDateTwo, Country SiteVersion) { string Link = SiteVersion.WebDomain; //Airport no 1 if (NearbyDepartureOne == true) { Link += DepartureAirportOne + ",nearby-"; } else { Link += DepartureAirportOne + "-"; } if (NearbyTargetOne == true) { Link += TargetAiportOne + ",nearby/"; } else { Link += TargetAiportOne + "/"; } //Date no 1 Link += DepartureDateOne.ToShortDateString() + "-flexible/"; //Airport no 2 if (NearbyDepartureTwo == true) { Link += DepartureAirportTwo + ",nearby-"; } else { Link += DepartureAirportTwo + "-"; } if (NearbyTargetTwo == true) { Link += TargetAiportTwo + ",nearby/"; } else { Link += TargetAiportTwo + "/"; } //Date no 2 Link += DepartureDateTwo.ToShortDateString() + "-flexible/"; //Passengers Link += Adults.ToString() + "adults/"; if (Youth + Children + SeatInfant + LapInfant != 0) { Link += "children-"; for (int i = 0; i < Youth; i++) { Link += "-17-"; } for (int i = 0; i < Children; i++) { Link += "-11-"; } for (int i = 0; i < SeatInfant; i++) { Link += "-1S-"; } for (int i = 0; i < LapInfant; i++) { Link += "-1L-"; } } return(Link.Replace("--", "-").TrimEnd('-')); }
public string RoundTripLink(string DepartureAirport, bool NearbyDeparture, string TargetAiport, bool NearbyTarget, int Adults, int Youth, int Children, int SeatInfant, int LapInfant, DateTime DepartureDate, DateTime ReturnDate, bool FlexibleDeparture, bool FlexibleReturn, Country SiteVersion) { string Link = SiteVersion.WebDomain; //Airports if (NearbyDeparture == true) { Link += DepartureAirport + ",nearby-"; } else { Link += DepartureAirport + "-"; } if (NearbyTarget == true) { Link += TargetAiport + ",nearby/"; } else { Link += TargetAiport + "/"; } //Departure date if (FlexibleDeparture == true) { Link += DepartureDate.ToShortDateString() + "-flexible/"; } else { Link += DepartureDate.ToShortDateString() + "/"; } //Return date if (FlexibleReturn == true) { Link += ReturnDate.ToShortDateString() + "-flexible/"; } else { Link += ReturnDate.ToShortDateString() + "/"; } //Passengers Link += Adults.ToString() + "adults/"; if (Youth + Children + SeatInfant + LapInfant != 0) { Link += "children-"; for (int i = 0; i < Youth; i++) { Link += "-17-"; } for (int i = 0; i < Children; i++) { Link += "-11-"; } for (int i = 0; i < SeatInfant; i++) { Link += "-1S-"; } for (int i = 0; i < LapInfant; i++) { Link += "-1L-"; } } return(Link.Replace("--", "-").TrimEnd('-')); }