private void load() { ConnectData connect = new ConnectData(); dgv_bangnoidung.DataSource = connect.TakeAllProducts(); }
private void Form1_Load(object sender, EventArgs e) { PictureBox a = new PictureBox(); Button btn = new Button() { Text = "a", Location = new Point(222, 213) }; this.Controls.Add(btn); //a.Image = new Bitmap(Application.StartupPath + "\\Resource\\1.jpg"); // Truyền Dữ Liệu lên DGV ConnectData connect = new ConnectData(); this.dgv_bangnoidung.DataSource = connect.TakeAllProducts(); }