private void btnEdit_Click(object sender, EventArgs e)
        {
            FRM_Add_Product frm = new FRM_Add_Product();

            frm.txtRef.Text        = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            frm.txtDesc.Text       = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            frm.txtQte.Text        = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
            frm.txtPrice.Text      = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
            frm.cmbCategories.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
            frm.Text            = "تحديث بيانات المنتج :  " + this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            frm.btnAdd.Text     = "تحديث";
            frm.state           = "Update";
            frm.txtRef.ReadOnly = true;

            //pring product_image

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

            frm.pbox.Image = Image.FromStream(ms);

            frm.ShowDialog();
        }
Exemple #2
0
        private void ToolStripMenuItem_AddProduct_Click(object sender, EventArgs e)
        {
            FRM_Add_Product frm3 = new FRM_Add_Product();

            frm3.ShowDialog();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            FRM_Add_Product frm = new FRM_Add_Product();

            frm.ShowDialog();
        }