public ActionResult DeleteConfirmed(int id) { Ngform ngform = db.Ngforms.Find(id); db.Ngforms.Remove(ngform); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,নাম,পিতা,মাতা,গ্রাম,ডাকঘর,ওয়ার্ড")] Ngform ngform) { if (ModelState.IsValid) { db.Entry(ngform).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ngform)); }
public ActionResult Create([Bind(Include = "Id,নাম,পিতা,মাতা,গ্রাম,ডাকঘর,ওয়ার্ড")] Ngform ngform) { if (ModelState.IsValid) { db.Ngforms.Add(ngform); db.SaveChanges(); return(RedirectToAction("Details", new { id = ngform.Id })); } return(View(ngform)); }
// GET: /Ngform/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Ngform ngform = db.Ngforms.Find(id); if (ngform == null) { return(HttpNotFound()); } return(View(ngform)); }