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

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

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!EducationLevelExists(EducationLevel.ElId))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

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

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

            return(RedirectToPage("./Index"));
        }
示例#3
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

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

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

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

            return(RedirectToPage("./Index"));
        }
示例#5
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

            return(RedirectToPage("./Index"));
        }
示例#6
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

            return(RedirectToPage("./Index"));
        }
示例#7
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

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

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

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

            return(RedirectToPage("./Index"));
        }
示例#9
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

            return(RedirectToPage("./Index"));
        }
示例#10
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

            return(RedirectToPage("./Index"));
        }
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                ViewData["PlElhId"] = new SelectList(_context.Hub, "ElhId", "ElhName");
                ViewData["PlLicencedOfficeChildCareOptId"] = new SelectList(_context.Option, "OptId", "OptValue");
                ViewData["PlPeId"]   = new SelectList(_context.Person, "PeId", "PeEmail");
                ViewData["PlPrvdId"] = new SelectList(_context.Provider, "PrvdId", "PrvdName");
                ViewData["PlPtId"]   = new SelectList(_context.ProviderType, "PtId", "PtName");
                ViewData["PlQrId"]   = new SelectList(_context.QuarterlyRange, "QrId", "QuarterDateRange");
                ViewData["PlSparkRatingBeginingOfYearSrId"] = new SelectList(_context.SparkRating, "SrId", "SrName");
                ViewData["PlSparkRatingEndOfYearSrId"]      = new SelectList(_context.SparkRating, "SrId", "SrName");

                return(Page());
            }

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

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