public async Task <IActionResult> PutFormModel(int id, FormModel formModel) { if (id != formModel.id) { return(BadRequest()); } _context.Entry(formModel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FormModelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult _Edit([Bind(Include = "FormId,FirstMidName,LastName,BirthDate,PhoneNumber,Address,MilitaryService,MilitaryServiceEnum,TshirtSize,PantSize,ShoesSize,DrivingLicence,DrivingLicenceClass,ForkliftLicence,CraneOperationLicense,PrimarySchool_bool,PrimarySchool_name,SecondarySchool_bool,SecondarySchool_name,HighSchool_bool,HighSchool_name,AssociateDegree_bool,AssociateDegree_name,BachelorDegree_bool,BachelorDegree_name,MasterDegree_bool,MasterDegree_name,CourseNSeminar1_Certificate,CourseNSeminar1_Topic,CourseNSeminar2_Certificate,CourseNSeminar2_Topic,CourseNSeminar3_Certificate,CourseNSeminar3_Topic,LangInfo_eng,LangInfo_de,LangInfo_fr,LangInfo_other,LangInfo_other_name,ComputerSkill_word,ComputerSkill_excel,ComputerSkill_powerpoint,ComputerSkill_other1,ComputerSkill_other2,ComputerSkill_other3,HealthQuestion1,HealthQuestion2,HealthQuestion3,HealthQuestion4,HealthQuestion5,HealthQuestion6,LegalObstacle,WorkingNow,JobChangeReason,JobHistoryName1,JobHistoryMission1,JobHistoryWorkDays1,JobHistoryReason4Leaving1,JobHistoryName2,JobHistoryMission2,JobHistoryWorkDays2,JobHistoryReason4Leaving2,JobHistoryName3,JobHistoryMission3,JobHistoryWorkDays3,JobHistoryReason4Leaving3,Ok4Overtime,Ok4ShiftWork")] Form form) { if (ModelState.IsValid) { db.Entry(form).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("_Index")); } return(PartialView(form)); }
public int UpdateProduct(Product product) { db.Entry(product).State = EntityState.Modified; return(db.SaveChanges()); }
public int UpdateCategory(Category category) { db.Entry(category).State = EntityState.Modified; return(db.SaveChanges()); }