Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            F_AddProduct f_ = new F_AddProduct();

            f_.txtID.Text     = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            f_.txtDes.Text    = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            f_.txtQun.Text    = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            f_.txtPrice.Text  = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            f_.comboBox1.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
            f_.Text           = "Update Prodect" + dataGridView1.CurrentRow.Cells[1].Value.ToString();
            f_.state          = "update";
            byte[]       image = (byte[])prd.getimage(dataGridView1.CurrentRow.Cells[0].Value.ToString()).Rows[0][0];
            MemoryStream ms    = new MemoryStream(image);

            f_.pictureBox1.Image = Image.FromStream(ms);
            f_.ShowDialog();
        }
Beispiel #2
0
        private void addProductToolStripMenuItem_Click(object sender, EventArgs e)
        {
            F_AddProduct f_Add = new F_AddProduct();

            f_Add.ShowDialog();
        }
Beispiel #3
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            F_AddProduct f_ = new F_AddProduct();

            f_.ShowDialog();
        }