Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        // 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));
        }
Exemplo n.º 3
0
        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));
        }