Пример #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name_of_candidate,DOB_of_candidate,Mobile_no_of_candidate,Email_address_of_candidate")] Candidate_Detail candidate_Detail)
        {
            if (id != candidate_Detail.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(candidate_Detail);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Candidate_DetailExists(candidate_Detail.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(candidate_Detail));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,Employer_name,Date_of_establishment,Address_of_employer")] Employer_Detail employer_Detail)
        {
            if (id != employer_Detail.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(employer_Detail);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Employer_DetailExists(employer_Detail.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(employer_Detail));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,Candidate_DetailId,Job_DetailId,Candidate_availabilities,Candidate_notice_period")] Apply_Job_Detail apply_Job_Detail)
        {
            if (id != apply_Job_Detail.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(apply_Job_Detail);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Apply_Job_DetailExists(apply_Job_Detail.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Candidate_DetailId"] = new SelectList(_context.Candidate_Detail, "Id", "Mobile_no_of_candidate", apply_Job_Detail.Candidate_DetailId);
            ViewData["Job_DetailId"]       = new SelectList(_context.Set <Job_Detail>(), "Id", "Id", apply_Job_Detail.Job_DetailId);
            return(View(apply_Job_Detail));
        }
        public async Task<IActionResult> Edit(int id, [Bind("Id,Job_role,Job_type,Job_salary,Job_description,Employer_DetailId")] Job_Detail job_Detail)
        {
            if (id != job_Detail.Id)
            {
                return NotFound();
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(job_Detail);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Job_DetailExists(job_Detail.Id))
                    {
                        return NotFound();
                    }
                    else
                    {
                        throw;
                    }
                }
                return RedirectToAction(nameof(Index));
            }
            ViewData["Employer_DetailId"] = new SelectList(_context.Employer_Detail, "Id", "Id", job_Detail.Employer_DetailId);
            return View(job_Detail);
        }