public ActionResult SaveFloor(Models.Floor model) { Services.Floor floor = new Services.Floor(); try { floor.id = model.id; floor.CustomerId = SessionData.customer.id; floor.Name = model.Name; floor.Description = floor.Description; floor.Height = model.Height; floor.Width = model.Width; Int32 newId = _floorService.SaveFloor(floor); if (newId == 0) { return(RedirectToAction("Index", "Error")); } SessionData.floor.id = newId; return(Json(newId)); } catch (Exception ex) { base.Log(ex); } finally { } return(null); }
public IHttpActionResult Post(FloorModel baseRequest) { var response = service.SaveFloor(baseRequest); return(Ok(response)); }