private void button3_Click(object sender, EventArgs e) { try { GUI.Bodega.AviosControl aviosgui = new AviosControl(); aviosgui.textBox1.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["nombre"].Value); //aviosgui.comboBox1.SelectedIndex = Convert.ToInt32(dataGridView1.CurrentRow.Cells["tipo"].Value); //if (label1.Text != "Catalogo avios") // { // aviosgui.textBox2.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["precio"].Value); // aviosgui.textBox3.Text = "0"; // aviosgui.textBox3.Enabled = false; // } // else // { aviosgui.textBox2.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["precio"].Value); aviosgui.textBox3.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["cantidad"].Value); aviosgui.label6.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["idaviosbodega"].Value); aviosgui.textBox3.Enabled = true; // } aviosgui.label4.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["id_avios"].Value); aviosgui.ShowDialog(); actualizatabla(); } catch { MessageBox.Show("Seleccione un avio"); } }
private void button4_Click(object sender, EventArgs e) { GUI.Bodega.AviosControl aviosgui = new AviosControl(); if (label1.Text == "Catalogo avios") { aviosgui.textBox3.Enabled = false; aviosgui.textBox3.Text = "0"; } aviosgui.ShowDialog(); actualizatabla(); }