Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            BiodataAnak biodataanak = db.BiodataAnakk.Find(id);

            db.BiodataAnakk.Remove(biodataanak);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit(BiodataAnak biodataanak)
 {
     if (ModelState.IsValid)
     {
         db.Entry(biodataanak).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(biodataanak));
 }
Exemple #3
0
        //
        // GET: /BiodataAnak/Edit/5

        public ActionResult Edit(int id = 0)
        {
            BiodataAnak biodataanak = db.BiodataAnakk.Find(id);

            if (biodataanak == null)
            {
                return(HttpNotFound());
            }
            return(View(biodataanak));
        }
Exemple #4
0
        public ActionResult Create(BiodataAnak biodataanak)
        {
            if (ModelState.IsValid)
            {
                db.BiodataAnakk.Add(biodataanak);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(biodataanak));
        }
Exemple #5
0
        //
        // 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()));
        }