public void editarProyecto() { foreach (DataGridViewRow row in dataListProyectos.Rows) { if (Convert.ToBoolean(row.Selected)) { FrmDetalleProyecto detalleProyecto = new FrmDetalleProyecto(); guardaDataList(detalleProyecto); detalleProyecto.visualizaDatos( Convert.ToString(this.dataListProyectos.CurrentRow.Cells["id"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["codigo_proyecto"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["titulo"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["observaciones"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["fecha"].Value) ); FrmParent.frmparent.lanzarNuevoElemento(detalleProyecto); StaticBarraHorizontal.horizontalParent.visualizaBotonesCambiarFormulario(false); StaticBarraHorizontal.horizontalParent.visualizaBotonGuardar(true); detalleProyecto.setModo("EDICIÓN"); detalleProyecto.habilitar(true); break; } } }
private void dataListProyectos_CellDoubleClick(object sender, EventArgs e) { try { FrmDetalleProyecto detalleProyecto = new FrmDetalleProyecto(); guardaDataList(detalleProyecto); detalleProyecto.visualizaDatos( Convert.ToString(this.dataListProyectos.CurrentRow.Cells["id"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["codigo_proyecto"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["titulo"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["observaciones"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["fecha"].Value) ); FrmParent.frmparent.lanzarNuevoElemento(detalleProyecto); StaticBarraHorizontal.horizontalParent.visualizaBotonesCambiarFormulario(true); StaticBarraHorizontal.horizontalParent.visualizaBotonGuardar(false); detalleProyecto.setModo("LECTURA"); } catch (Exception) { MessageBox.Show("Error en el evento Double click ", "Error en el evento Double click ", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/*Procedure*/ private void dataListProyectos_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { FrmDetalleProyecto detalleProyecto = new FrmDetalleProyecto(); //detalleProyecto.idproyecto = this.dataListProyectos.CurrentRow.Cells["id"].Value.ToString(); detalleProyecto.visualizaDatos(this.dataListProyectos.CurrentRow.Cells["id"].Value.ToString(), this.dataListProyectos.CurrentRow.Cells["titulo"].Value.ToString(), this.dataListProyectos.CurrentRow.Cells["codigo_proyecto"].Value.ToString(), this.dataListProyectos.CurrentRow.Cells["observaciones"].Value.ToString(), this.dataListProyectos.CurrentRow.Cells["fecha"].Value.ToString()); frmparent.lanzarNuevoProyecto(detalleProyecto); //select t.titulo,t.descripcion //DataGridViewRow row = dataListProyectos.Rows[e.RowIndex]; //InventarioReporteFormulario ee = new InventarioReporteFormulario(Convert.ToInt32(row.Cells[0].Value)); //ee.Show(); } catch (Exception ex) { MessageBox.Show("Error en el evento Double click ", "Error en el evento Double click ", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void dataListProyectos_CellDoubleClick(object sender, EventArgs e) { try { FrmDetalleProyecto detalleProyecto = new FrmDetalleProyecto(); DInformacionProyecto.dataListProyectos = dataListProyectos; DInformacionProyecto.index = this.dataListProyectos.CurrentRow.Index; DInformacionProyecto.detalleProyecto = detalleProyecto; detalleProyecto.visualizaDatos( Convert.ToString(this.dataListProyectos.CurrentRow.Cells["id"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["titulo"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["descripcion"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["observaciones"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["fecha"].Value) ); //Console.WriteLine(this.dataListProyectos.SelectedRows[2].Cells["id"].Value); frmparent.lanzarNuevoElemento(detalleProyecto); detalleProyecto.setModo("LECTURA"); } catch (Exception) { MessageBox.Show("Error en el evento Double click ", "Error en el evento Double click ", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/*Procedure*/ private void dataListProyectos_CellDoubleClick(object sender, EventArgs e) { try { FrmDetalleProyecto detalleProyecto = new FrmDetalleProyecto(); detalleProyecto.visualizaDatos( Convert.ToString(this.dataListProyectos.CurrentRow.Cells["id"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["titulo"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["descripcion"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["observaciones"].Value), Convert.ToString(this.dataListProyectos.CurrentRow.Cells["fecha"].Value) ); frmparent.lanzarNuevoProyecto(detalleProyecto); } catch (Exception) { MessageBox.Show("Error en el evento Double click ", "Error en el evento Double click ", MessageBoxButtons.OK, MessageBoxIcon.Error); } }