public async Task <IActionResult> Edit(string id, [Bind("EducationId,EducationField,EducationYears")] 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))); } return(View(education)); }
public async Task <IActionResult> Edit(string id, [Bind("SalaryId,HourlyRate,OverTime,MonthlyIncome")] Salary salary) { if (id != salary.SalaryId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(salary); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SalaryExists(salary.SalaryId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(salary)); }
public async Task <IActionResult> Edit(string id, [Bind("WorkRid,Promo,NumOfComp,YearsAtCurrComp,YearsRole,TotalWorkingYears")] WorkRecord workRecord) { if (id != workRecord.WorkRid) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(workRecord); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WorkRecordExists(workRecord.WorkRid)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(workRecord)); }
public async Task <IActionResult> Edit(string id, [Bind("DepartmentId,DepartmentType,BusinessTravel,JobRole,JobLevel,JobInvolve")] Department department) { if (id != department.DepartmentId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(department); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DepartmentExists(department.DepartmentId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(department)); }