Exemple #1
0
        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"));
        }
Exemple #2
0
 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));
 }
Exemple #3
0
        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));
        }
Exemple #4
0
        // 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));
        }