예제 #1
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);
        }
예제 #2
0
        public ActionResult Create(bool isSach)
        {
            OSanPham data = new OSanPham();

            data.TrangThai = false;

            data.SanPhamHot = false;
            data.IsSach     = isSach;
            List <OChuDe> listCate = chuDeService.GetAll();

            ViewBag.ListCate = new SelectList(listCate, "MaChuDe", "Ten");
            List <ONhaXuatBan> listNXB = nxbService.GetAll();

            ViewBag.ListNXB    = new SelectList(listNXB, "MaNXB", "TenNXB");
            ViewBag.ListTacGia = new SelectList(tacGiaService.GetAll(), "MaTacGia", "Ten");
            ViewBag.ListNCC    = new SelectList(nccService.GetAllActive(), "MaNCC", "TenNCC");



            return(View("Update", data));
        }
예제 #3
0
        // GET: Area/QuanLyNXB
        public ActionResult Search()
        {
            var list = nxbService.GetAll();

            return(View(list));
        }