public ActionResult DeleteConfirmed(int id) { projecttbl projecttbl = db.projecttbls.Find(id); db.projecttbls.Remove(projecttbl); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "pro_id,pro_name,pro_status")] projecttbl projecttbl) { if (ModelState.IsValid) { db.Entry(projecttbl).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(projecttbl)); }
public ActionResult Create([Bind(Include = "pro_id,pro_name,pro_status")] projecttbl projecttbl) { if (ModelState.IsValid) { db.projecttbls.Add(projecttbl); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(projecttbl)); }
// GET: Addproject/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } projecttbl projecttbl = db.projecttbls.Find(id); if (projecttbl == null) { return(HttpNotFound()); } return(View(projecttbl)); }