//[ValidateAntiForgeryToken] public async Task <ActionResult <ApplicationFooter> > Edit(int id, [Bind("Id,ApplicationnId,Title,Content")] ApplicationFooter applicationFooter) { if (id != applicationFooter.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(applicationFooter); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ApplicationFooterExists(applicationFooter.Id)) { return(NotFound()); } else { throw; } } return(Ok()); } return(new JsonResult(applicationFooter)); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, [Bind("Id,JobId,DescriptionShort,DescriptionLong,Nation,Region,MinSalary,MaxSalary,Current")] JobData jobData) { if (id != jobData.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(jobData); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobDataExists(jobData.Id)) { return(NotFound()); } else { throw; } } return(Ok()); } return(new JsonResult(jobData)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,UserId,SkillName,SkillDescritpion,SelfRating,Current")] UserSkill userSkill) { if (id != userSkill.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userSkill); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserSkillExists(userSkill.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(userSkill)); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, User user) { //TODO: add roles if (id != user.Id) { return(BadRequest("Id not matching")); } if (ModelState.IsValid) { try { _context.Update(user); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserExists(user.Id)) { return(NotFound("No user with this id in database")); } else { throw; } } return(Ok($"User {user.FirstName} {user.LastName} was succesfully edited")); } return(BadRequest("Bad model")); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, [Bind("Id,UserId,JobOfferId,Title,Answer,DateSent,DateAnswered,Current")] Application application) { if (id != application.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(application); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ApplicationExists(application.Id)) { return(NotFound()); } else { throw; } } return(Ok()); } return(new JsonResult(application)); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, [Bind("Id,UserId,Title,Description,SkillSummary,TestimonyUrl,Salary,StartDate,EndDate,Current")] UserJobHistory userJobHistory) { if (id != userJobHistory.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userJobHistory); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserJobHistoryExists(userJobHistory.Id)) { return(NotFound()); } else { throw; } } return(Ok()); } return(new JsonResult(userJobHistory)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,UserId,Name,Content,Url")] UserWebsite userWebsite) { if (id != userWebsite.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userWebsite); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserWebsiteExists(userWebsite.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(userWebsite)); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, [Bind("Id,UserId,AddressNation,AddressCity,AddressStreet,AddressState,PhoneNumber,PhoneNumberAlt,EmailAddress,EmailAddressAlt,Current")] UserContactData userContactData) { if (id != userContactData.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userContactData); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserContactDataExists(userContactData.Id)) { return(NotFound()); } else { throw; } } return(Ok()); } return(new JsonResult(userContactData)); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, [Bind("Id,CompanyBranchId,JobId,HeadHunterId,JobExchangeId,ApplicationnId,SalaryOffered,IsActive,Releasedate,JobOfferUrl")] JobOffer jobOffer) { if (id != jobOffer.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(jobOffer); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobOfferExists(jobOffer.Id)) { return(NotFound()); } else { throw; } } return(Ok()); } return(new JsonResult(jobOffer)); }
//[ValidateAntiForgeryToken] public async Task <ActionResult <Jobsuche> > Edit(int id, [Bind("Id,UserId,JobOfferId,CompanyId,Email,JobId,Status,DateSent,DateAnswered,Proof")] Jobsuche jobsuche) { if (id != jobsuche.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(jobsuche); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobsucheExists(jobsuche.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(jobsuche); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, [Bind("Id,JobOfferId,Title,TitleAlt,TitleAlt2")] 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(Ok()); } return(new JsonResult(job)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,IsActive")] HeadHunter headHunter) { if (id != headHunter.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(headHunter); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HeadHunterExists(headHunter.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(headHunter)); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, [Bind("Id,CompanyId,JobExchangeId,AddressNation,AddressCity,AddressStreet,AddressState,PhoneNumber,PhoneNumberAlt,EmailAddress,IsActive")] HeadHunterContactData headHunterContactData) { if (id != headHunterContactData.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(headHunterContactData); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HeadHunterContactDataExists(headHunterContactData.Id)) { return(NotFound()); } else { throw; } } return(Ok()); } return(new JsonResult(headHunterContactData)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,CompanyId,CompanyBranchId,Name,PhoneNumber,PhoneNumberAlt,EmailAddress,EmailAddressAlt,IsActive")] CompanyContactData companyContactData) { if (id != companyContactData.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(companyContactData); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompanyContactDataExists(companyContactData.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(companyContactData)); }
public async Task <IActionResult> Edit(int id, [Bind("Id, CompanyId,Name,Description,AddressNation,AddressCity,AddressStreet,AddressState")] CompanyBranch companyBranch) { companyBranch.CompanyId = id; if (ModelState.IsValid) { try { _context.Update(companyBranch); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompanyBranchExists(companyBranch.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index), new { id = companyBranch.Id })); } return(View(companyBranch)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,UserId,Title,Facility,AddressNation,FacilityAddressCity,FacilityAddressStreet,FacilityAddressState,Graduation,TestimonyUrl,StartDate,EndDate")] UserEducation userEducation) { if (id != userEducation.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userEducation); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserEducationExists(userEducation.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(userEducation)); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Url,Current")] JobExchange jobExchange) { if (id != jobExchange.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(jobExchange); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobExchangeExists(jobExchange.Id)) { return(NotFound()); } else { throw; } } return(Ok()); } return(new JsonResult(jobExchange)); }
//[ValidateAntiForgeryToken] public async Task <IActionResult> Edit(int id, [Bind("Id,CompanyName,Current, Description")] Company company) { if (id != company.Id) { return(NotFound()); } // company.Id = id; if (ModelState.IsValid) { try { _context.Update(company); await _context.SaveChangesAsync(); return(Ok(new JsonResult(company))); } catch (DbUpdateConcurrencyException) { if (!CompanyExists(company.Id)) { return(NotFound()); } else { throw; } } } return(BadRequest()); }
public async Task <IActionResult> Edit(int id, [Bind("Id,JobId,Name,Content")] JobSkill jobSkill) { if (id != jobSkill.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(jobSkill); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobSkillExists(jobSkill.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(jobSkill)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,ApplicationnId,Title,Content")] ApplicationBody applicationBody) { if (id != applicationBody.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(applicationBody); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ApplicationBodyExists(applicationBody.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(applicationBody)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,CompanyId,Name,Content,Date")] CompanyHistory companyHistory) { if (id != companyHistory.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(companyHistory); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompanyHistoryExists(companyHistory.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(companyHistory)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,BirthDate,Religion,Sex,Gender,Picture,PictureAlt,Nationality,Nationality2")] User user) { if (id != user.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(user); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserExists(user.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(user)); }