Exemplo n.º 1
0
        public void setViewBagForSanPham()
        {
            LoaiDAO       l  = new LoaiDAO();
            ThuongHieuDAO th = new ThuongHieuDAO();
            MauDAO        m  = new MauDAO();
            KichCoDAO     kc = new KichCoDAO();
            DanhMucDAO    dm = new DanhMucDAO();

            ViewBag.listImage = ImageHelper.loadListImage();           //lay danh sach hinh anh

            ViewBag.MaLoai = l.getDanhSach();                          //lay tat cac cac loai ---giai quyet

            ViewBag.MaThuongHieu = th.getTatCaThuongHieu();            //lay thuong hieu

            ViewBag.DanhSachSanPham = spDAO.layDanhSachTatCaSanPham(); //lay tat ca sp

            ViewBag.Mau = m.getDanhSach();                             //lat tat ca mau

            ViewBag.KichCo = kc.getDanhSach();                         //lat tat ca mau

            ViewBag.DanhMuc = dm.getDanhMuc();                         // lấy tất cả danh mục
        }