public ActionResult DeleteConfirmed(int id) { ProjectPaymentTerm projectPaymentTerm = db.ProjectPaymentTerms.Find(id); db.ProjectPaymentTerms.Remove(projectPaymentTerm); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ProjectPaymentTermId,Name")] ProjectPaymentTerm projectPaymentTerm) { if (ModelState.IsValid) { db.Entry(projectPaymentTerm).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(projectPaymentTerm)); }
public ActionResult Create([Bind(Include = "ProjectPaymentTermId,Name")] ProjectPaymentTerm projectPaymentTerm) { if (ModelState.IsValid) { db.ProjectPaymentTerms.Add(projectPaymentTerm); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(projectPaymentTerm)); }
// GET: ProjectPaymentTerms1/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProjectPaymentTerm projectPaymentTerm = db.ProjectPaymentTerms.Find(id); if (projectPaymentTerm == null) { return(HttpNotFound()); } return(View(projectPaymentTerm)); }