Beispiel #1
0
        private void modificarToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Modificar_Producto objModfi = new Modificar_Producto();

            objModfi.MdiParent = this;
            objModfi.Show();
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            int indice;

            indice = dataGridView1.CurrentRow.Index;
            Modificar_Producto obMod = new Modificar_Producto();

            obMod.textBox1.Text       = Convert.ToString(dataGridView1.Rows[indice].Cells[1].Value);
            obMod.precio_compra.Value = Convert.ToInt32(dataGridView1.Rows[indice].Cells[3].Value);
            obMod.precio_venta.Value  = Convert.ToInt32(dataGridView1.Rows[indice].Cells[4].Value);
            obMod.txt_proveedor.Text  = Convert.ToString(dataGridView1.Rows[indice].Cells[2].Value);
            obMod.txt_categoria.Text  = Convert.ToString(dataGridView1.Rows[indice].Cells[5].Value);
            val = Convert.ToInt32(dataGridView1.Rows[indice].Cells[0].Value);

            obMod.id = val;
            this.Close();
            obMod.Show();
        }