예제 #1
0
        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);
        }
예제 #2
0
        public IHttpActionResult Post(FloorModel baseRequest)
        {
            var response = service.SaveFloor(baseRequest);

            return(Ok(response));
        }