Example #1
0
        private void HangHoaItem_click(object sender, EventArgs e)
        {
            uFrmHangHoa frm            = sender as uFrmHangHoa;
            HangHoaRead clickedHangHoa = frm.Tag as HangHoaRead;

            AddHangHoaDuocChon(clickedHangHoa);
        }
Example #2
0
 void RenderDanhSachHangHoa(List <HangHoaRead> dsHangHoa)
 {
     flpDanhSachHangHoa.Controls.Clear();
     foreach (HangHoaRead hangHoa in dsHangHoa)
     {
         uFrmHangHoa box = new uFrmHangHoa(hangHoa.TenHang, hangHoa.GiaBanStr, hangHoa.HinhAnh);
         box.Tag    = hangHoa;
         box.Click += HangHoaItem_click;
         flpDanhSachHangHoa.Controls.Add(box);
     }
 }