Exemplo n.º 1
0
        public void editarTiempo()
        {
            foreach (DataGridViewRow row in dataListTiempos.Rows)
            {
                if (Convert.ToBoolean(row.Selected))
                {
                    FrmDetalleTiempos detalleTiempos = new FrmDetalleTiempos();

                    DInformacionTiempo.dataLisTiempos = dataListTiempos;
                    DInformacionTiempo.index          = this.dataListTiempos.CurrentRow.Index;
                    DInformacionTiempo.detalleTiempos = detalleTiempos;

                    FrmParent.frmparent.lanzarNuevoElemento(detalleTiempos);
                    detalleTiempos.setModo("LECTURA");

                    detalleTiempos.visualizaDatos(
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["fecha"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["fechaInicio"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["fechaFin"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["tiempo"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["Observaciones"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["accion"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["id"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["id_tarea"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["codigo_tarea"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["imputable"].Value),
                        Convert.ToString(this.dataListTiempos.CurrentRow.Cells["imputado"].Value)
                        );
                    detalleTiempos.botonEditar();
                    StaticBarraHorizontal.horizontalParent.visualizaBotonesCambiarFormulario(false);
                    StaticBarraHorizontal.horizontalParent.visualizaBotonGuardar(true);
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private void dataListTiempos_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                FrmDetalleTiempos detalleTiempos = new FrmDetalleTiempos();

                guardaDataList(detalleTiempos);

                FrmParent.frmparent.lanzarNuevoElemento(detalleTiempos);
                detalleTiempos.setModo("LECTURA");

                detalleTiempos.visualizaDatos(
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["fecha"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["fechaInicio"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["fechaFin"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["tiempo"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["Observaciones"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["accion"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["id"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["id_tarea"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["codigo_tarea"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["imputable"].Value),
                    Convert.ToString(this.dataListTiempos.CurrentRow.Cells["imputado"].Value)
                    );
                StaticBarraHorizontal.horizontalParent.visualizaBotonesCambiarFormulario(true);
                StaticBarraHorizontal.horizontalParent.visualizaBotonGuardar(false);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error en el evento Double click ", "Error en el evento Double click ", MessageBoxButtons.OK, MessageBoxIcon.Error);
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }