Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        // GET: Area/QuanLyTacGia
        public ActionResult Search()
        {
            var list = tgService.GetAll();

            return(View(list));
        }