public string GuardaReporteHistorial(String nombreReporte) { if (nombreReporte != "") { Session["nombreReporte"] = nombreReporte; ArrayList listGenReporte = (ArrayList)Session["listGenReporte"]; if (ServiciosGen.agregaReporteConsulta(nombreReporte, (string)listGenReporte[0], (string)listGenReporte[1])) { return(string.Format("{{ \"mensaje\" : \"{0} \" }}", "Reporte Agregado a historial.")); } else { return(string.Format("{{ \"mensaje\" : \"{0} \" }}", "Error al agregar reporte a historial.")); } } else { return(string.Format("{{ \"mensaje\" : \"{0} \" }}", "Ingrese un nombre valido.")); } }
//Genera Reporte en XLS protected void ButtonGuardar_Click(object sender, EventArgs e) { if (idNombreReporte.Text != "") { Session["nombreReporte"] = idNombreReporte.Text; ArrayList listGenReporte = (ArrayList)Session["listGenReporte"]; if (listGenReporte != null) { if (ServiciosGen.agregaReporteConsulta(idNombreReporte.Text, (string)listGenReporte[0], (string)listGenReporte[1])) { Response.Write("<script language=javascript>alert('Consulta Guardada en Historial.');</script>"); } else { Response.Write("<script language=javascript>alert('Error al agregar reporte a historial.');</script>"); } } } else { Response.Write("<script language=javascript>alert('Ingrese el nombre del reporte...');</script>"); } }