Exemple #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            frm_addproduct frm = new frm_addproduct();

            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.txtpric.Text       = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
            frm.cmbcategories.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
            frm.txtref.ReadOnly    = true;
            frm.state        = "ubdate";
            frm.Text         = "تحديث المنتج" + this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            frm.btnsave.Text = "تحديث";
            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();
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            frm_addproduct frm = new frm_addproduct();

            frm.ShowDialog();
        }
        private void ادارةالمنتجاتToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_addproduct frm = new frm_addproduct();

            frm.Show();
        }