Example #1
0
 public PropertyCreateModel(PropertyCreateInputModel input)
 {
     Input = input;
 }
Example #2
0
 public PropertyCreateModel()
 {
     Input = new PropertyCreateInputModel();
 }
Example #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);
        }
Example #5
0
 public PropertyCreateModel()
 {
     Input = new PropertyCreateInputModel();
 }