public ActionResult Create(Models.PropertyCreateInputModel input, string command) { if (ModelState.IsValid) { var result = this.propertyAdapter.CreateProperty(input.ToBuilding()); if (result.StatusCode == 200) { if (command == "list") { return(Redirect("/ksl/listing/list/" + result.Result.BuildingId)); } if (command == "save") { string uri = string.Format( "{0}/dashboard/property/manage/{1}", Config.Hostname, result.Result.BuildingId ); return(Redirect(uri)); } } HandleErrors(result); } Rentler.Web.Models.PropertyCreateModel model = new Models.PropertyCreateModel(input); model.IsKsl = true; return(View(model)); }
public ActionResult Create(Guid?token, int?PropertyTypeCode) { if (!User.Identity.IsAuthenticated && token.HasValue) { var user = authAdapter.ValidateAuthToken(token.Value); if (user.StatusCode == 200) { CustomAuthentication.SetAuthCookie(user.Result.Username, user.Result.UserId, true); return(RedirectToAction("create")); } } Rentler.Web.Models.PropertyCreateModel model = new Models.PropertyCreateModel(); model.IsKsl = true; // set property type from ksl from user selection model.Input.PropertyTypeCode = PropertyTypeCode.HasValue ? PropertyTypeCode.Value : 0; return(View(model)); }
public ActionResult Create(Guid? token, int? PropertyTypeCode) { if (!User.Identity.IsAuthenticated && token.HasValue) { var user = authAdapter.ValidateAuthToken(token.Value); if (user.StatusCode == 200) { CustomAuthentication.SetAuthCookie(user.Result.Username, user.Result.UserId, true); return RedirectToAction("create"); } } Rentler.Web.Models.PropertyCreateModel model = new Models.PropertyCreateModel(); model.IsKsl = true; // set property type from ksl from user selection model.Input.PropertyTypeCode = PropertyTypeCode.HasValue ? PropertyTypeCode.Value : 0; return View(model); }
public ActionResult Create(Models.PropertyCreateInputModel input, string command) { if (ModelState.IsValid) { var result = this.propertyAdapter.CreateProperty(input.ToBuilding()); if (result.StatusCode == 200) { if (command == "list") return Redirect("/ksl/listing/list/" + result.Result.BuildingId); if (command == "save") { string uri = string.Format( "{0}/dashboard/property/manage/{1}", Config.Hostname, result.Result.BuildingId ); return Redirect(uri); } } HandleErrors(result); } Rentler.Web.Models.PropertyCreateModel model = new Models.PropertyCreateModel(input); model.IsKsl = true; return View(model); }