Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            OS_ApproximateAge oS_ApproximateAge = db.OS_ApproximateAge.Find(id);

            db.OS_ApproximateAge.Remove(oS_ApproximateAge);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "approximateAgeID,approximateAge")] OS_ApproximateAge oS_ApproximateAge)
 {
     if (ModelState.IsValid)
     {
         db.Entry(oS_ApproximateAge).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(oS_ApproximateAge));
 }
Exemple #3
0
        public ActionResult Create([Bind(Include = "approximateAgeID,approximateAge")] OS_ApproximateAge oS_ApproximateAge)
        {
            if (ModelState.IsValid)
            {
                db.OS_ApproximateAge.Add(oS_ApproximateAge);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(oS_ApproximateAge));
        }
Exemple #4
0
        // GET: OS_ApproximateAge/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OS_ApproximateAge oS_ApproximateAge = db.OS_ApproximateAge.Find(id);

            if (oS_ApproximateAge == null)
            {
                return(HttpNotFound());
            }
            return(View(oS_ApproximateAge));
        }