public async Task <IActionResult> Edit(int id, [Bind("ResumeId,Name,DateOfBirth,Address,Picture,Email,Phone")] Resume resume) { if (id != resume.ResumeId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(resume); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ResumeExists(resume.ResumeId)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index", "Resumes", new { id = resume.ResumeId })); } return(View(resume)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,SkillName,ApplicantID")] Skill skill) { if (id != skill.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(skill); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SkillExists(skill.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ApplicantID"] = new SelectList(_context.Applicant, "ID", "FirstName", skill.ApplicantID); return(View(skill)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,ContactID,InstitutionName,State,City,StartDate,EndDate,Graduation")] Education education) { if (id != education.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(education); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EducationExists(education.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(education)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,FirstName,LastName,City,State,Phone,Email,WebAddress,skillsId,educationID,referenceID")] applicant applicant) { if (id != applicant.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(applicant); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!applicantExists(applicant.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(applicant)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,Company,Position,Address,Contact,FromYear,ToYear,ApplicantID")] Job job) { if (id != job.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(job); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobExists(job.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ApplicantID"] = new SelectList(_context.Applicant, "ID", "FirstName", job.ApplicantID); return(View(job)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,degreeType,subject,institution,city,state,gradDate,applicantID")] education education) { if (id != education.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(education); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!educationExists(education.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(education)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name")] Technology technology) { if (id != technology.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(technology); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TechnologyExist(technology.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(technology)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,FirstName,LastName,CompanyName,Position,Address,Contact,Email,ApplicantID")] Reference reference) { if (id != reference.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(reference); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReferenceExists(reference.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ApplicantID"] = new SelectList(_context.Applicant, "ID", "FirstName", reference.ApplicantID); return(View(reference)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,SkillDescrption,Date,InstitutionName,State,City,ZipCode")] ProfessionalSkill professionalSkill) { if (id != professionalSkill.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(professionalSkill); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProfessionalSkillExists(professionalSkill.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(professionalSkill)); }
public async Task <IActionResult> Edit(int id, [Bind("ApplicantID,OrgName,Location,From,To,isCurrent,DegreeAttained,ConcentrationIn")] Education education) { if (id != education.EducationID) { return(NotFound()); } if (ModelState.IsValid) { try { education.EducationID = id; _context.Update(education); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EducationExists(education.EducationID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } ViewData["ApplicantID"] = new SelectList(_context.Applicants, "ID", "FullName", education.ApplicantID); return(View(education)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,FirstName,MiddleName,LastName,StreetNumber,Street,City,State,ZipCode,PhoneNumber,EmailAddr,Website")] Contact contact) { if (id != contact.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(contact); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ContactExists(contact.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(contact)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,ExperieceDescription,WorkId,JobID")] Workexperience workexperience) { if (id != workexperience.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(workexperience); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WorkexperienceExists(workexperience.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["JobID"] = new SelectList(_context.Job, "ID", "Company", workexperience.JobID); return(View(workexperience)); }
public async Task <IActionResult> Edit(int id, [Bind("StudyType,StudyName,School,ID,StartDate,EndDate,ResumeId")] Academic academic) { if (id != academic.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(academic); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AcademicExists(academic.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index", "Resumes", new { id = academic.ResumeId })); } return(View(academic)); }
public async Task <IActionResult> Edit(int id, [Bind("DutyID,DutiesPerformed,JobID")] Duty duty) { if (id != duty.DutyID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(duty); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DutyExists(duty.DutyID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["JobID"] = new SelectList(_context.Jobs, "JobID", "CompanyName", duty.JobID); return(View(duty)); }
public async Task <IActionResult> Edit(int id, [Bind("ApplicantID,Company,Title,Location,FromYear,ToYear,IsCurrent,Description")] Job job) { if (id != job.JobID) { return(NotFound()); } if (ModelState.IsValid) { try { job.JobID = id; _context.Update(job); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobExists(job.JobID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } ViewData["ApplicantID"] = new SelectList(_context.Applicants, "ID", "FullName", job.ApplicantID); return(View(job)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,skillName,experienceLevel,yearsUsed,applicantID")] skills skills) { if (id != skills.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(skills); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!skillsExists(skills.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["applicantID"] = new SelectList(_context.applicant, "ID", "ID", skills.applicantID); return(View(skills)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,SchoolName,FacultyName,DepartmentName,DateOfStart,DateOfEnd,Description,GPA,ImageUrl,ImageFile")] Education education) { if (id != education.Id) { return(NotFound()); } if (ModelState.IsValid) { try { if (education.ImageFile != null) { DeleteImage(education); education.ImageUrl = UploadImage(education); } _context.Update(education); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EducationExists(id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(education)); }
public async Task <IActionResult> Edit(int id, [Bind("ApplicantID,CertName,CertAuthority,LicenseNum,From,To,IsEternal,CertURL")] Certification certification) { if (ModelState.IsValid) { try { certification.CertificationID = id; _context.Update(certification); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CertificationExists(certification.CertificationID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } ViewData["ApplicantID"] = new SelectList(_context.Applicants, "ID", "FullName", certification.ApplicantID); return(View(certification)); }
public async Task <IActionResult> Edit(int id, [Bind("CompanyName,AdditionalInformation,ID,StartDate,EndDate,ResumeId")] Job job) { if (id != job.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(job); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobExists(job.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index", "Resumes", new { id = job.ResumeId })); } return(View(job)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,EmployerName,JobTitle,StartDate,StopDate,JobDescription")] Job job) { if (id != job.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(job); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobExists(job.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(job)); }
public async Task <IActionResult> Edit(int id, [Bind("ApplicantID,AffilOrg,Role,Type,From,To,AffilURL,IsCurrent")] Affiliation affiliation) { if (ModelState.IsValid) { try { affiliation.AffiliationID = id; _context.Update(affiliation); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AffiliationExists(affiliation.AffiliationID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } ViewData["ApplicantID"] = new SelectList(_context.Applicants, "ID", "FullName", affiliation.ApplicantID); return(View(affiliation)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,CompanyName,DepartmentName,Title,DateOfStart,DateOfEnd,Description,Status")] Experience experience) { if (id != experience.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(experience); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ExperienceExists(id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(experience)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,InstituteUniversity,Title,Degree,FromYear,ToYear,City,Country,ApplicantID")] Education education) { if (id != education.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(education); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EducationExists(education.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ApplicantID"] = new SelectList(_context.Applicant, "ID", "FirstName", education.ApplicantID); return(View(education)); }
public async Task <IActionResult> Edit(int id, [Bind("JobID,Position,CompanyName,CompanyLocation,WorkStartDate,WorkEndDate,ApplicantID")] Job job) { if (id != job.JobID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(job); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobExists(job.JobID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ApplicantID"] = new SelectList(_context.Applicants, "ApplicantID", "LastName", job.ApplicantID); return(View(job)); }
public async Task <IActionResult> Edit(int id, [Bind("AdditionalId,AdditionalTitle,AdditionalValue,ResumeId")] Additional additional) { if (id != additional.AdditionalId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(additional); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AdditionalExists(additional.AdditionalId)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index", "Resumes", new { id = additional.ResumeId })); } return(View(additional)); }
public async Task <IActionResult> Edit(int id, [Bind("EducationID,ApplicantID,SchoolName,SchoolAddress,Major,Minor,GPA,GraduationDate")] Education education) { if (id != education.EducationID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(education); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EducationExists(education.EducationID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ApplicantID"] = new SelectList(_context.Applicants, "ApplicantID", "LastName", education.ApplicantID); return(View(education)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,FirstName,MiddleName,LastName,Employer,JobTitle,Relationship,PhoneNumber,EmailAddr")] Reference reference) { if (id != reference.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(reference); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReferenceExists(reference.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(reference)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,summary,experienceID")] duties duties) { if (id != duties.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(duties); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!dutiesExists(duties.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["experienceID"] = new SelectList(_context.experience, "ID", "placeWorked", duties.experienceID); return(View(duties)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name,DateOfIssue,SchoolName,Description,ImageUrl,ImageFile")] Certificate certificate) { if (id != certificate.Id) { return(NotFound()); } if (ModelState.IsValid) { try { if (certificate.ImageFile != null) { DeleteImage(certificate); certificate.ImageUrl = UploadImage(certificate); } _context.Update(certificate); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CertificateExists(id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(certificate)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Firstname,Surname,DateOfBirth,Title,Description,Address,Email,PhoneNumber,Location")] Information information) { if (id != information.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(information); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InformationExists(id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(information)); }