public async Task <IActionResult> Edit(int id, [Bind("DepartmentID,account,power,type")] 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("Index")); } return(View(department)); }
public async Task <IActionResult> Edit(int id, [Bind("PersonID,DepartmentId,PersonManage,PersonName,Power")] Person person) { if (id != person.PersonID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(person); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PersonExists(person.PersonID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(person)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,DataID,Goodsname,TotalSaleMoney,butprice,buynumber,salenumber,saleprice")] DataDetail dataDetail) { if (id != dataDetail.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(dataDetail); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DataDetailExists(dataDetail.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(dataDetail)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,BookID,bookName,location,nameID,namenumber")] Book book) { if (id != book.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(book); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BookExists(book.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(book)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,goodsName,interBookID,number,saleID,salemanName")] InterGoodsDetail interGoodsDetail) { if (id != interGoodsDetail.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(interGoodsDetail); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InterGoodsDetailExists(interGoodsDetail.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(interGoodsDetail)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,EnrollmentDate,Goods,number")] Name name) { if (id != name.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(name); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NameExists(name.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(name)); }