Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(string id)
        {
            ATU aTU = db.ATU.Find(id);

            db.ATU.Remove(aTU);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ATUname")] ATU aTU)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aTU).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aTU));
 }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "ATUname")] ATU aTU)
        {
            if (ModelState.IsValid)
            {
                db.ATU.Add(aTU);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(aTU));
        }
Ejemplo n.º 4
0
        // GET: ATUs/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ATU aTU = db.ATU.Find(id);

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