private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            AdminEditProductsForm udf = new AdminEditProductsForm();

            udf.textBoxID.Text       = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            udf.textBoxName.Text     = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            udf.textBoxPrice.Text    = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            udf.textBoxCategory.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();

            byte[] pic;
            pic = (byte[])dataGridView1.CurrentRow.Cells[4].Value;
            MemoryStream picture = new MemoryStream(pic);

            udf.pictureBox1.Image = Image.FromStream(picture);
            udf.ShowDialog();
        }
Beispiel #2
0
        private void editProductsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AdminEditProductsForm upd = new AdminEditProductsForm();

            upd.ShowDialog();
        }