public async Task <IActionResult> Edit(int id, [Bind("RefID,Name,CompanyName,Role,Position,EmailID,WorkID")] Reference reference) { if (id != reference.RefID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(reference); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReferenceExists(reference.RefID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(reference)); }
public async Task <IActionResult> Edit(int id, [Bind("WorkID,Position,Area,StartYear,EndYear,YearOfExperience,Description,UserID")] WorkExperience workExperience) { if (id != workExperience.WorkID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(workExperience); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WorkExperienceExists(workExperience.WorkID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["UserID"] = new SelectList(_context.Users, "UserID", "UserID", workExperience.UserID); return(View(workExperience)); }
public async Task <IActionResult> Edit(int id, [Bind("HobbyID,Name,UserID")] Interest interest) { if (id != interest.HobbyID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(interest); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InterestExists(interest.HobbyID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["UserID"] = new SelectList(_context.Users, "UserID", "UserID", interest.UserID); return(View(interest)); }
public async Task <IActionResult> Edit(int id, [Bind("UserID,FirstName,LastName,UserName,PassWord,MobileNo,EmailID")] User user) { if (id != user.UserID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(user); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserExists(user.UserID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Edit(int id, [Bind("EducationID,Title,CollegeName,GPA,StartYear,EndYear,UserID")] 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["UserID"] = new SelectList(_context.Users, "UserID", "UserID", education.UserID); return(View(education)); }
public async Task <IActionResult> Edit(int id, [Bind("ProjectID,Title,TechnologyUsed,LanguageUsed,StartYear,EndYear,Description,UserID")] Project project) { if (id != project.ProjectID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(project); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProjectExists(project.ProjectID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["UserID"] = new SelectList(_context.Users, "UserID", "UserID", project.UserID); return(View(project)); }
public async Task <IActionResult> Edit(int id, [Bind("AchievementID,Title,Year,Description,UserID")] Achievement achievement) { if (id != achievement.AchievementID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(achievement); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AchievementExists(achievement.AchievementID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["UserID"] = new SelectList(_context.Users, "UserID", "UserID", achievement.UserID); return(View(achievement)); }