using System; using System.Collections.Generic; using System.IO; using System.Linq; using static Extensiones.ModExtensiones; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Sistemas_ListadoReportes : ClsPaginas { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CargaDatos(); } } private void CargaDatos() { string RutaReportes = string.Format("{0}/Formatos", UsuarioActual.Empresa.Ruta); string[] allfiles = Directory.GetFiles(RutaReportes, "*.mrt", SearchOption.AllDirectories); GvDatos.DataSource = (from Reporte in allfiles let file = new FileInfo(Reporte) select new { RutaReporte = file.FullName, Reporte = file.Name.Replace(".mrt","") }).QueryToDataTable(true); GvDatos.DataBind(); UPDatos.Update(); } protected void BtnEditar_Click(object sender, EventArgs e) { GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); var RutaReporteEncriptada = Encripta(GvRow.DataKey("RutaReporte")); var hostURL = "https://localhost:7162"; if (UsuarioActual.Empresa.FacturaProduccion) { hostURL = "http://sig.adssistemas.mx:6599"; } var strURL = $"{hostURL}/Designer/EditReport?P={RutaReporteEncriptada}"; RegistraScript($"openWindow('{strURL}');"); } }