Пример #1
0
        public static List <KichCoDTO> getListKichCoByIdSanPhamAndIdMauSac(int sp, int ms)
        {
            List <KichCoDTO> list = new List <KichCoDTO>();

            list = KichCoConverter.ConvertToDTOes(KichCoDAO.getKichCoByIdSanPhamAndIdMauSac(sp, ms));
            return(list);
        }
Пример #2
0
        public JsonResult layChiTietSanPham(int id)
        {
            var sanPham = new SanPhamDAO().laySanPhamTheoID(id);

            var mau = new MauDAO().getDanhSachTheoSanPham(id);

            var kichCo = new KichCoDAO().getDanhSachTheoSanPham(id);

            return(Json(new
            {
                SanPham = sanPham,
                Mau = mau,
                KichCo = kichCo
            }, JsonRequestBehavior.AllowGet));
        }
Пример #3
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
        }