public ActionResult CreateCate() { OChuDe data = new OChuDe(); data.TrangThai = false; List <OChuDe> listCate = chuDeService.GetByParentId(); ViewBag.ListTacGia = new SelectList(tacGiaService.GetAll(), "MaTacGia", "Ten"); ViewBag.ListCate = new SelectList(listCate, "MaChuDe", "Ten"); return(View("UpdateCate", data)); }
public void SetViewBag(int? categoryId = null, int? tacGiaId = null, int? nxbId = null) { ViewBag.CategoryID = new SelectList(_bookCategoriesService.GetAll(), "ID", "Name", categoryId); ViewBag.TacGiaID = new SelectList(_tacGiaService.GetAll(), "ID", "Name",tacGiaId); ViewBag.NxbID = new SelectList(_nhaXuatBanService.GetAll(), "ID", "Name", nxbId); }
// GET: Area/QuanLyTacGia public ActionResult Search() { var list = tgService.GetAll(); return(View(list)); }