public ActionResult Agreement() { BookingAgreementContext model = new BookingAgreementContext(); AgreementParam param = new AgreementParam { ln = UrlLanguage.CurrentLanguage }; BookingAgreement agreement = new GuestService.Controllers.Api.BookingController().Agreement(param); model.Text = (agreement != null) ? agreement.text : null; return this.PartialView("_Agreement", model); }
public ActionResult Agreement() { BookingAgreementContext model = new BookingAgreementContext(); AgreementParam param = new AgreementParam { ln = UrlLanguage.CurrentLanguage }; BookingAgreement agreement = new GuestService.Controllers.Api.BookingController().Agreement(param); model.Text = (agreement != null) ? agreement.text : null; return(this.PartialView("_Agreement", model)); }
public BookingAgreement Agreement([FromUri] AgreementParam param) { BookingAgreement agreement = new BookingAgreement(); string str = HttpContext.Current.Server.MapPath(CustomizationPath.AgreementsFolder); string path = Path.Combine(str, string.Format("Booking{0}{1}.txt", ".", UrlLanguage.CurrentLanguage)); if (File.Exists(path)) { agreement.text = File.ReadAllText(path); return(agreement); } path = Path.Combine(str, string.Format("Booking{0}{1}.txt", "", "")); if (File.Exists(path)) { agreement.text = File.ReadAllText(path); } return(agreement); }