public frm_UbicacionEdit(Vista_Ubicaciones obj, frm_Ubicacion frm) { InitializeComponent(); preparaEdicion(); esnuevo = false; this.obj = obj; DatosInterface(); frmPadre = frm; }
private void dgv_Ubicacion_CellContentClick(object sender, DataGridViewCellEventArgs e) { try { if (e.ColumnIndex == 3) { Vista_Ubicaciones obj = new Vista_Ubicaciones(); obj.Id_Ubicacion = Convert.ToInt32(dgv_Ubicacion.Rows[e.RowIndex].Cells[0].Value.ToString()); obj.nombre_ubicacion = dgv_Ubicacion.Rows[e.RowIndex].Cells[1].Value.ToString(); obj.NombreModelo = dgv_Ubicacion.Rows[e.RowIndex].Cells[2].Value.ToString(); frm_UbicacionEdit ofrm = new frm_UbicacionEdit(obj, this); ofrm.Show(); } } catch (Exception) { } }