Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            aniDataPic aniDataPic = db.aniDataPic.Find(id);

            db.aniDataPic.Remove(aniDataPic);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "animalPicID,animalID,animalName,animalKind,animalType,animalColor,animalGender,animalAddress,animalAge,animalPicAddress,animalOwner_userID")] aniDataPic aniDataPic)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aniDataPic).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aniDataPic));
 }
Beispiel #3
0
        // GET: aniDataPics/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            aniDataPic aniDataPic = db.aniDataPic.Find(id);

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