Exemplo n.º 1
0
 public Form_NhanXet(Form_Main parent, string masp, ucSanPhamDaGiao ucparent)
 {
     InitializeComponent();
     this.parent        = parent;
     this.ucparent      = ucparent;
     this.masp          = masp;
     rateMain.Value     = Data_NhanXet.Instance.Rate(masp);
     lblDanhGia.Text    = "( " + Data_NhanXet.Instance.countRate(masp).ToString() + " đánh giá )";
     lblTenSanPham.Text = Data_NhanXet.Instance.Name(masp);
     picSanPham.Image   = Picture.LoadImage_by_ID(Data_NhanXet.Instance.IDAnh(masp));
 }
Exemplo n.º 2
0
        public void LoadSanPhamDaGiao()
        {
            List <ItemInGioHang> listSP_byBtn = Data_gioHang.Instance.loadSanPhamDangGiao("da giao hang");

            this.fpnlDaMua.Controls.Clear();
            foreach (ItemInGioHang sp in listSP_byBtn)
            {
                ucSanPhamDaGiao ucSanPham = new ucSanPhamDaGiao(this.parent, this);
                ucSanPham.SetData(sp.MASP, sp.TenSP, sp.Gia, sp.Link_image);

                this.fpnlDaMua.Controls.Add(ucSanPham);
            }
        }