public async Task <IActionResult> Edit(int id, [Bind("AdoptId,ChildFullName,AdoptFullName,CitizenshipofAdopter,Ageofchild,AdopterphoneNumber,ReasonforAdoption,Sexofchild,IssueDate,Cid")] Adoptiontbl adoptiontbl) { if (id != adoptiontbl.AdoptId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(adoptiontbl); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AdoptiontblExists(adoptiontbl.AdoptId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Cid"] = new SelectList(_context.Custometbl, "Cid", "Fname", adoptiontbl.Cid); return(View(adoptiontbl)); }
public async Task <IActionResult> Edit(int id, [Bind("Cid,Fname,Lname,Country")] Custometbl custometbl) { if (id != custometbl.Cid) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(custometbl); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustometblExists(custometbl.Cid)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(custometbl)); }
public async Task <IActionResult> Edit(int id, [Bind("Mnum,DateofMarriage,HusbandFullname,Wifefullname,Wittness1,Wittness2,WifeAge,HusbandAge,Region,Zone,IssueDate,Cid")] Marriagetbl marriagetbl) { if (id != marriagetbl.Mnum) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(marriagetbl); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MarriagetblExists(marriagetbl.Mnum)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Cid"] = new SelectList(_context.Custometbl, "Cid", "Fname", marriagetbl.Cid); return(View(marriagetbl)); }
public async Task <IActionResult> Edit(int id, [Bind("Did,DateofDivorce,DcirtificateNumber,HusbandFullName,WifeFullName,WifeAge,RequesterofDinvorce,IssueDate,Cid")] Divorcetbl divorcetbl) { if (id != divorcetbl.Did) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(divorcetbl); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DivorcetblExists(divorcetbl.Did)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Cid"] = new SelectList(_context.Custometbl, "Cid", "Fname", divorcetbl.Cid); return(View(divorcetbl)); }
public async Task <IActionResult> Edit(int id, [Bind("DrefNum,DateofDeath,CaseofDeath,Region,Zone,Woreda,Wittness,Reltionofwittness,Age,Sex,IssueDate,Cid")] Deathtbl deathtbl) { if (id != deathtbl.DrefNum) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(deathtbl); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DeathtblExists(deathtbl.DrefNum)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Cid"] = new SelectList(_context.Custometbl, "Cid", "Fname", deathtbl.Cid); return(View(deathtbl)); }
public async Task <IActionResult> Edit(int id, [Bind("Cnum,Dob,Mfullname,Region,Woreda,Sex,DateofIssue,Cid")] Birthtbl birthtbl) { if (id != birthtbl.Cnum) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(birthtbl); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BirthtblExists(birthtbl.Cnum)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Cid"] = new SelectList(_context.Custometbl, "Cid", "Fname", birthtbl.Cid); return(View(birthtbl)); }