private void selDato() { if (consulta == 34) { if (dtDatos.Rows.Count > 0) { if (Bom.ExisteHilos(dtDatos.CurrentRow.Cells[2].Value.ToString())) { TareaHilo frm = new TareaHilo(dtDatos.CurrentRow.Cells[2].Value.ToString()); frm.ShowDialog(); } else { dato1 = dtDatos.CurrentRow.Cells[2].Value.ToString(); Bom.RealizarTarea(dato1); } } else { dato = ""; dato1 = ""; } } if (consulta == 31) { if (dtDatos.Rows.Count > 0) { dato = dtDatos.CurrentRow.Cells[1].Value.ToString(); } else { dato = ""; dato1 = ""; } } else if (consulta == 18) { if (dtDatos.Rows.Count > 0) { dato = dtDatos.CurrentRow.Cells[1].Value.ToString(); dato1 = dtDatos.CurrentRow.Cells[2].Value.ToString(); } else { dato = ""; dato1 = ""; } } else { if (dtDatos.Rows.Count > 0 && consulta != 31) { dato = dtDatos.CurrentRow.Cells[0].Value.ToString(); } } if (consulta == 40) { if (dtDatos.Rows.Count > 0) { articulo.Clave = dtDatos.CurrentRow.Cells[0].Value.ToString(); articulo.Descr = dtDatos.CurrentRow.Cells[1].Value.ToString(); articulo.Material = dtDatos.CurrentRow.Cells[2].Value.ToString(); articulo.UnidadMedida = dtDatos.CurrentRow.Cells[3].Value.ToString(); articulo.Proveedor = dtDatos.CurrentRow.Cells[4].Value.ToString(); articulo.Categoria = dtDatos.CurrentRow.Cells[5].Value.ToString(); articulo.Color = dtDatos.CurrentRow.Cells[6].Value.ToString(); } } if (consulta == 41) { dato = dtDatos.CurrentRow.Cells[0].Value.ToString(); dato1 = dtDatos.CurrentRow.Cells[1].Value.ToString(); dato2 = dtDatos.CurrentRow.Cells[2].Value.ToString(); } if (consulta == 42) { if (dtDatos.Rows.Count > 0) { articulosPT.Clave = dtDatos.CurrentRow.Cells[0].Value.ToString(); articulosPT.Descr = dtDatos.CurrentRow.Cells[1].Value.ToString(); articulosPT.Categoria = dtDatos.CurrentRow.Cells[2].Value.ToString(); articulosPT.Estilo = dtDatos.CurrentRow.Cells[3].Value.ToString(); articulosPT.Linea = dtDatos.CurrentRow.Cells[4].Value.ToString(); articulosPT.Marca = dtDatos.CurrentRow.Cells[5].Value.ToString(); } } if (consulta == 43) { if (dtDatos.Rows.Count > 0) { articulosCot = new ArticulosCot(); articulosCot.Clave = dtDatos.CurrentRow.Cells[0].Value.ToString(); articulosCot.Descr = dtDatos.CurrentRow.Cells[1].Value.ToString(); articulosCot.Ancho = Convert.ToDecimal(dtDatos.CurrentRow.Cells[2].Value.ToString()); articulosCot.Peso = Convert.ToDecimal(dtDatos.CurrentRow.Cells[3].Value.ToString()); articulosCot.Proveedor = dtDatos.CurrentRow.Cells[4].Value.ToString(); articulosCot.UnidadMedida = dtDatos.CurrentRow.Cells[5].Value.ToString(); } } if (consulta == 44) { if (dtDatos.Rows.Count > 0) { proceso = new Proceso(); proceso.IdProceso = dtDatos.CurrentRow.Cells[1].Value.ToString(); proceso.Descripción = dtDatos.CurrentRow.Cells[2].Value.ToString(); } } if (consulta == 45) { if (dtDatos.Rows.Count > 0) { obra = new ManodeObra(); presupuestos = new Presupuestos(); obra.IdManodeObra = dtDatos.CurrentRow.Cells[1].Value.ToString(); obra.Descripción = dtDatos.CurrentRow.Cells[2].Value.ToString(); presupuestos = cotizacion.GetPresupuestos(obra.IdManodeObra); } } this.Close(); }