public ActionResult DeleteConfirmed(int id)
        {
            tblPersonRecord tblPersonRecord = db.tblPersonRecords.Find(id);

            db.tblPersonRecords.Remove(tblPersonRecord);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "RecordID,FirstName,MiddleName,LastName,DateOfBirth,GenderID,ContactNumber")] tblPersonRecord tblPersonRecord)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblPersonRecord).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.GenderID = new SelectList(db.tblGenders, "GenderID", "Gender", tblPersonRecord.GenderID);
     return(View(tblPersonRecord));
 }
        // GET: tblPersonRecords/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tblPersonRecord tblPersonRecord = db.tblPersonRecords.Find(id);

            if (tblPersonRecord == null)
            {
                return(HttpNotFound());
            }
            return(View(tblPersonRecord));
        }
        // GET: tblPersonRecords/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tblPersonRecord tblPersonRecord = db.tblPersonRecords.Find(id);

            if (tblPersonRecord == null)
            {
                return(HttpNotFound());
            }
            ViewBag.GenderID = new SelectList(db.tblGenders, "GenderID", "Gender", tblPersonRecord.GenderID);
            return(View(tblPersonRecord));
        }