예제 #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            ATU aTU = db.ATU.Find(id);

            db.ATU.Remove(aTU);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #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));
 }
예제 #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));
        }
예제 #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));
        }