public ActionResult ModifyWord(int wordId) { Word word = WordDAL.FindWordById(wordId); WordViewModel model = new WordViewModel(); model.DictionaryId = word.DictionaryId; model.WordId = word.Id; model.Word = word.Word1; model.Definition = word.Definition; model.Example = word.Example; return View(model); }
public ActionResult ModifyWord(WordViewModel model) { WordDAL.ModifyWord(model.WordId, model.Word, model.Definition, model.Example); return RedirectToAction("ViewWords", "Home", new { dictionaryId = model.DictionaryId }); }
public ActionResult AddWord(int dictionaryId) { WordViewModel model = new WordViewModel(); model.DictionaryId = dictionaryId; return View(model); }