Ejemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            FRM_Preview frm = new FRM_Preview();

            byte[]       image = (byte[])prd.Get_Imag(this.dataGridView1.CurrentRow.Cells[0].Value.ToString()).Rows[0][0];
            MemoryStream ms    = new MemoryStream(image);

            frm.pictureBox1.Image = Image.FromStream(ms);
            frm.ShowDialog();
        }
        private void btnPreview_Click(object sender, EventArgs e)
        {
            FRM_Preview frmV = new FRM_Preview();

            id = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            byte[]       pic = (byte[])prd.get_imgProduct(id).Rows[0][0];
            MemoryStream ms  = new MemoryStream(pic);

            frmV.pbox1.Image = Image.FromStream(ms);

            frmV.ShowDialog();
        }