public ActionResult Create(PropertyCreateInputModel input, string command)
        {
            if (ModelState.IsValid)
            {
                var result = this.propertyAdapter.CreateProperty(input.ToBuilding());

                if (result.StatusCode == 200)
                {
                    if (command == "list")
                        return Redirect("/listing/list/" + result.Result.BuildingId);
                    if (command == "save")
                        return RedirectToAction("manage", new { id = result.Result.BuildingId });
                }

                HandleErrors(result);
            }

            PropertyCreateModel model = new PropertyCreateModel(input);
            return View(model);
        }
 public PropertyCreateModel(PropertyCreateInputModel input)
 {
     Input = input;
 }
Beispiel #3
0
 public PropertyCreateModel(PropertyCreateInputModel input)
 {
     Input = input;
 }
 public PropertyCreateModel()
 {
     Input = new PropertyCreateInputModel();
 }
Beispiel #5
0
 public PropertyCreateModel()
 {
     Input = new PropertyCreateInputModel();
 }