private void button3_Click(object sender, EventArgs e)
        {
            FRM_ADD_PRODUCT frm = new FRM_ADD_PRODUCT();

            frm.txtRef.Text        = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            frm.txtDes.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.btnOk.Text      = "تحديث";
            frm.state           = "update";
            frm.txtRef.ReadOnly = true;
            byte[]       image = (byte[])prd.GET_IMAGE_PRODUCT(this.dataGridView1.CurrentRow.Cells[0].Value.ToString()).Rows[0][0];
            MemoryStream ms    = new MemoryStream(image);

            frm.pbox.Image = Image.FromStream(ms);
            frm.ShowDialog();
        }
Esempio n. 2
0
 private void إضافةمنتججديدToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FRM_ADD_PRODUCT frm = new FRM_ADD_PRODUCT();
     frm.ShowDialog();
 }
 private void button3_Click(object sender, EventArgs e)
 {
     FRM_ADD_PRODUCT frm = new FRM_ADD_PRODUCT();
     frm.txtRef.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
     frm.txtDes.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[0].Value.ToString();
     frm.btnOk.Text = "تحديث";
     frm.state = "update";
     frm.txtRef.ReadOnly = true;
     byte[] Img = (byte[])prd.GET_IMAGE_PRODUCT(this.dataGridView1.CurrentRow.Cells[0].Value.ToString()).Rows[0][0];
     MemoryStream ms = new MemoryStream(Img);
     frm.pbox.Image = Image.FromStream(ms);
     frm.ShowDialog();
     this.dataGridView1.DataSource = prd.GET_ALL_PRODUCTS();
 }
 private void button1_Click(object sender, EventArgs e)
 {
     FRM_ADD_PRODUCT frm = new FRM_ADD_PRODUCT();
     frm.ShowDialog();
     this.dataGridView1.DataSource = prd.GET_ALL_PRODUCTS();
 }
        private void إضافةمنتوججديدToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FRM_ADD_PRODUCT frm = new FRM_ADD_PRODUCT();

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

            frm.ShowDialog();
        }