private void button2_Click(object sender, EventArgs e) { Models.Configuration config = new Models.Configuration(); using (config) { List <Models.Configuration> configuracion = config.getConfiguration(); DataTable dtbl = maketable(); Models.Export_excel excel = new Models.Export_excel(); excel.ExportToExcel(dtbl, configuracion[0].Ruta_reportes + "/Ganancias"); MessageBox.Show("Terminado"); } }
private void button4_Click(object sender, EventArgs e) { Models.Configuration config = new Models.Configuration(); using (config) { List <Models.Configuration> configuracion = config.getConfiguration(); DataTable dtbl = inventario_para(); Models.Export_excel excel = new Models.Export_excel(); excel.ExportToExcel(dtbl, configuracion[0].Ruta_reportes + "inv"); MessageBox.Show("Terminado"); OpenMicrosoftExcel(configuracion[0].Ruta_reportes + "inv.xlsx"); } }