Exemplo n.º 1
0
        public ActionResult ProcessSearchFormInput(SearchForm model)
        {
            // this method works out what the search type is.
            // from here we can then work out how we do the search.

            // for now we are going to pretend it is a package search
            // this call will prep the search
            FlightServiceClient flightServiceClient = new FlightServiceClient();
            var flightSearchResult = flightServiceClient.StartSearch(new FlightSearch
            {
                IsPackage = true,
                SearchType = "Package"
            });

            // save this into session
            SessionService sessionService = new SessionService();
            sessionService.SetItem(SessionEnum.FlightSearch, flightSearchResult.FlightSearchId.ToString(), flightSearchResult);

            // this will change depending on the search type
            return Redirect("search/package-flight-wait/?id=" + flightSearchResult.FlightSearchId);
        }
Exemplo n.º 2
0
 public ActionResult index(SearchForm model)
 {
     return View(model);
 }