예제 #1
0
        /// <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));
        }
예제 #2
0
        //
        // GET: /Talks/
        public ActionResult Index()
        {
            this.ViewData["talks"] = (from t in TalksRepository.GetTalks()
                                      orderby t.Id descending
                                      select t).ToArray();

            return(this.View());
        }
예제 #3
0
        public ActionResult GetTalks()
        {
            var talks = TalksRepository.GetTalks();

            return(Json(talks));
        }