private void dgv_Precio_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 5) { Precio obj = new Precio(); obj.Id_Precio = Convert.ToInt32(dgv_Precio.Rows[e.RowIndex].Cells[0].Value.ToString()); obj.Id_Avion = Convert.ToInt32(dgv_Precio.Rows[e.RowIndex].Cells[1].Value.ToString()); obj.Id_Ruta = Convert.ToInt32(dgv_Precio.Rows[e.RowIndex].Cells[2].Value.ToString()); obj.Id_Seccion = Convert.ToInt32(dgv_Precio.Rows[e.RowIndex].Cells[3].Value.ToString()); obj.Precio1 = Convert.ToDecimal(dgv_Precio.Rows[e.RowIndex].Cells[4].Value.ToString()); frmPrecioEdit ofrm = new frmPrecioEdit(obj, this); ofrm.Show(); } }
private void btnNuevoPrecio_Click(object sender, EventArgs e) { frmPrecioEdit ofrm = new frmPrecioEdit(this); ofrm.ShowDialog(); }