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