public ActionResult ContactInfo(ReservationContactInfoInputModel model) { if (ModelState.IsValid) { try { var member = this.LoggedInMember; if (member != null) { this.CurrentReservation.MemberId = member.Id; } this.CurrentReservation.Name = model.Name; this.CurrentReservation.PhoneNumber = model.Cellphone; var request = new Reservations() { Reservation = this.CurrentReservation }; var response = this.CurrentAPIClient.Post<ReservationsResponse>("/reservation", request); this.CurrentReservation.Id = response.Reservation.Id; Success("Your reservation was created successfully"); return RedirectToAction("Complete"); } catch (WebServiceException ex) { Error("Something bad happened while trying to save your reservation, please try again. Tech info:" + ex.Message); return View(model); } } Error("There is an error in your data"); return View(model); }
public ActionResult ContactInfo() { var member = this.LoggedInMember; if (member != null) { var r = new ReservationContactInfoInputModel { Cellphone = member.CellPhone, Name = member.Name }; Information("We filled out your contact information from you profile, please verify that it's correct"); return View(r); } return View(new ReservationContactInfoInputModel()); }