public PropertyCreateModel(PropertyCreateInputModel input)
 {
     Input = input;
 }
 public PropertyCreateModel()
 {
     Input = new PropertyCreateInputModel();
 }
Beispiel #3
0
 public PropertyCreateModel(PropertyCreateInputModel input)
 {
     Input = input;
 }
        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 RedirectToAction("list", new { id = result.Result.BuildingId });

                    if (command == "save")
                        return RedirectToAction("manage", new { id = result.Result.BuildingId });
                }

                HandleErrors(result);
            }

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