public ActionResult DeleteConfirmed(decimal id)
        {
            DOG_AWARD dOG_AWARD = db.DOG_AWARD.Find(id);

            db.DOG_AWARD.Remove(dOG_AWARD);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID_PRIMARY,DOG_ID,AWARD_ID,DATE_AWARD")] DOG_AWARD dOG_AWARD)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dOG_AWARD).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AWARD_ID = new SelectList(db.AWARD, "AWARD_ID", "AWARD_NAME", dOG_AWARD.AWARD_ID);
     ViewBag.DOG_ID   = new SelectList(db.DOG, "DOG_ID", "DOG_NAME", dOG_AWARD.DOG_ID);
     return(View(dOG_AWARD));
 }
        public ActionResult Create([Bind(Include = "DOG_ID,AWARD_ID,DATE_AWARD")] DOG_AWARD dOG_AWARD)
        {
            if (ModelState.IsValid)
            {
                db.DOG_AWARD.Add(dOG_AWARD);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.AWARD_ID = new SelectList(db.AWARD, "AWARD_ID", "AWARD_NAME", dOG_AWARD.AWARD_ID);
            ViewBag.DOG_ID   = new SelectList(db.DOG, "DOG_ID", "DOG_NAME", dOG_AWARD.DOG_ID);
            return(View(dOG_AWARD));
        }
        // GET: DogAwards/Details/5
        public ActionResult Details(decimal?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DOG_AWARD dOG_AWARD = db.DOG_AWARD.Find(id);

            if (dOG_AWARD == null)
            {
                return(HttpNotFound());
            }
            return(View(dOG_AWARD));
        }
        // GET: DogAwards/Edit/5
        public ActionResult Edit(decimal?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DOG_AWARD dOG_AWARD = db.DOG_AWARD.Find(id);

            if (dOG_AWARD == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AWARD_ID = new SelectList(db.AWARD, "AWARD_ID", "AWARD_NAME", dOG_AWARD.AWARD_ID);
            ViewBag.DOG_ID   = new SelectList(db.DOG, "DOG_ID", "DOG_NAME", dOG_AWARD.DOG_ID);
            return(View(dOG_AWARD));
        }