Beispiel #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.Attach(ExternalWmsUrl).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ExternalWmsUrlExists(ExternalWmsUrl.ExternalWmsUrlId))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./Index"));
        }
Beispiel #2
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.ExternalWmsUrl.Add(ExternalWmsUrl);
            await _context.SaveChangesAsync();

            return(RedirectToPage("./Index"));
        }
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.BaseLayer.Add(BaseLayer);
            await _context.SaveChangesAsync();

            return(RedirectToPage("./Index"));
        }
Beispiel #4
0
        public async Task <IActionResult> OnPostAsync(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ExternalWmsUrl = await _context.ExternalWmsUrl.FindAsync(id);

            if (ExternalWmsUrl != null)
            {
                _context.ExternalWmsUrl.Remove(ExternalWmsUrl);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
        public async Task <IActionResult> OnPostAsync(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Layer = await _context.Layer.FindAsync(id);

            if (Layer != null)
            {
                _context.Layer.Remove(Layer);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
        public async Task <IActionResult> OnPostAsync(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            MapInstance = await _context.MapInstance.FindAsync(id);

            if (MapInstance != null)
            {
                _context.MapInstance.Remove(MapInstance);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }