public ExecuteResult <AirportPairFares> Fd(AirportPair airportPair, DateTime date, string carrier, string userName) { var veService = new veSWScnService(); veService.Url = ReplaceUrl(veService.Url); var returnString = veService.FD(airportPair.ToString(), date.ToString("ddMMMyy", CultureInfo.CreateSpecificCulture("en-US")), carrier, "0", userName); var rawData = returnString; // 解析命令执行后的结果字串; var result = Domain.Utility.Parser.GetFare(rawData); // 根据解析结果返回 return(new ExecuteResult <AirportPairFares> { Result = result, Success = result != null, Message = rawData }); }
public ExecuteResult <string> Fd(string departureAirport, string arrivalAirport, DateTime flightDate, string carrier) { var veService = new veSWScnService(); const string userName = "******"; veService.Url = ReplaceUrl(veService.Url); string airportPair = departureAirport + arrivalAirport; string date = flightDate.ToString("ddMMMyy", CultureInfo.CreateSpecificCulture("en-US")); string result = veService.FD(airportPair, date, carrier, "0", userName); var returnDate = new ExecuteResult <string> { Success = true, Message = result }; return(returnDate); }