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

            db.WordSounds.Remove(wordSound);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,IsReadOnly,IsBlocked,WordId,SoundUrl")] WordSound wordSound)
 {
     if (ModelState.IsValid)
     {
         db.Entry(wordSound).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.WordId = new SelectList(db.Words, "Id", "Text", wordSound.WordId);
     return(View(wordSound));
 }
Beispiel #3
0
        // GET: WordSounds/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WordSound wordSound = db.WordSounds.Find(id);

            if (wordSound == null)
            {
                return(HttpNotFound());
            }
            return(View(wordSound));
        }
Beispiel #4
0
        // GET: WordSounds/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WordSound wordSound = db.WordSounds.Find(id);

            if (wordSound == null)
            {
                return(HttpNotFound());
            }
            ViewBag.WordId = new SelectList(db.Words, "Id", "Text", wordSound.WordId);
            return(View(wordSound));
        }