/// <summary> /// Get the Multiselect list for the tasks ListBox /// </summary> /// <param name="selectedValues"></param> /// <returns></returns> private static MultiSelectList GetTalksList(int[] selectedTasks) { var talksRepository = new TalksRepository(); var talks = TalksRepository.GetTalks(); return(new MultiSelectList(talks, "Id", "Title", selectedTasks)); }
// // GET: /Talks/ public ActionResult Index() { this.ViewData["talks"] = (from t in TalksRepository.GetTalks() orderby t.Id descending select t).ToArray(); return(this.View()); }
public ActionResult GetTalks() { var talks = TalksRepository.GetTalks(); return(Json(talks)); }