public List <RealArea> GetAllAdminAreas(RealAreaProxy areasProxy) { List <Area> allAreas = areaController.GetAllAreas(); List <RealArea> allRealAreas = new List <RealArea>(); foreach (Area area in allAreas) { allRealAreas.Add(areasProxy.GetArea(area.Id)); } return(allRealAreas); }
// GET: api/Areas/5 public IHttpActionResult Get(int id) { var result = areasProxy.GetArea(id); if (result == null) { EditAreaController.currentArea = null; EditAreaController.Editing = false; return(NotFound()); } RealAreaProxy.UpdateArea(result); EditAreaController.currentArea = result; EditAreaController.Editing = true; return(Ok(result)); }
public ActionResult Get(int id) { var result = areasProxy.GetArea(id); if (result == null) { EditAreaController.currentArea = null; EditAreaController.Editing = false; System.Diagnostics.Debug.WriteLine("Editing: " + EditAreaController.Editing); return(NotFound()); } RealAreaProxy.UpdateArea(result); EditAreaController.currentArea = result; EditAreaController.Editing = true; System.Diagnostics.Debug.WriteLine("Editing: " + EditAreaController.Editing); return(Ok(result)); }