public ActionResult DeleteConfirmed(int id) { BiodataAnak biodataanak = db.BiodataAnakk.Find(id); db.BiodataAnakk.Remove(biodataanak); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(BiodataAnak biodataanak) { if (ModelState.IsValid) { db.Entry(biodataanak).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(biodataanak)); }
// // GET: /BiodataAnak/Edit/5 public ActionResult Edit(int id = 0) { BiodataAnak biodataanak = db.BiodataAnakk.Find(id); if (biodataanak == null) { return(HttpNotFound()); } return(View(biodataanak)); }
public ActionResult Create(BiodataAnak biodataanak) { if (ModelState.IsValid) { db.BiodataAnakk.Add(biodataanak); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(biodataanak)); }
// // GET: /BiodataAnak/ public ActionResult Index(String SearchName, String SearchOrangTua) { var biodataanakk = db.BiodataAnakk.Include(e => e.BiodataOrangTuaa); var biodataanak = new BiodataAnak(); if (!String.IsNullOrEmpty(SearchName)) { biodataanakk = biodataanakk.Where(n => n.Nama.Contains(SearchName)); } return(View(db.BiodataAnakk.ToList())); }