Esempio n. 1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ReasonabilityCheck = await _context.ReasonabilityChecks
                                 .Include(r => r.Measurement).FirstOrDefaultAsync(m => m.Id == id);

            if (ReasonabilityCheck == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Esempio n. 2
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ReasonabilityCheck = await _context.ReasonabilityChecks.FindAsync(id);

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

            return(RedirectToPage("./Index"));
        }
Esempio n. 3
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ReasonabilityCheck = await _context.ReasonabilityChecks
                                 .Include(r => r.Measurement).FirstOrDefaultAsync(m => m.Id == id);

            if (ReasonabilityCheck == null)
            {
                return(NotFound());
            }
            ViewData["MeasurementId"] = new SelectList(_context.PspMeasurements, "Id", "Label");
            return(Page());
        }