示例#1
0
        // To protect from overposting attacks, enable the specific properties you want to bind to, for
        // more details, see https://aka.ms/RazorPagesCRUD.
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

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

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CandidateExists(Candidate.CandidateId))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./Index"));
        }
示例#2
0
        // To protect from overposting attacks, enable the specific properties you want to bind to, for
        // more details, see https://aka.ms/RazorPagesCRUD.
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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