예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ADOPTION aDOPTION = db.ADOPTIONs.Find(id);

            db.ADOPTIONs.Remove(aDOPTION);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "ID,FULL_NAME,EMAIL,DESCRIPTION,DOG_ID,REGISTER,ESTATUS")] ADOPTION aDOPTION)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aDOPTION).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DOG_ID = new SelectList(db.DOGs, "ID", "NAME", aDOPTION.DOG_ID);
     return(View(aDOPTION));
 }
예제 #3
0
        // GET: Adoption/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ADOPTION aDOPTION = db.ADOPTIONs.Find(id);

            if (aDOPTION == null)
            {
                return(HttpNotFound());
            }
            return(View(aDOPTION));
        }
예제 #4
0
        // GET: Adoption/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ADOPTION aDOPTION = db.ADOPTIONs.Find(id);

            if (aDOPTION == null)
            {
                return(HttpNotFound());
            }
            ViewBag.DOG_ID = new SelectList(db.DOGs, "ID", "NAME", aDOPTION.DOG_ID);
            return(View(aDOPTION));
        }