public ActionResult LastProperty() { PropertyViewOperation operation = new PropertyViewOperation(); var model = operation.GetProperties(null, null).Take(3).ToList(); return(PartialView("~/Views/Shared/_LastProperty.cshtml", model)); }
public ActionResult SubmitLand(LandModel model, HttpPostedFileBase[] files) { if (files.Length == 1 && files[0] == null && !model.HasImage) { ModelState.AddModelError(string.Empty, "A photo file must be chosen."); } if (ModelState.IsValid) { PhotoProcessing(files, model); LandOperation operation = new LandOperation(); var result = operation.Execute(model, User.Identity.GetUserId()); if (result.IsSuccess) { PropertyViewOperation op = new PropertyViewOperation(); var resultModel = op.GetProperties(null, User.Identity.GetUserId()); return RedirectToAction("Index", resultModel); } } return View("Submit", model); }
public ActionResult Rent() { string userId = User.Identity.GetUserId(); PropertyViewOperation operation = new PropertyViewOperation(); var model = operation.GetProperties(PropertyStatusClassifier.Rent, userId); if (userId == null) { return(View("~/Views/Property/Index.cshtml", model)); } return(View("~/Views/Property/Edit.cshtml", model)); }
// GET: Home public ActionResult Index() { string userId = User.Identity.GetUserId(); PropertyViewOperation operation = new PropertyViewOperation(); var model = operation.GetProperties(null, userId); if (userId == null) { return(View(model)); } return(View("~/Views/Property/Edit.cshtml", model)); }
public ActionResult Index() { PropertyViewOperation operation = new PropertyViewOperation(); var model = operation.GetProperties(null, User.Identity.GetUserId()); return View(model); }