public ActionResult DeleteConfirmed(int id) { GoaRehabTbl goaRehabTbl = db.GoaRehabTbls.Find(id); db.GoaRehabTbls.Remove(goaRehabTbl); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Title,Desc,Addr,Location,Emails, Ph_No")] GoaRehabTbl goaRehabTbl) { var existingRec = db.GoaRehabTbls.Find(1); existingRec.Addr = goaRehabTbl.Addr; existingRec.Desc = goaRehabTbl.Desc; existingRec.Emails = goaRehabTbl.Emails; existingRec.Ph_No = goaRehabTbl.Ph_No; existingRec.Title = goaRehabTbl.Title; db.Entry(existingRec).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("InnerCircle", "Home")); }
// GET: GoaRehabTbls/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GoaRehabTbl goaRehabTbl = db.GoaRehabTbls.Find(id); if (goaRehabTbl == null) { return(HttpNotFound()); } return(View(goaRehabTbl)); }
public ActionResult EditVision(int?id) { id = 1; GoaRehabTbl goaRehabTbl = db.GoaRehabTbls.Find(id); if (goaRehabTbl == null) { return(HttpNotFound()); } GoaRehabImg ViewInfo = new GoaRehabImg { Id = goaRehabTbl.Id, Mission = goaRehabTbl.Mission, Vision = goaRehabTbl.Vision }; return(View(ViewInfo)); }
public ActionResult EditStatutes(int?id) { id = 1; GoaRehabTbl goaRehabTbl = db.GoaRehabTbls.Find(id); if (goaRehabTbl.Statutes == null) { ViewBag.ExistingDoc = "No Existing File"; } else { ViewBag.ExistingDoc = goaRehabTbl.Statutes; } if (goaRehabTbl == null) { return(HttpNotFound()); } GoaRehabImg ViewInfo = new GoaRehabImg { Id = goaRehabTbl.Id }; return(View(ViewInfo)); }