// // GET: /Verse/Edit/5 public ActionResult Edit(Guid id) { Verse verse = VerseManager.Get(id); ViewBag.ChapterId = new SelectList(ChapterManager.GetAll(), "Id", "Title", verse.ChapterId); return(View(verse)); }
public ActionResult ReadReference(Guid id) { var verse = VerseManager.EagerLoadVerse(id); ViewBag.VerseNumber = verse.VerseNumber; return(PartialView(verse.Chapter.Book)); }
public ActionResult Edit(Verse verse) { if (ModelState.IsValid) { VerseManager.Edit(verse); return(RedirectToAction("Index")); } return(View()); }
public ActionResult AddReference(Guid targetVerseId, Guid sourceBookId, int sourceChapterNum, int sourceVerseNum, int startOffset, int endOffset) { var sourceVerse = VerseManager.GetByBookIdChapterVerse(sourceBookId, sourceChapterNum, sourceVerseNum); if (startOffset < endOffset) { ReferenceManager.Create(targetVerseId, sourceVerse.Id, startOffset, endOffset); } else { ReferenceManager.Create(targetVerseId, sourceVerse.Id, endOffset, startOffset); } return(View()); }
public ActionResult DeleteConfirmed(Guid id) { VerseManager.Delete(id); return(RedirectToAction("Index")); }
// // GET: /Verse/Delete/5 public ActionResult Delete(Guid id) { return(View(VerseManager.Get(id))); }
// // GET: /Verse/Details/5 public ViewResult Details(Guid id) { return(View(VerseManager.Get(id))); }
// // GET: /Verse/ public ViewResult Index() { return(View(VerseManager.GetAll())); }
public List <Verse> GetVerseList(Guid chapterId) { return(VerseManager.GetAllByChapter(chapterId)); }
public JsonResult GetVerses(Guid chapterId) { return(Json(VerseManager.GetAllByChapter(chapterId))); }