public void cargarPaths() { try { if (!pathsCargados) { string[] lines = System.IO.File.ReadAllLines(@"" + System.Windows.Forms.Application.StartupPath + "\\paths.txt"); pathsDictionary.Add("especificaciones", lines[0]); pathsDictionary.Add("plantillaHallazgos", lines[1]); pathsDictionary.Add("ayudantes", lines[2]); pathsDictionary.Add("enterado", lines[3]); pathsDictionary.Add("identificadoPor", lines[4]); pathsDictionary.Add("inspectores", lines[5]); pathsDictionary.Add("responsables", lines[6]); pathsDictionary.Add("operadores", lines[7]); pathsDictionary.Add("supervisores", lines[8]); pathsDictionary.Add("historial", lines[9]); getTablaEspecificaciones(); registroHistorial.setStringBD(lines[9]); pathsCargados = true; } } catch { MessageBox.Show("No se pudo cargar la base de datos"); return; } }
private void formHistorial_Load(object sender, EventArgs e) { classHistorial historial = new classHistorial(); string[] lines = System.IO.File.ReadAllLines(@"" + System.Windows.Forms.Application.StartupPath + "\\paths.txt"); historial.setStringBD(lines[9]); DataTable tablaHistorial = historial.selectAll(); dataGridHistorial.DataSource = tablaHistorial; }