private void nhaphang_Load(object sender, EventArgs e) { load_grid(); // TODO: This line of code loads data into the 'toyshopDataset.sanpham' table. You can move, or remove it, as needed. sp.mahang = tbmahang.SelectedValue.ToString(); hinh = sp.getHinh(); if (hinh != null) { ms = new MemoryStream(hinh); pictureBox1.Image = Image.FromStream(ms); } }
void loadhinh(int loai) { if (loai == 0) { sp.mahang = tbmahang.SelectedValue.ToString(); } else { sp.mahang = edit_sp.SelectedValue.ToString(); } hinh = sp.getHinh(); if (hinh != null) { ms = new MemoryStream(hinh); pictureBox1.Image = Image.FromStream(ms); } }