public async Task <IActionResult> Edit(int id, [Bind("ID,collabor,pDate,customer,phone,email,note,condition,s1,d1,f1,day1,r1,dl1,c1,s2,d2,f2,day2,r2,dl2,c2,s3,d3,f3,day3,r3,dl3,c3")] Contracts contracts) { if (id != contracts.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(contracts); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ContractsExists(contracts.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(contracts)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,name,phone,email,note,condition,cNumber,pNumber,ch,price,policy,charges,totals")] Customers customers) { if (id != customers.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(customers); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustomersExists(customers.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(customers)); }
public async Task <IActionResult> Collabor_Edit(int id, [Bind("policy,ID,email, fullName, password, office, joinDate, gender, birthday,cmnd,place, day, office_name,field, position, house, town, nation, city, district,zip, phone")] Collaborators collaborator) { if (id != collaborator.ID) { return(NotFound()); } if (ModelState.IsValid) { _context.Update(collaborator); await _context.SaveChangesAsync(); return(RedirectToAction("Collaborators")); } return(View(collaborator)); }