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