public ActionResult DeleteConfirmed(int id)
        {
            ParentInformation parentInformation = db.ParentInformation.Find(id);

            db.ParentInformation.Remove(parentInformation);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ParentInformationId,MotherId,FatherId,PrimaryContactNumber")] ParentInformation parentInformation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(parentInformation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(parentInformation));
 }
        public ActionResult Create([Bind(Include = "ParentInformationId,MotherId,FatherId,PrimaryContactNumber")] ParentInformation parentInformation)
        {
            if (ModelState.IsValid)
            {
                db.ParentInformation.Add(parentInformation);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(parentInformation));
        }
        // GET: ParentInformations/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ParentInformation parentInformation = db.ParentInformation.Find(id);

            if (parentInformation == null)
            {
                return(HttpNotFound());
            }
            return(View(parentInformation));
        }