コード例 #1
0
        public ActionResult AddHeading()
        {
            List <SelectListItem> listCategoryName = (from h in cm.GetCategoryList()
                                                      select new SelectListItem
            {
                Text = h.CategoryName,
                Value = h.CategoryId.ToString()
            }).ToList();
            List <SelectListItem> listWriterName = (from w in wm.GetListBl()
                                                    select new SelectListItem
            {
                Text = w.WriterName,
                Value = w.WriterId.ToString()
            }).ToList();

            ViewBag.vlc    = listCategoryName;
            ViewBag.writer = listWriterName;
            return(View());
        }
コード例 #2
0
 public ActionResult Index()
 {
     return(View(wm.GetListBl()));
 }