public ActionResult DeleteFloor(int mapId, int floorId) { var mapsCtrl = new MapsController(); BaseResponse response = mapsCtrl.DeleteFloor(floorId); ListResponse<Floor> floors = mapsCtrl.GetFloorsForMap(mapId); return response.Status == RespsonseStatus.Error ? (ActionResult) RedirectToAction("Error") : View("_Floors", floors); }
public ActionResult GetFloorsForMap(int id) { var mapsCtrl = new MapsController(); ListResponse<Floor> floors = mapsCtrl.GetFloorsForMap(id); ViewBag.MapId = id; return PartialView("_Floors", floors); }