コード例 #1
0
        public IActionResult Index(int?id)
        {
            APIHandler   webHandler   = new APIHandler();
            FishingAreas fishingAreas = webHandler.GetFishingAreas();

            if (id != null)
            {
                FishingArea selectedFishingArea = fishingAreas.getFishingArea((int)id);
                fishingAreas.data = new List <FishingArea> {
                    selectedFishingArea
                };
                return(View(fishingAreas));
            }
            return(View(fishingAreas));
        }
コード例 #2
0
        public IActionResult SearchbyCounty(string?county)
        {
            APIHandler   webHandler   = new APIHandler();
            FishingAreas fishingAreas = webHandler.GetFishingAreas();

            if (string != null)
            {
                FishingArea selectedFishingArea = fishingAreas.getFishingArea((string)county);
                fishingAreas.data = new List <FishingArea> {
                    selectedFishingArea
                };
                return(View(fishingAreas));
            }

            return(View(fishingAreas));
        }