Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public ActionResult ModifyWord(WordViewModel model)
 {
     WordDAL.ModifyWord(model.WordId, model.Word, model.Definition, model.Example);
     return RedirectToAction("ViewWords", "Home", new { dictionaryId = model.DictionaryId });
 }
Esempio n. 3
0
 public ActionResult AddWord(int dictionaryId)
 {
     WordViewModel model = new WordViewModel();
     model.DictionaryId = dictionaryId;
     return View(model);
 }