private void CargarSectoresSinAsignar(bool todos) { try { ServiciosCD40.ServiciosCD40 g = new ServiciosCD40.ServiciosCD40(); ServiciosCD40.Sectores t = new ServiciosCD40.Sectores(); t.IdSistema = (string)Session["idsistema"]; t.SectorSimple = true; DataSet d; if (todos) { d = g.GetSectoresFueraDeAgrupacion((string)Session["idsistema"], null); } else { d = g.GetSectoresFueraDeAgrupacion((string)Session["idsistema"], TxtIdAgrupacion.Text); } ListSectoresLibres.DataSource = d; ListSectoresLibres.DataTextField = "IdSector"; ListSectoresLibres.DataBind(); } catch (Exception e) { logDebugView.Error("(Agrupacion-CargarSectoresSinAsignar):", e); } }
protected void Page_Load(object sender, EventArgs e) { //base.Page_Load(sender, e); //cMsg = (Mensajes.msgBox)this.Master.FindControl("MsgBox1"); if (Context.Request.IsAuthenticated) { // retrieve user's identity from httpcontext user FormsIdentity ident = (FormsIdentity)Context.User.Identity; string perfil = ident.Ticket.UserData; if (perfil != "0") { Response.Redirect("~/Configuracion/Inicio.aspx?Permiso=NO"); return; } } else if (!IsPostBack) { Response.Redirect("~/Login.aspx"); return; } if (CallbackCompletado == null) { CallbackCompletado = new AsyncCallback(OnCallBackCompleted); } if (ServiceServiciosCD40 == null) { ServiceServiciosCD40 = new ServiciosCD40.ServiciosCD40(); } string cbReference = ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context", "ClientCallbackError", true); string callbackScript = "function CallServer(arg, context) {" + cbReference + "; }"; ClientScript.RegisterClientScriptBlock(this.GetType(), "CallServer", callbackScript, true); if (!IsPostBack) { Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); KeyValueConfigurationElement s = config.AppSettings.Settings["Sistema"]; RecuperaIdSectorizacionActiva(s.Value); RecuperaTops(s.Value); RecuperaSectoresActiva(s.Value); RecuperaSectorizaciones(s.Value); RecuperaSectoresSectorizaciones(s.Value); MuestraEstadoSectorizacion(); } else { EliminaFilas(); } }
private void CargarSectores() { try { ServiciosCD40.ServiciosCD40 g = new ServiciosCD40.ServiciosCD40(); ServiciosCD40.SectoresAgrupacion t = new ServiciosCD40.SectoresAgrupacion(); t.IdSistema = (string)Session["idsistema"]; t.IdAgrupacion = TxtIdAgrupacion.Text; ServiciosCD40.Tablas[] d = g.ListSelectSQL(t); if (d != null && d.Length > 0) { if (ListaSectoresOriginal.Length > 0) { ListaSectoresOriginal.Remove(0, ListaSectoresOriginal.Length); } if (ListaOriginal.Length > 0) { ListaOriginal.Remove(0, ListaOriginal.Length); } for (int i = 0; i < d.Length; i++) { ListaSectoresOriginal.AppendFormat("'{0}',", ((ServiciosCD40.SectoresAgrupacion)d[i]).IdSector); ListaOriginal.AppendFormat("{0},", ((ServiciosCD40.SectoresAgrupacion)d[i]).IdSector); ListSectores.Items.Add(((ServiciosCD40.SectoresAgrupacion)d[i]).IdSector); } if (ListaSectoresOriginal.Length > 0) { ListaSectoresOriginal.Remove(ListaSectoresOriginal.Length - 1, 1); } if (ListaOriginal.Length > 0) { ListaOriginal.Remove(ListaOriginal.Length - 1, 1); } IdNucleo = ((ServiciosCD40.SectoresAgrupacion)d[0]).IdNucleo; } } catch (Exception e) { logDebugView.Error("(Agrupacion-CargarSectores):", e); } }
protected void OnBtnAceptarModoContinuar(object sender, EventArgs e) { if (RBContinuarActiva.Checked) { Response.Redirect("~/Configuracion/Sectorizaciones.aspx", false); } else if (RBContinuarModificada.Checked) { // recupera la última activa (CD40) como configuración de trabajo (CD40_Trans) ServiciosCD40.ServiciosCD40 servicio = new ServiciosCD40.ServiciosCD40(); servicio.Rollback(); FormsAuthentication.Initialize(); HttpContext context1 = HttpContext.Current; HttpCookie cookie1 = new HttpCookie(FormsAuthentication.FormsCookieName, ""); cookie1.Path = FormsAuthentication.FormsCookiePath; cookie1.Expires = new DateTime(0x7cf, 10, 12); cookie1.Secure = FormsAuthentication.RequireSSL; context1.Response.Cookies.Remove(FormsAuthentication.FormsCookieName); context1.Response.Cookies.Add(cookie1); Response.Redirect("~/Login.aspx", false); } else { // Se sale de la sesión de configuración pero deja las modificaciones pendientes FormsAuthentication.Initialize(); HttpContext context1 = HttpContext.Current; HttpCookie cookie1 = new HttpCookie(FormsAuthentication.FormsCookieName, ""); cookie1.Path = FormsAuthentication.FormsCookiePath; cookie1.Expires = new DateTime(0x7cf, 10, 12); cookie1.Secure = FormsAuthentication.RequireSSL; context1.Response.Cookies.Remove(FormsAuthentication.FormsCookieName); context1.Response.Cookies.Add(cookie1); Response.Redirect("~/Login.aspx", false); } }
private bool GestionarUltimasModificaciones() { ServiciosCD40.ServiciosCD40 servicio = new ServiciosCD40.ServiciosCD40(); if (servicio.HayModificacionesPendientes()) { Panel1.Visible = true; return(false); } FormsAuthentication.Initialize(); HttpContext context1 = HttpContext.Current; HttpCookie cookie1 = new HttpCookie(FormsAuthentication.FormsCookieName, ""); cookie1.Path = FormsAuthentication.FormsCookiePath; cookie1.Expires = new DateTime(0x7cf, 10, 12); cookie1.Secure = FormsAuthentication.RequireSSL; context1.Response.Cookies.Remove(FormsAuthentication.FormsCookieName); context1.Response.Cookies.Add(cookie1); Response.Redirect("~/Login.aspx", false); return(true); }
protected void Page_Load(object sender, EventArgs e) { //Si no está autentificado se redirige a la pagina de login if (Context.Request.IsAuthenticated) { // retrieve user's identity from httpcontext user FormsIdentity ident = (FormsIdentity)Context.User.Identity; string perfil = ident.Ticket.UserData; //A esta pantalla tienen accesos todos los usuarios menos los operadores if (string.Compare(perfil, "0") == 0) { Response.Redirect("~/Login.aspx", false); return; } } else { Response.Redirect("~/Login.aspx", false); return; } if (!IsPostBack) { StringBuilder strConsulta = new StringBuilder(); strIdSistema = string.Empty; strVersion = strNucleo = string.Empty; dtst = null; dtsRecRadio = null; dtsRecRadioNoAsignados = null; dtsRecRadioReserva = null; /* * CRViewerInf.DisplayToolbar = true; * CRViewerInf.EnableParameterPrompt = false; * CRViewerInf.EnableDatabaseLogonPrompt = false; * CRViewerInf.Visible = false; * CRViewerInf.HasToggleGroupTreeButton = false; * CRViewerInf.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None; * CRViewerInf.HasToggleParameterPanelButton = false; * CRViewerInf.HasDrilldownTabs = false; //Se oculta la pestaña pagina principal * CRViewerInf.HasExportButton = false; //Se ocultan las opciones de exportacion de la Toolbar * CRViewerInf.HasCrystalLogo = false; //Se oculta el logo de Crystal Reports * CRViewerInf.HasPrintButton = true; //Se oculta la opción de imprimir */ string strIdioma = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName; ServiciosCD40.ServiciosCD40 Servicio = new ServiciosCD40.ServiciosCD40(); //Se obtiene el valor del parámetro Sistema, configurado en el fichero Web.config Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); KeyValueConfigurationElement objConf = config.AppSettings.Settings[CONF_KEY_SISTEMA]; strIdSistema = objConf.Value; //Obtenemos el Núcleo, que se pasa como parámetro en todos los informes ServiciosCD40.Nucleos tabNucleo = new ServiciosCD40.Nucleos(); tabNucleo.IdSistema = objConf.Value; ServiciosCD40.Tablas[] dTabNucleos = Servicio.ListSelectSQL(tabNucleo); if (null != dTabNucleos && dTabNucleos.Length > 0) { //Nos quedamos con el primer registro, porque en el sistema sólo se puede definir un nucleo strNucleo = ((ServiciosCD40.Nucleos)dTabNucleos[0]).IdNucleo; dTabNucleos = null; //Liberamos la memoria } //Informe de configuración de elementos lógicos sFicheroReport = Server.MapPath("~/Informes/" + CR_INF_LOGICAL_ELEMENTS); //Se obtienen los datos a visualizar en cada subinforme //Subinforme Frecuencias Radio //Consulta de obtención de destinos radio strConsulta.Append("SELECT DR.IdSistema, DR.TipoDestino,DR.IdDestino,DR.CnfModoDestino,DR.CnfTipoFrecuencia,DR.PrioridadSesionSip,DR.MetodoCalculoClimax,"); strConsulta.Append("DR.CldSupervisionTime,DR.VentanaSeleccionBss,DR.ModoTransmision,MB.name as NameBss, DR.EmplazamientoDefecto, DR.TiempoVueltaADefecto, DR.ConRedundancia "); strConsulta.Append("FROM DestinosRadio DR LEFT JOIN metodos_bss mb ON mb.idmetodos_bss = DR.MetodosBssOfrecidos "); strConsulta.AppendFormat("WHERE DR.IdSistema='{0}' ORDER BY DR.CnfTipoFrecuencia,DR.IdDestino", strIdSistema); dtst = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Consulta de obtención de recursos radio asociados a los destinos radio junto a los parámetros HF y M+N si aplica strConsulta.Append("SELECT r.IdRecurso, r.TipoRecurso, r.IdEmplazamiento, rp.idradio_param, rp.GrsDelay, rp.OffSetFrequency, rp.EnableEventPttSq, rp.metodos_bss_idmetodos_bss,"); strConsulta.Append("pr.GananciaAGCTX, pr.GananciaAGCTXdBm, pr.GananciaAGCRX, pr.GananciaAGCRXdBm, pr.TamRTP, pr.TipoEM, pr.GrabacionEd137, z.Nombre AS NameZona,"); strConsulta.Append("rec.Tipo, tb.name AS TablaBSS, mb.name AS NameBss, rec.IdTIFX AS rec_idTIFX, rec.idEquipos, rec.SlotPasarela, rec.NumDispositivoSlot, pr.Codec,"); strConsulta.Append("pr.SupresionSilencio, r.IdDestino, r.TipoDestino, r.IdSistema, r.zonas_idZonas, r.tabla_bss_idtabla_bss, r.SQ, r.PTT, r.TiempoPTT, r.UmbralVAD, r.BSS, "); strConsulta.Append("hfp.IpGestor as hfp_IpGestor, hfp.Oid as hfp_oid, hfp.Frecuencia as hfp_frecuencia, hfp.TipoEquipo as hfp_TipoEquipo, hfp.TipoCanal as hfp_TipoCanal,"); strConsulta.Append("hfp.TipoFrecuencia as hfp_tipoFrecuencia, hfp.TipoModo as hfp_tipomodo,hfp.PrioridadEquipo as hfp_prioridadEquipo, hfp.Puerto as hfp_puerto, "); strConsulta.Append("hfp.Offset as hfp_offset, hfp.Canalizacion as hfp_canalizacion, hfp.Modulacion as hfp_modulacion, hfp.Potencia as hfp_potencia, "); strConsulta.Append("hfp.FormatoFrecuenciaPrincipal as hfp_FormatoFrecuenciaPrincipal, hfp.ModeloEquipo as hfp_ModeloEquipo, r.RedundanciaRol, r.RedundanciaIdPareja "); strConsulta.Append("FROM recursosradio r LEFT OUTER JOIN zonas z ON z.idZonas = r.zonas_idZonas "); strConsulta.Append("LEFT OUTER JOIN tabla_bss tb ON tb.idtabla_bss = r.tabla_bss_idtabla_bss "); strConsulta.Append("LEFT OUTER JOIN radio_param rp ON rp.idradio_param = r.radio_param_idradio_param "); strConsulta.Append("LEFT OUTER JOIN metodos_bss mb ON mb.idmetodos_bss = rp.metodos_bss_idmetodos_bss "); strConsulta.Append("LEFT OUTER JOIN destinosradio destrad ON destrad.IdSistema = r.IdSistema AND destrad.IdDestino = r.IdDestino AND destrad.TipoDestino = r.TipoDestino "); strConsulta.Append("INNER JOIN parametrosrecurso pr ON pr.IdSistema = r.IdSistema AND pr.IdRecurso = r.IdRecurso AND pr.TipoRecurso = r.TipoRecurso "); strConsulta.Append("INNER JOIN recursos rec ON rec.IdSistema = r.IdSistema AND rec.IdRecurso = r.IdRecurso AND rec.TipoRecurso = r.TipoRecurso "); strConsulta.Append("LEFT OUTER JOIN hfparams hfp ON hfp.IdSistema = r.IdSistema and hfp.IdRecurso= r.IdRecurso "); strConsulta.AppendFormat("WHERE r.IdSistema='{0}' AND r.IdDestino is not null ", strIdSistema); strConsulta.Append("ORDER BY r.IdDestino, r.RedundanciaIdPareja,r.RedundanciaRol, r.IdRecurso "); dtsRecRadio = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Consulta de obtención de recursos radio sin destino asociados que son M+N de tipo N (tipomodo=1) o HF strConsulta.Append("SELECT r.IdRecurso, r.TipoRecurso, r.IdEmplazamiento, rp.idradio_param, rp.GrsDelay, rp.OffSetFrequency, rp.EnableEventPttSq, rp.metodos_bss_idmetodos_bss,"); strConsulta.Append("pr.GananciaAGCTX, pr.GananciaAGCTXdBm, pr.GananciaAGCRX, pr.GananciaAGCRXdBm, pr.TamRTP, pr.TipoEM, pr.GrabacionEd137, z.Nombre AS NameZona,"); strConsulta.Append("rec.Tipo, tb.name AS TablaBSS, mb.name AS NameBss, rec.IdTIFX AS rec_idTIFX, rec.idEquipos, rec.SlotPasarela, rec.NumDispositivoSlot, pr.Codec,"); strConsulta.Append("pr.SupresionSilencio, r.IdDestino, r.TipoDestino, r.IdSistema, r.zonas_idZonas, r.tabla_bss_idtabla_bss, r.SQ, r.PTT, r.TiempoPTT, r.UmbralVAD, r.BSS, "); strConsulta.Append("hfp.IpGestor as hfp_IpGestor, hfp.Oid as hfp_oid, hfp.Frecuencia as hfp_frecuencia, hfp.TipoEquipo as hfp_TipoEquipo, hfp.TipoCanal as hfp_TipoCanal,"); strConsulta.Append("hfp.TipoFrecuencia as hfp_tipoFrecuencia, hfp.TipoModo as hfp_tipomodo,hfp.PrioridadEquipo as hfp_prioridadEquipo, hfp.Puerto as hfp_puerto, "); strConsulta.Append("hfp.Offset as hfp_offset, hfp.Canalizacion as hfp_canalizacion, hfp.Modulacion as hfp_modulacion, hfp.Potencia as hfp_potencia, "); strConsulta.Append("hfp.FormatoFrecuenciaPrincipal as hfp_FormatoFrecuenciaPrincipal, hfp.ModeloEquipo as hfp_ModeloEquipo "); strConsulta.Append("FROM recursosradio r LEFT OUTER JOIN zonas z ON z.idZonas = r.zonas_idZonas "); strConsulta.Append("LEFT OUTER JOIN tabla_bss tb ON tb.idtabla_bss = r.tabla_bss_idtabla_bss "); strConsulta.Append("LEFT OUTER JOIN radio_param rp ON rp.idradio_param = r.radio_param_idradio_param "); strConsulta.Append("LEFT OUTER JOIN metodos_bss mb ON mb.idmetodos_bss = rp.metodos_bss_idmetodos_bss "); strConsulta.Append("LEFT OUTER JOIN destinosradio destrad ON destrad.IdSistema = r.IdSistema AND destrad.IdDestino = r.IdDestino AND destrad.TipoDestino = r.TipoDestino "); strConsulta.Append("INNER JOIN parametrosrecurso pr ON pr.IdSistema = r.IdSistema AND pr.IdRecurso = r.IdRecurso AND pr.TipoRecurso = r.TipoRecurso "); strConsulta.Append("INNER JOIN recursos rec ON rec.IdSistema = r.IdSistema AND rec.IdRecurso = r.IdRecurso AND rec.TipoRecurso = r.TipoRecurso "); strConsulta.Append("LEFT OUTER JOIN hfparams hfp ON hfp.IdSistema = r.IdSistema and hfp.IdRecurso= r.IdRecurso "); strConsulta.AppendFormat("WHERE r.IdSistema='{0}' AND r.IdDestino is null AND (rec.tipo=3 OR (rec.tipo>=4 AND rec.tipo<=6 AND hfp.tipomodo=1)) ", strIdSistema); strConsulta.Append("ORDER BY r.IdDestino, r.IdRecurso "); dtsRecRadioReserva = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Consulta de obtención de recursos radio sin destino asociados que no son M+N de tipo N, ni HF strConsulta.Append("SELECT r.IdRecurso, r.TipoRecurso, r.IdEmplazamiento, rp.idradio_param, rp.GrsDelay, rp.OffSetFrequency, rp.EnableEventPttSq, rp.metodos_bss_idmetodos_bss,"); strConsulta.Append("pr.GananciaAGCTX, pr.GananciaAGCTXdBm, pr.GananciaAGCRX, pr.GananciaAGCRXdBm, pr.TamRTP, pr.TipoEM, pr.GrabacionEd137, z.Nombre AS NameZona,"); strConsulta.Append("rec.Tipo, tb.name AS TablaBSS, mb.name AS NameBss, rec.IdTIFX AS rec_idTIFX, rec.idEquipos, rec.SlotPasarela, rec.NumDispositivoSlot, pr.Codec,"); strConsulta.Append("pr.SupresionSilencio, r.IdDestino, r.TipoDestino, r.IdSistema, r.zonas_idZonas, r.tabla_bss_idtabla_bss, r.SQ, r.PTT, r.TiempoPTT, r.UmbralVAD, r.BSS, "); strConsulta.Append("hfp.IpGestor as hfp_IpGestor, hfp.Oid as hfp_oid, hfp.Frecuencia as hfp_frecuencia, hfp.TipoEquipo as hfp_TipoEquipo, hfp.TipoCanal as hfp_TipoCanal,"); strConsulta.Append("hfp.TipoFrecuencia as hfp_tipoFrecuencia, hfp.TipoModo as hfp_tipomodo,hfp.PrioridadEquipo as hfp_prioridadEquipo, hfp.Puerto as hfp_puerto, "); strConsulta.Append("hfp.Offset as hfp_offset, hfp.Canalizacion as hfp_canalizacion, hfp.Modulacion as hfp_modulacion, hfp.Potencia as hfp_potencia, "); strConsulta.Append("hfp.FormatoFrecuenciaPrincipal as hfp_FormatoFrecuenciaPrincipal, hfp.ModeloEquipo as hfp_ModeloEquipo "); strConsulta.Append("FROM recursosradio r LEFT OUTER JOIN zonas z ON z.idZonas = r.zonas_idZonas "); strConsulta.Append("LEFT OUTER JOIN tabla_bss tb ON tb.idtabla_bss = r.tabla_bss_idtabla_bss "); strConsulta.Append("LEFT OUTER JOIN radio_param rp ON rp.idradio_param = r.radio_param_idradio_param "); strConsulta.Append("LEFT OUTER JOIN metodos_bss mb ON mb.idmetodos_bss = rp.metodos_bss_idmetodos_bss "); strConsulta.Append("LEFT OUTER JOIN destinosradio destrad ON destrad.IdSistema = r.IdSistema AND destrad.IdDestino = r.IdDestino AND destrad.TipoDestino = r.TipoDestino "); strConsulta.Append("INNER JOIN parametrosrecurso pr ON pr.IdSistema = r.IdSistema AND pr.IdRecurso = r.IdRecurso AND pr.TipoRecurso = r.TipoRecurso "); strConsulta.Append("INNER JOIN recursos rec ON rec.IdSistema = r.IdSistema AND rec.IdRecurso = r.IdRecurso AND rec.TipoRecurso = r.TipoRecurso "); strConsulta.Append("LEFT OUTER JOIN hfparams hfp ON hfp.IdSistema = r.IdSistema and hfp.IdRecurso= r.IdRecurso "); strConsulta.AppendFormat("WHERE r.IdSistema='{0}' AND r.IdDestino is null AND (rec.tipo!=3 AND (rec.tipo<4 OR rec.tipo>6 AND hfp.tipomodo=0)) ", strIdSistema); dtsRecRadioNoAsignados = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); if (System.IO.File.Exists(sFicheroReport)) { CRSourceInf.Report.FileName = sFicheroReport; CRSourceInf.ReportDocument.Load(sFicheroReport); TraducirInforme(CRSourceInf.ReportDocument, strIdioma); //Asociamos el datasource if (null != dtst && dtst.Tables.Count > 0) { try { if (null != GetLocalResourceObject("LB_INFORME_ELEMENTOS_LOG_RADIO_SUMMARY")) { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = GetLocalResourceObject("LB_INFORME_ELEMENTOS_LOG_RADIO_SUMMARY").ToString(); } else { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = "Informe de Configuración de Radio"; } //Le asignamos los datos if (CRSourceInf.ReportDocument.Subreports.Count > 0) { for (int i = 0; i < CRSourceInf.ReportDocument.Subreports.Count; i++) { if (CRSourceInf.ReportDocument.Subreports[i] != null) { switch (CRSourceInf.ReportDocument.Subreports[i].Name.ToString()) { case CR_INF_LE_SUBINF_FREC_RADIO: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtst != null && dtst.Tables.Count > 0) { dtst.Tables[0].TableName = "DestinosRadio"; if (dtsRecRadio != null && dtsRecRadio.Tables.Count > 0) { dtsRecRadio.Tables[0].TableName = "RecursosRadio"; dtst.Tables.Add(dtsRecRadio.Tables[0].Copy()); } CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtst); } break; case CR_INF_LE_SUBINF_RECRADIO_RESERVA: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsRecRadioReserva != null && dtsRecRadioReserva.Tables.Count > 0) { dtsRecRadioReserva.Tables[0].TableName = "RecursosRadio"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsRecRadioReserva.Tables[0]); } break; case CR_INF_LE_SUBINF_RECRADIO_NOASIGNADOS: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsRecRadioNoAsignados != null && dtsRecRadioNoAsignados.Tables.Count > 0) { dtsRecRadioNoAsignados.Tables[0].TableName = "RecursosRadio"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsRecRadioNoAsignados.Tables[0]); } break; default: break; } } } } //Se lee el recurso Version LB_VERSION if (null != GetGlobalResourceObject("Espaniol", "LB_VERSION")) { strVersion = GetGlobalResourceObject("Espaniol", "LB_VERSION").ToString(); } //Se pasan los parámetros al informe. Los parámetros se deben pasar siempre después de configurar //los data Sources. Si no se hace así, la ejecución del report falla, indicando que le faltan parámetros CRSourceInf.ReportDocument.SetParameterValue("p_version", strVersion.ToString()); CRSourceInf.ReportDocument.SetParameterValue("p_idEmplazamiento", strNucleo.ToString()); //CRViewerInf.DataBind(); //CRViewerInf.Visible = true; VisualizaInformePdf(); } catch (System.Threading.ThreadAbortException) { //ThreadException can happen for internale Response implementation if (dtst != null) { dtst.Clear(); } if (dtsRecRadio != null) { dtsRecRadio.Clear(); } if (dtsRecRadioNoAsignados != null) { dtsRecRadioNoAsignados.Clear(); } if (dtsRecRadioReserva != null) { dtsRecRadioReserva.Clear(); } } catch (Exception ex) { logDebugView.Error(string.Format("Error al ejecutar el informe {0}. Error:{1} ", sFicheroReport, ex.Message.ToString())); } } } else { logDebugView.Error(string.Format("Error al ejecutar el informe {0}: el fichero no existe ", sFicheroReport)); DeshabilitaBotonesExportar(); } } }
protected void Page_Load(object sender, EventArgs e) { //Si no está autentificado se redirige a la pagina de login if (Context.Request.IsAuthenticated) { // retrieve user's identity from httpcontext user FormsIdentity ident = (FormsIdentity)Context.User.Identity; string perfil = ident.Ticket.UserData; //A esta pantalla tienen accesos todos los usuarios menos los operadores if (string.Compare(perfil, "0") == 0) { Response.Redirect("~/Login.aspx", false); return; } } else { Response.Redirect("~/Login.aspx", false); return; } if (!IsPostBack) { StringBuilder strConsulta = new StringBuilder(); strVersion = strNucleo = string.Empty; dtst = null; dtstPermisosRedes = null; dtstUsuAbonados = null; dtstDestinosPanelTlf = null; dtstDestinosPanelLC = null; dtstDestinosPanelRadio = null; /* * CRViewerInf.DisplayToolbar = true; * CRViewerInf.EnableParameterPrompt = false; * CRViewerInf.EnableDatabaseLogonPrompt = false; * CRViewerInf.Visible = false; * CRViewerInf.HasToggleGroupTreeButton = false; * CRViewerInf.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None; * CRViewerInf.HasToggleParameterPanelButton = false; * CRViewerInf.HasDrilldownTabs = false; //Se oculta la pestaña pagina principal * CRViewerInf.HasExportButton = false; //Se ocultan las opciones de exportacion de la Toolbar * CRViewerInf.HasCrystalLogo = false; //Se oculta el logo de Crystal Reports * CRViewerInf.HasPrintButton = true; //Se muestra la opción de imprimir */ string strIdioma = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName; ServiciosCD40.ServiciosCD40 Servicio = new ServiciosCD40.ServiciosCD40(); //Se obtiene el valor del parámetro Sistema, configurado en el fichero Web.config Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); KeyValueConfigurationElement objConf = config.AppSettings.Settings[CONF_KEY_SISTEMA]; strIdSistema = objConf.Value; //Obtenemos el Núcleo, que se pasa como parámetro en todos los informes ServiciosCD40.Nucleos tabNucleo = new ServiciosCD40.Nucleos(); tabNucleo.IdSistema = objConf.Value; ServiciosCD40.Tablas[] dTabNucleos = Servicio.ListSelectSQL(tabNucleo); if (null != dTabNucleos && dTabNucleos.Length > 0) { //Nos quedamos con el primer registro, porque en el sistema sólo se puede definir un nucleo strNucleo = ((ServiciosCD40.Nucleos)dTabNucleos[0]).IdNucleo; dTabNucleos = null; //Liberamos la memoria } sFicheroReport = Server.MapPath(CR_INF_SECTORES); //Se obtienen los datos a visualizar en el informe //Lista de Sectores simples y sus parámetros strConsulta.Append("SELECT sectores.IdSistema,sectores.IdNucleo,sectores.IdSector,sectores.Tipo,sectores.TipoPosicion,sectores.PrioridadR2,"); strConsulta.Append("sectores.TipoHMI,sectores.NumSacta,sectores.SectorSimple,"); strConsulta.Append("parametrossector.NumLlamadasEntrantesIDA,parametrossector.NumLlamadasEnIDA,parametrossector.NumFreqPagina,parametrossector.NumPagFreq,"); strConsulta.Append("parametrossector.NumDestinosInternosPag,parametrossector.NumPagDestinosInt,parametrossector.Intrusion,parametrossector.Intruido, "); strConsulta.Append("parametrossector.KeepAlivePeriod,parametrossector.KeepAliveMultiplier,parametrossector.NumEnlacesAI,parametrossector.GrabacionEd137, "); strConsulta.Append("teclassector.TransConConsultaPrev, teclassector.TransDirecta, teclassector.Conferencia, teclassector.Escucha, teclassector.Retener,"); strConsulta.Append("teclassector.Captura,teclassector.Redireccion,teclassector.RepeticionUltLlamada,teclassector.RellamadaAut,teclassector.Tecla55mas1,"); strConsulta.Append("teclassector.TeclaPrioridad,teclassector.Monitoring,teclassector.CoordinadorTF,teclassector.CoordinadorRD,teclassector.IntegracionRDTF,"); strConsulta.Append("teclassector.LlamadaSelectiva,teclassector.GrupoBSS,teclassector.LTT, teclassector.SayAgain,teclassector.InhabilitacionRedirec,teclassector.Glp "); strConsulta.Append("FROM sectores LEFT OUTER JOIN "); strConsulta.Append("parametrossector ON sectores.IdSistema=parametrossector.IdSistema AND sectores.IdNucleo=parametrossector.IdNucleo AND "); strConsulta.Append("sectores.IdSector=parametrossector.IdSector "); strConsulta.AppendFormat("LEFT OUTER JOIN teclassector ON sectores.IdSistema=teclassector.IdSistema AND sectores.IdNucleo=teclassector.IdNucleo AND sectores.IdSector=teclassector.IdSector "); strConsulta.AppendFormat(" WHERE sectores.IdSistema='{0}' AND sectores.SectorSimple=1 ", strIdSistema); dtst = Servicio.ObtenerDataSet(strConsulta.ToString()); if (dtst != null && dtst.Tables.Count > 0) { dtst.Tables[0].TableName = "sectores"; strConsulta.Clear(); //Lista de Permisos redes de los sectores ServiciosCD40.PermisosRedes tabPermisosRedes = new ServiciosCD40.PermisosRedes(); tabPermisosRedes.IdSistema = strIdSistema; strConsulta.Append("SELECT IdSistema, IdRed, IdSector, IdNucleo, Llamar, Recibir FROM permisosredes "); strConsulta.AppendFormat("WHERE IdSistema='{0}' AND ", strIdSistema); strConsulta.Append("EXISTS(SELECT 1 FROM SECTORES WHERE SECTORES.IdSector=permisosredes.IdSector "); strConsulta.Append("AND SECTORES.IdSistema=permisosredes.IdSistema AND SECTORES.IdNucleo=permisosredes.IdNucleo AND SECTORES.sectorsimple=1) "); dtstPermisosRedes = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Lista de Abonados a los que atiende cada sector strConsulta.Append("SELECT usuariosabonados.IdSistema, usuariosabonados.IdPrefijo, usuariosabonados.IdNucleo, usuariosabonados.IdSector,"); strConsulta.Append("usuariosabonados.IdAbonado, redes.IdRed "); strConsulta.Append("FROM usuariosabonados inner JOIN "); strConsulta.Append("redes ON usuariosabonados.IdSistema = redes.IdSistema AND usuariosabonados.IdPrefijo = redes.IdPrefijo "); strConsulta.AppendFormat("WHERE usuariosabonados.IdSistema='{0}' AND EXISTS(SELECT 1 FROM SECTORES WHERE SECTORES.IdSector=usuariosabonados.IdSector ", strIdSistema); strConsulta.Append("AND SECTORES.IdSistema=usuariosabonados.IdSistema AND SECTORES.IdNucleo=usuariosabonados.IdNucleo AND SECTORES.sectorsimple=1) "); dtstUsuAbonados = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Se obtienen los destinos del panel de telefonía de todos los sectores simples strConsulta.Append("SELECT IdSistema,IdNucleo,IdSector,IdDestino,TipoDestino,IdPrefijo,PosHMI,Prioridad,OrigenR2,PrioridadSIP,TipoAcceso,Literal,"); strConsulta.AppendFormat("NULL AS IdPrefijoDestinoLCEN, NULL AS IdDestinoLCEN FROM destinosinternossector WHERE IdSistema='{0}' AND TipoAcceso='DA' AND IdPrefijo=2 ", strIdSistema); strConsulta.Append("UNION SELECT IdSistema,IdNucleo,IdSector,IdDestino,TipoDestino,IdPrefijo,PosHMI,Prioridad,OrigenR2,PrioridadSIP,TipoAcceso,Literal,"); strConsulta.AppendFormat("IdPrefijoDestinoLCEN,IdDestinoLCEN FROM destinosexternossector WHERE IdSistema='{0}' AND TipoAcceso='DA' AND IdPrefijo<>1 ", strIdSistema); dtstDestinosPanelTlf = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Se obtienen los destinos del panel de Línea Caliente strConsulta.Append("SELECT IdSistema,IdNucleo,IdSector,IdDestino,TipoDestino,IdPrefijo,PosHMI,Prioridad,OrigenR2,PrioridadSIP,TipoAcceso,Literal,"); strConsulta.AppendFormat("NULL AS IdPrefijoDestinoLCEN, NULL AS IdDestinoLCEN FROM destinosinternossector WHERE IdSistema='{0}'AND TipoAcceso='IA' AND IdPrefijo=0 ", strIdSistema); strConsulta.Append("UNION SELECT IdSistema,IdNucleo,IdSector,IdDestino,TipoDestino,IdPrefijo,PosHMI,Prioridad,OrigenR2,PrioridadSIP,TipoAcceso,Literal,"); strConsulta.AppendFormat("IdPrefijoDestinoLCEN,IdDestinoLCEN FROM destinosexternossector WHERE IdSistema='{0}' AND TipoAcceso='IA' AND IdPrefijo=3 ", strIdSistema); dtstDestinosPanelLC = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Se obtienen los destinos del panel de radio strConsulta.Append("SELECT IdSistema,IdNucleo,IdSector,IdDestino,TipoDestino,PosHMI,Prioridad,PrioridadSIP,ModoOperacion,Cascos,Literal,SupervisionPortadora "); strConsulta.AppendFormat("FROM destinosradiosector WHERE IdSistema='{0}' ", strIdSistema); dtstDestinosPanelRadio = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); } if (System.IO.File.Exists(sFicheroReport)) { CRSourceInf.Report.FileName = sFicheroReport; CRSourceInf.ReportDocument.Load(sFicheroReport); TraducirInforme(CRSourceInf.ReportDocument, strIdioma); //Asociamos el datasource if (null != dtst && dtst.Tables.Count > 0) { try { bConSafta = false; //Se obtiene el parametro que indica si se debe o no visualizar la posición Sacta objConf = config.AppSettings.Settings[CONF_KEY_CON_SACTA]; if ((objConf != null) && (!string.IsNullOrEmpty(objConf.Value) && string.Compare(objConf.Value, "SI", true) == 0)) { //El sistema está configurado con el sistema SACTA bConSafta = true; } if (null != GetLocalResourceObject("LB_INFORME_SECTORES_SUMMARY")) { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = GetLocalResourceObject("LB_INFORME_SECTORES_SUMMARY").ToString(); } else { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = "Informe de Sectores"; } //Se añaden los dataset al informe principal y a los subinformes CRSourceInf.ReportDocument.SetDataSource(dtst.Tables[0]); //El informe principal tiene 5 subreports if (CRSourceInf.ReportDocument.Subreports.Count > 0) { for (int i = 0; i < CRSourceInf.ReportDocument.Subreports.Count; i++) { if (CRSourceInf.ReportDocument.Subreports[i] != null) { switch (CRSourceInf.ReportDocument.Subreports[i].Name.ToString()) { case CR_INF_SECTORES_SUBINF_ABONADOS: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtstUsuAbonados != null && dtstUsuAbonados.Tables.Count > 0) { dtstUsuAbonados.Tables[0].TableName = "usuariosabonados"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtstUsuAbonados.Tables[0]); } break; case CR_INF_SECTORES_SUBINF_PERMISOS: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtstPermisosRedes != null && dtstPermisosRedes.Tables.Count > 0) { dtstPermisosRedes.Tables[0].TableName = "permisosredes"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtstPermisosRedes.Tables[0]); } break; case CR_INF_SECTORES_SUBINF_PANEL_TLF: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtstDestinosPanelTlf != null && dtstDestinosPanelTlf.Tables.Count > 0) { dtstDestinosPanelTlf.Tables[0].TableName = "destinostelefoniasector"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtstDestinosPanelTlf.Tables[0]); } break; case CR_INF_SECTORES_SUBINF_PANEL_LC: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtstDestinosPanelLC != null && dtstDestinosPanelLC.Tables.Count > 0) { dtstDestinosPanelLC.Tables[0].TableName = "destinostelefoniasector"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtstDestinosPanelLC.Tables[0]); } break; case CR_INF_SECTORES_SUBINF_PANEL_RADIO: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtstDestinosPanelRadio != null && dtstDestinosPanelRadio.Tables.Count > 0) { dtstDestinosPanelRadio.Tables[0].TableName = "destinosradiosector"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtstDestinosPanelRadio.Tables[0]); } break; default: break; } } } } //Se leen el recurso Version LB_VERSION if (null != GetGlobalResourceObject("Espaniol", "LB_VERSION")) { strVersion = GetGlobalResourceObject("Espaniol", "LB_VERSION").ToString(); } //Se pasan los parámetros al informe. Los parámetros se deben pasar siempre después de configurar //los data Sources. Si no se hace así, la ejecución del report falla, indicando que le faltan parámetros CRSourceInf.ReportDocument.SetParameterValue("p_version", strVersion.ToString()); CRSourceInf.ReportDocument.SetParameterValue("p_idEmplazamiento", strNucleo.ToString()); CRSourceInf.ReportDocument.SetParameterValue("p_bSAFTA", bConSafta); //CRViewerInf.DataBind(); //CRViewerInf.Visible = true; VisualizaInformePdf(); } catch (System.Threading.ThreadAbortException) { //ThreadException can happen for internale Response implementation if (dtst != null) { dtst.Clear(); } if (dtstPermisosRedes != null) { dtstPermisosRedes.Clear(); } if (dtstUsuAbonados != null) { dtstUsuAbonados.Clear(); } if (dtstDestinosPanelTlf != null) { dtstDestinosPanelTlf.Clear(); } if (dtstDestinosPanelLC != null) { dtstDestinosPanelLC.Clear(); } if (dtstDestinosPanelRadio != null) { dtstDestinosPanelRadio.Clear(); } } catch (Exception ex) { logDebugView.Error(string.Format("Error al ejecutar el informe {0}. Error:{1} ", sFicheroReport, ex.Message.ToString())); } } else { logDebugView.Error(string.Format("Error al ejecutar el informe {0}: el fichero no existe ", sFicheroReport)); DeshabilitaBotonesExportar(); } } } }
protected void Page_Load(object sender, EventArgs e) { //Si no está autentificado se redirige a la pagina de login if (Context.Request.IsAuthenticated) { // retrieve user's identity from httpcontext user FormsIdentity ident = (FormsIdentity)Context.User.Identity; string perfil = ident.Ticket.UserData; //A esta pantalla tienen accesos todos los usuarios menos los operadores if (string.Compare(perfil, "0") == 0) { Response.Redirect("~/Login.aspx", false); return; } } else { Response.Redirect("~/Login.aspx", false); return; } if (!IsPostBack) { StringBuilder strConsulta = new StringBuilder(); string strIdSistema = string.Empty; strVersion = strNucleo = string.Empty; dtst = null; dtsRangos = null; dtsDatosServidoresIP = null; dtsRutas = null; dtsRedes = null; dtsDestinosATS = null; /* * CRViewerInf.DisplayToolbar = true; * CRViewerInf.EnableParameterPrompt = false; * CRViewerInf.EnableDatabaseLogonPrompt = false; * CRViewerInf.Visible = false; * CRViewerInf.HasToggleGroupTreeButton = false; * CRViewerInf.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None; * CRViewerInf.HasToggleParameterPanelButton = false; * CRViewerInf.HasDrilldownTabs = false; //Se oculta la pestaña pagina principal * CRViewerInf.HasExportButton = false; //Se ocultan las opciones de exportacion de la Toolbar * CRViewerInf.HasCrystalLogo = false; //Se oculta el logo de Crystal Reports * CRViewerInf.HasPrintButton = true; //Se oculta la opción de imprimir * CRViewerInf.SeparatePages = false; * */ string strIdioma = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName; ServiciosCD40.ServiciosCD40 Servicio = new ServiciosCD40.ServiciosCD40(); //Se obtiene el valor del parámetro Sistema, configurado en el fichero Web.config Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); KeyValueConfigurationElement objConf = config.AppSettings.Settings[CONF_KEY_SISTEMA]; strIdSistema = objConf.Value; //Obtenemos el Núcleo, que se pasa como parámetro en todos los informes ServiciosCD40.Nucleos tabNucleo = new ServiciosCD40.Nucleos(); tabNucleo.IdSistema = objConf.Value; ServiciosCD40.Tablas[] dTabNucleos = Servicio.ListSelectSQL(tabNucleo); if (null != dTabNucleos && dTabNucleos.Length > 0) { //Nos quedamos con el primer registro, porque en el sistema sólo se puede definir un nucleo strNucleo = ((ServiciosCD40.Nucleos)dTabNucleos[0]).IdNucleo; dTabNucleos = null; //Liberamos la memoria } //Informe de configuración de elementos lógicos sFicheroReport = Server.MapPath("~/Informes/" + CR_INF_LOGICAL_ELEMENTS); //Consulta de obtención de los encaminamientos strConsulta.Append("SELECT IdSistema, Central, CentralPropia, Throwswitching, NumTest, CentralIp FROM encaminamientos "); strConsulta.AppendFormat("WHERE IdSistema='{0}' ORDER BY CentralPropia DESC,CENTRAL ", strIdSistema); dtst = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Consulta de obtención de los rangos strConsulta.Append("SELECT R.IdSistema, R.Central, R.Tipo, R.Inicial, R.IdPrefijo, R.IdAbonado, R.Final, RD.IdRed "); strConsulta.Append("FROM rangos R LEFT OUTER JOIN "); strConsulta.Append("redes RD ON R.IdPrefijo=RD.IdPrefijo AND R.IdPrefijo<>0 "); strConsulta.AppendFormat("WHERE R.IdSistema='{0}'", strIdSistema); dtsRangos = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Consulta de obtención de los servidores de proxy y de presencia de las centrales ATS strConsulta.Append("SELECT IdSistema, idEquipos, IpRed1, IpRed2, IpRed3, SrvPresenciaIpRed1, SrvPresenciaIpRed2, SrvPresenciaIpRed3, Interno,Min,Max "); strConsulta.AppendFormat("FROM equiposeu WHERE (Min= - 1) AND (Max=-1) AND IdSistema='{0}' ", strIdSistema); dtsDatosServidoresIP = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Se obtienen la lista de rutas, troncales y recursos asociadas a las centrales ATS strConsulta.Append("SELECT R.IdSistema,R.Central,R.IdRuta,R.Tipo,R.Orden,T.IdTroncal,RE.IdRecurso,RE.TipoRecurso,RE.idEquipos,RE.IdTIFX,RE.Tipo AS rec_tipo,"); strConsulta.Append("RE.Interface,RE.SlotPasarela,RE.NumDispositivoSlot,RE.ServidorSIP,RE.Diffserv,TF.Lado,TF.Modo,TF.IdPrefijo,PR.GananciaAGCTX, PR.GananciaAGCTXdBm,"); strConsulta.Append("PR.GananciaAGCRX, PR.GananciaAGCRXdBm, PR.TamRTP, PR.TipoEM, PR.GrabacionEd137, PR.Codec, PR.SupresionSilencio, "); strConsulta.Append("PR.iTmDetFinLlamada, PR.iTmCallerId, PR.iDetInversionPol, PR.iDetCallerId "); strConsulta.Append("FROM rutas R LEFT OUTER JOIN troncalesruta T ON T.IdSistema=R.IdSistema AND T.Central=R.Central AND T.IdRuta=R.IdRuta "); strConsulta.Append("LEFT OUTER JOIN recursostf TF ON TF.IdSistema=T.IdSistema AND TF.IdTroncal=T.IdTroncal AND TF.TipoRecurso=1 "); strConsulta.Append("LEFT OUTER JOIN recursos RE ON RE.IdSistema=TF.IdSistema AND RE.IdRecurso=TF.IdRecurso AND RE.TipoRecurso=TF.TipoRecurso "); strConsulta.Append("LEFT OUTER JOIN parametrosrecurso PR ON PR.IdSistema=RE.IdSistema AND PR.IdRecurso=RE.IdRecurso AND PR.TipoRecurso=RE.TipoRecurso "); strConsulta.AppendFormat("WHERE R.IdSistema='{0}' ORDER BY R.Central,R.Orden,T.IdTroncal,RE.IdRecurso", strIdSistema); dtsRutas = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Se obtienen la lista de redes con los recursos asociados strConsulta.Append("SELECT R.IdSistema,R.IdRed,r.IdPrefijo,RE.IdRecurso,RE.TipoRecurso,RE.idEquipos,RE.IdTIFX,RE.Tipo AS rec_tipo,"); strConsulta.Append("RE.Interface,RE.SlotPasarela,RE.NumDispositivoSlot,RE.ServidorSIP,RE.Diffserv,TF.Lado,TF.Modo,TF.IdPrefijo,PR.GananciaAGCTX, PR.GananciaAGCTXdBm,"); strConsulta.Append("PR.GananciaAGCRX, PR.GananciaAGCRXdBm, PR.TamRTP, PR.TipoEM, PR.GrabacionEd137, PR.Codec, PR.SupresionSilencio, "); strConsulta.Append("PR.iTmDetFinLlamada, PR.iTmCallerId, PR.iDetInversionPol, PR.iDetCallerId "); strConsulta.Append("FROM redes R "); strConsulta.Append("LEFT OUTER JOIN recursostf TF ON TF.IdSistema=R.IdSistema AND TF.IdRed=R.IdRed AND TF.TipoRecurso<>0 "); strConsulta.Append("LEFT OUTER JOIN recursos RE ON RE.IdSistema=TF.IdSistema AND RE.IdRecurso=TF.IdRecurso AND RE.TipoRecurso=TF.TipoRecurso "); strConsulta.Append("LEFT OUTER JOIN parametrosrecurso PR ON PR.IdSistema=RE.IdSistema AND PR.IdRecurso=RE.IdRecurso AND PR.TipoRecurso=RE.TipoRecurso "); strConsulta.AppendFormat("WHERE R.IdSistema='{0}' ORDER BY R.idRed,RE.IdRecurso", strIdSistema); dtsRedes = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Se obtienen la lista de destinos LCEN y sus recursos que están asociados a algún Destino ATS en el panel de línea caliente de un sector, cuyo //número de abonado se encuentra dentro de algún rango de las centrales configuradas. strConsulta.Append("SELECT A.IdSistema,A.IdDestino,A.TipoDestino,A.IdPrefijo,E.CENTRAL,R.IdRecurso,R.TipoRecurso,R.idEquipos, "); strConsulta.Append("R.IdTIFX,R.Tipo,R.Interface,R.SlotPasarela,R.NumDispositivoSlot,R.ServidorSIP,IFNULL(CAST(R.Diffserv AS CHAR),'0') AS Diffserv, "); strConsulta.Append("PR.GananciaAGCTX,PR.GananciaAGCTXdBm,PR.GananciaAGCRX,PR.GananciaAGCRXdBm,"); strConsulta.Append("PR.TamRTP, PR.TipoEM,PR.GrabacionEd137, PR.Codec, PR.SupresionSilencio,DE.idsector AS idSector,DE.idDestino AS IdDestinoSector, "); strConsulta.Append("PR.iTmDetFinLlamada, PR.iTmCallerId, PR.iDetInversionPol, PR.iDetCallerId "); strConsulta.Append("FROM destinostelefonia A "); strConsulta.Append("INNER JOIN destinosexternossector DE ON DE.IdSistema=A.IdSistema AND DE.TipoDestino=A.TipoDestino AND "); strConsulta.Append("DE.IdPrefijoDestinoLCEN=A.idPrefijo AND DE.IdDestinoLCEN=A.IdDestino "); strConsulta.Append("INNER JOIN ENCAMINAMIENTOS E ON A.IdSistema=E.IdSistema "); strConsulta.Append("LEFT OUTER JOIN recursoslcen L ON L.IdSistema=A.IdSistema AND L.IdDestino=A.IdDestino AND L.TipoDestino=A.TipoDestino AND L.TipoRecurso=2 "); strConsulta.Append("LEFT OUTER JOIN recursos R ON R.IdSistema=L.IdSistema AND R.IdRecurso=L.IdRecurso AND R.TipoRecurso=L.TipoRecurso AND R.TipoRecurso<>0 "); strConsulta.Append("LEFT OUTER JOIN parametrosrecurso PR ON PR.IdSistema=R.IdSistema AND PR.IdRecurso=R.IdRecurso AND PR.TipoRecurso=R.TipoRecurso "); strConsulta.AppendFormat("WHERE A.IdSistema='{0}' AND A.idprefijo=1 AND ", strIdSistema); strConsulta.Append("EXISTS(SELECT 1 FROM destinosexternos D, RANGOS R "); strConsulta.Append("WHERE D.IdSistema=DE.IdSistema AND D.TipoDestino=DE.TipoDestino AND D.IdPrefijo=DE.IdPrefijo AND D.IdDestino=DE.IdDestino AND DE.IdPrefijo=3 AND "); strConsulta.Append("R.IdSistema=D.IdSistema AND cast(D.IdAbonado as CHAR) BETWEEN CAST(R.inicial AS CHAR) AND CAST(R.final AS CHAR) "); strConsulta.Append("AND E.IdSistema=D.IdSistema AND R.CENTRAL=E.CENTRAL) ORDER BY CENTRAL,idDestino"); dtsDestinosATS = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); if (System.IO.File.Exists(sFicheroReport)) { CRSourceInf.Report.FileName = sFicheroReport; CRSourceInf.ReportDocument.Load(sFicheroReport); TraducirInforme(CRSourceInf.ReportDocument, strIdioma); //Asociamos el datasource if (null != dtst && dtst.Tables.Count > 0) { try { if (null != GetLocalResourceObject("LB_INFORME_EL_ENCAMINA_SUMMARY")) { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = GetLocalResourceObject("LB_INFORME_EL_ENCAMINA_SUMMARY").ToString(); } else { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = "Informe de Configuración de Encaminamientos de Telefonía"; } dtst.Tables[0].TableName = "Encaminamientos"; CRSourceInf.ReportDocument.SetDataSource(dtst); if (CRSourceInf.ReportDocument.Subreports.Count > 0) { for (int i = 0; i < CRSourceInf.ReportDocument.Subreports.Count; i++) { if (CRSourceInf.ReportDocument.Subreports[i] != null) { switch (CRSourceInf.ReportDocument.Subreports[i].Name.ToString()) { case CR_INF_LE_SUBINF_RANGOS: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsRangos != null && dtsRangos.Tables.Count > 0) { dtsRangos.Tables[0].TableName = "Rangos"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsRangos.Tables[0]); } break; case CR_INF_LE_SUBINF_SERVIDORESIP: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsDatosServidoresIP != null && dtsDatosServidoresIP.Tables.Count > 0) { dtsDatosServidoresIP.Tables[0].TableName = "equiposEu_SCVIP"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsDatosServidoresIP.Tables[0]); } break; case CR_INF_LE_SUBINF_RUTAS: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsRutas != null && dtsRutas.Tables.Count > 0) { dtsRutas.Tables[0].TableName = "RutasTroncalesRecursos"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsRutas.Tables[0]); } break; case CR_INF_LE_SUBINF_REDES: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsRedes != null && dtsRedes.Tables.Count > 0) { dtsRedes.Tables[0].TableName = "RedesRecursos"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsRedes.Tables[0]); } break; case CR_INF_LE_SUBINF_DESTINOSLCEN: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsDestinosATS != null && dtsDestinosATS.Tables.Count > 0) { dtsDestinosATS.Tables[0].TableName = "DestinosLCENEncaminamientos"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsDestinosATS.Tables[0]); } break; default: break; } } } } //Se lee el recurso Version LB_VERSION if (null != GetGlobalResourceObject("Espaniol", "LB_VERSION")) { strVersion = GetGlobalResourceObject("Espaniol", "LB_VERSION").ToString(); } //Se pasan los parámetros al informe. Los parámetros se deben pasar siempre después de configurar //los data Sources. Si no se hace así, la ejecución del report falla, indicando que le faltan parámetros CRSourceInf.ReportDocument.SetParameterValue("p_version", strVersion.ToString()); CRSourceInf.ReportDocument.SetParameterValue("p_idEmplazamiento", strNucleo.ToString()); //CRViewerInf.DataBind(); //CRViewerInf.Visible = true; VisualizaInformePdf(); } catch (System.Threading.ThreadAbortException ae) { //ThreadException can happen for internale Response implementation if (dtst != null) { dtst.Clear(); } if (dtsRangos != null) { dtsRangos.Clear(); } if (dtsDatosServidoresIP != null) { dtsDatosServidoresIP.Clear(); } if (dtsRutas != null) { dtsRutas.Clear(); } if (dtsRedes != null) { dtsRedes.Clear(); } if (dtsDestinosATS != null) { dtsDestinosATS.Clear(); } logDebugView.Error(string.Format("Error{0}", ae.Message.ToString())); } catch (Exception ex) { logDebugView.Error(string.Format("Error al ejecutar el informe {0}. Error:{1} ", sFicheroReport, ex.Message.ToString())); } } } else { logDebugView.Error(string.Format("Error al ejecutar el informe {0}: el fichero no existe ", sFicheroReport)); DeshabilitaBotonesExportar(); } } }
protected void Page_Load(object sender, EventArgs e) { //Si no está autentificado se redirige a la pagina de login if (Context.Request.IsAuthenticated) { // retrieve user's identity from httpcontext user FormsIdentity ident = (FormsIdentity)Context.User.Identity; string perfil = ident.Ticket.UserData; //A esta pantalla tienen accesos todos los usuarios menos los operadores if (string.Compare(perfil, "0") == 0) { Response.Redirect("~/Login.aspx", false); return; } } else { Response.Redirect("~/Login.aspx", false); return; } if (!IsPostBack) { StringBuilder strConsulta = new StringBuilder(); string strIdSistema = string.Empty; strVersion = strNucleo = string.Empty; dtst = null; dtsPasarelas = null; dtsEquiposExternos = null; /* * CRViewerInf.DisplayToolbar = true; * CRViewerInf.EnableParameterPrompt = false; * CRViewerInf.EnableDatabaseLogonPrompt = false; * CRViewerInf.Visible = false; * CRViewerInf.HasToggleGroupTreeButton = false; * CRViewerInf.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None; * CRViewerInf.HasToggleParameterPanelButton = false; * CRViewerInf.HasDrilldownTabs = false; //Se oculta la pestaña pagina principal * CRViewerInf.HasExportButton = false; //Se ocultan las opciones de exportacion de la Toolbar * CRViewerInf.HasCrystalLogo = false; //Se oculta el logo de Crystal Reports * CRViewerInf.HasPrintButton = true; //Se oculta la opción de imprimir */ string strIdioma = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName; ServiciosCD40.ServiciosCD40 Servicio = new ServiciosCD40.ServiciosCD40(); //Se obtiene el valor del parámetro Sistema, configurado en el fichero Web.config Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); KeyValueConfigurationElement objConf = config.AppSettings.Settings[CONF_KEY_SISTEMA]; strIdSistema = objConf.Value; bConSafta = false; //Se obtiene el parametro que indica si se debe o no visualizar la posición Sacta objConf = config.AppSettings.Settings[CONF_KEY_CON_SACTA]; if ((objConf != null) && (!string.IsNullOrEmpty(objConf.Value) && string.Compare(objConf.Value, "SI", true) == 0)) { //El sistema está configurado con el sistema SACTA bConSafta = true; } //Obtenemos el Núcleo, que se pasa como parámetro en todos los informes ServiciosCD40.Nucleos tabNucleo = new ServiciosCD40.Nucleos(); tabNucleo.IdSistema = strIdSistema; ServiciosCD40.Tablas[] dTabNucleos = Servicio.ListSelectSQL(tabNucleo); if (null != dTabNucleos && dTabNucleos.Length > 0) { //Nos quedamos con el primer registro, porque en el sistema sólo se puede definir un nucleo strNucleo = ((ServiciosCD40.Nucleos)dTabNucleos[0]).IdNucleo; dTabNucleos = null; //Liberamos la memoria } //Informe de configuración de elementos físicos //sFicheroReport = Server.MapPath(CR_INF_HW_ELEMENTS); sFicheroReport = Server.MapPath("~/Informes/" + CR_INF_HW_ELEMENTS); //Se obtienen los datos a visualizar en cada subinforme //Subinforme de puestos de operador ServiciosCD40.Top tabPuestosOp = new ServiciosCD40.Top(); tabPuestosOp.IdSistema = strIdSistema; dtst = Servicio.DataSetSelectSQL(tabPuestosOp); //Subinforme pasarelas strConsulta.Append("SELECT tifx.IdSistema, tifx.IdTIFX, tifx.ModoArranque, tifx.ModoSincronizacion, tifx.Master, "); strConsulta.Append("tifx.SNMPPortLocal, tifx.SNMPPortRemoto, tifx.SNMPTraps, tifx.SIPPortLocal, "); strConsulta.Append("tifx.TimeSupervision, tifx.IpRed1, tifx.IpRed2, tifx.Grabador1, tifx.Grabador2, "); strConsulta.Append("gwactivas.IpRed AS ipComunicaciones, recursos.IdRecurso, recursos.TipoRecurso, "); strConsulta.Append(" recursos.idEquipos, recursos.Tipo, recursos.Interface, recursos.SlotPasarela, "); strConsulta.Append("recursos.NumDispositivoSlot, recursos.ServidorSIP, recursos.Diffserv, tifx.iSupervLanGW, tifx.itmmaxSupervLanGW "); strConsulta.Append("FROM tifx LEFT OUTER JOIN recursos ON tifx.IdSistema = recursos.IdSistema "); strConsulta.Append("AND tifx.IdTIFX = recursos.IdTIFX LEFT OUTER JOIN "); strConsulta.Append("gwactivas ON tifx.IdSistema = gwactivas.IdSistema AND tifx.IdTIFX = gwactivas.IdTifx "); strConsulta.AppendFormat("AND tifx.IdSistema='{0}'", strIdSistema); dtsPasarelas = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Subinforme Equipos externos strConsulta.Append("SELECT IdSistema, idEquipos, IpRed1, IpRed2, TipoEquipo, Interno, SipPort, IpRed3,"); strConsulta.Append("SrvPresenciaIpRed1, SrvPresenciaIpRed2, SrvPresenciaIpRed3 FROM equiposeu "); strConsulta.Append("WHERE (Min!=-1 AND MAX!=-1)"); dtsEquiposExternos = Servicio.ObtenerDataSet(strConsulta.ToString()); if (System.IO.File.Exists(sFicheroReport)) { CRSourceInf.Report.FileName = sFicheroReport; CRSourceInf.ReportDocument.Load(sFicheroReport); TraducirInforme(CRSourceInf.ReportDocument, strIdioma); //Asociamos el datasource if (null != dtst && dtst.Tables.Count > 0) { try { if (null != GetLocalResourceObject("LB_INFORME_ELEMENTOS_FISICOS_SUMMARY")) { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = GetLocalResourceObject("LB_INFORME_ELEMENTOS_FISICOS_SUMMARY").ToString(); } else { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = "Informe de Configuración de Elementos Físicos"; } //El informe principal tiene tres subreports //Le asignamos los datos if (CRSourceInf.ReportDocument.Subreports.Count > 0) { for (int i = 0; i < CRSourceInf.ReportDocument.Subreports.Count; i++) { if (CRSourceInf.ReportDocument.Subreports[i] != null) { switch (CRSourceInf.ReportDocument.Subreports[i].Name.ToString()) { case CR_INF_HW_ELEMENTS_SUBINF_TO: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtst != null && dtst.Tables.Count > 0) { CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtst.Tables[0]); } break; case CR_INF_HW_ELEMENTS_SUBINF_PASARELAS: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsPasarelas != null && dtsPasarelas.Tables.Count > 0) { dtsPasarelas.Tables[0].TableName = "Pasarelas"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsPasarelas.Tables[0]); } break; case CR_INF_HW_ELEMENTS_SUBINF_EQUIPOS_EXT: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsEquiposExternos != null && dtsEquiposExternos.Tables.Count > 0) { dtsEquiposExternos.Tables[0].TableName = "equiposeu"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsEquiposExternos.Tables[0]); } break; default: break; } } } } //Se leen el recurso Version LB_VERSION if (null != GetGlobalResourceObject("Espaniol", "LB_VERSION")) { strVersion = GetGlobalResourceObject("Espaniol", "LB_VERSION").ToString(); } //Se pasan los parámetros al informe. Los parámetros se deben pasar siempre después de configurar //los data Sources. Si no se hace así, la ejecución del report falla, indicando que le faltan parámetros CRSourceInf.ReportDocument.SetParameterValue("p_version", strVersion.ToString()); CRSourceInf.ReportDocument.SetParameterValue("p_idEmplazamiento", strNucleo.ToString()); CRSourceInf.ReportDocument.SetParameterValue("p_bSAFTA", bConSafta); //CRViewerInf.DataBind(); //CRViewerInf.Visible = true; VisualizaInformePdf(); } catch (System.Threading.ThreadAbortException) { //ThreadException can happen for internale Response implementation if (dtst != null) { dtst.Clear(); } if (dtsPasarelas != null) { dtsPasarelas.Clear(); } if (dtsEquiposExternos != null) { dtsEquiposExternos.Clear(); } } catch (Exception ex) { logDebugView.Error(string.Format("Error al ejecutar el informe {0}. Error:{1} ", sFicheroReport, ex.Message.ToString())); } } } else { logDebugView.Error(string.Format("Error al ejecutar el informe {0}: el fichero no existe ", sFicheroReport)); DeshabilitaBotonesExportar(); } } }
protected void Page_Load(object sender, EventArgs e) { //Si no está autentificado se redirige a la pagina de login if (Context.Request.IsAuthenticated) { // retrieve user's identity from httpcontext user FormsIdentity ident = (FormsIdentity)Context.User.Identity; string perfil = ident.Ticket.UserData; //A esta pantalla solo tienen acceso los usuarios de perfil 3 if (string.Compare(perfil, "0") == 0) { Response.Redirect("~/Login.aspx", false); return; } else if (string.Compare(perfil, "3") != 0) { //solo el usuario con perfil 3 tiene acceso al informe de operadores return; } } else { Response.Redirect("~/Login.aspx", false); return; } if (!IsPostBack) { strVersion = strNucleo = string.Empty; dtst = null; strIdSistema = string.Empty; /* * CRViewerInf.DisplayToolbar = true; * CRViewerInf.EnableParameterPrompt = false; * CRViewerInf.EnableDatabaseLogonPrompt = false; * CRViewerInf.Visible = false; * CRViewerInf.HasToggleGroupTreeButton = false; * CRViewerInf.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None; * CRViewerInf.HasToggleParameterPanelButton = false; * CRViewerInf.HasDrilldownTabs = false; //Se oculta la pestaña pagina principal * CRViewerInf.HasExportButton = false; //Se ocultan las opciones de exportacion de la Toolbar * CRViewerInf.HasCrystalLogo = false; //Se oculta el logo de Crystal Reports * CRViewerInf.HasPrintButton = true; //Se oculta la opción de imprimir */ string strIdioma = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName; ServiciosCD40.ServiciosCD40 Servicio = new ServiciosCD40.ServiciosCD40(); //Se obtiene el valor del parámetro Sistema, configurado en el fichero Web.config Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); KeyValueConfigurationElement objConf = config.AppSettings.Settings[CONF_KEY_SISTEMA]; strIdSistema = objConf.Value; //Obtenemos el Núcleo, que se pasa como parámetro en todos los informes ServiciosCD40.Nucleos tabNucleo = new ServiciosCD40.Nucleos(); tabNucleo.IdSistema = objConf.Value; ServiciosCD40.Tablas[] dTabNucleos = Servicio.ListSelectSQL(tabNucleo); if (null != dTabNucleos && dTabNucleos.Length > 0) { //Nos quedamos con el primer registro, porque en el sistema sólo se puede definir un nucleo strNucleo = ((ServiciosCD40.Nucleos)dTabNucleos[0]).IdNucleo; dTabNucleos = null; //Liberamos la memoria } //El informe de operadores se invoca directamente el árbol de menú //sFicheroReport = Server.MapPath("~/Informes/InfOperadores.rpt"); sFicheroReport = Server.MapPath("~/Informes/" + CR_INF_OPERADORES); //Se obtienen los datos a visualizar en el informe en un dataSet ServiciosCD40.Operadores tabOp = new ServiciosCD40.Operadores(); tabOp.IdSistema = strIdSistema; dtst = Servicio.DataSetSelectSQL(tabOp); if (!string.IsNullOrEmpty(sFicheroReport) && System.IO.File.Exists(sFicheroReport)) { CRSourceInf.Report.FileName = sFicheroReport; CRSourceInf.ReportDocument.Load(sFicheroReport); TraducirInforme(CRSourceInf.ReportDocument, strIdioma); //Asociamos el datasource if (null != dtst && dtst.Tables.Count > 0) { if (null != GetLocalResourceObject("LB_INFORME_OPERADORES")) { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = GetLocalResourceObject("LB_INFORME_OPERADORES").ToString(); } else { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = "Informe de Operadores"; } CRSourceInf.ReportDocument.SetDataSource(dtst.Tables[0].Copy()); //Se leen los recursos Version LB_VERSION if (null != GetGlobalResourceObject("Espaniol", "LB_VERSION")) { strVersion = GetGlobalResourceObject("Espaniol", "LB_VERSION").ToString(); } CRSourceInf.ReportDocument.SetParameterValue("p_version", strVersion.ToString()); CRSourceInf.ReportDocument.SetParameterValue("p_idEmplazamiento", strNucleo.ToString()); //CRViewerInf.DataBind(); //CRViewerInf.Visible = true; VisualizaInformePdf(); } else { logDebugView.Error(string.Format("Error al ejecutar el informe {0}: el fichero no existe ", sFicheroReport)); DeshabilitaBotonesExportar(); } } } }
protected void Page_Load(object sender, EventArgs e) { //Si no está autentificado se redirige a la pagina de login if (Context.Request.IsAuthenticated) { // retrieve user's identity from httpcontext user FormsIdentity ident = (FormsIdentity)Context.User.Identity; string perfil = ident.Ticket.UserData; //A esta pantalla tienen accesos todos los usuarios menos los operadores if (string.Compare(perfil, "0") == 0) { Response.Redirect("~/Login.aspx", false); return; } } else { Response.Redirect("~/Login.aspx", false); return; } if (!IsPostBack) { StringBuilder strConsulta = new StringBuilder(); string strIdSistema = string.Empty; strVersion = strNucleo = string.Empty; dtst = null; dtsRecTlfNoAsignados = null; dtsDestinoAtsConLCEN = null; /* * CRViewerInf.DisplayToolbar = true; * CRViewerInf.EnableParameterPrompt = false; * CRViewerInf.EnableDatabaseLogonPrompt = false; * CRViewerInf.Visible = false; * CRViewerInf.HasToggleGroupTreeButton = false; * CRViewerInf.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None; * CRViewerInf.HasToggleParameterPanelButton = false; * CRViewerInf.HasDrilldownTabs = false; //Se oculta la pestaña pagina principal * CRViewerInf.HasExportButton = false; //Se ocultan las opciones de exportacion de la Toolbar * CRViewerInf.HasCrystalLogo = false; //Se oculta el logo de Crystal Reports * CRViewerInf.HasPrintButton = true; //Se oculta la opción de imprimir */ string strIdioma = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName; ServiciosCD40.ServiciosCD40 Servicio = new ServiciosCD40.ServiciosCD40(); //Se obtiene el valor del parámetro Sistema, configurado en el fichero Web.config Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); KeyValueConfigurationElement objConf = config.AppSettings.Settings[CONF_KEY_SISTEMA]; strIdSistema = objConf.Value; //Obtenemos el Núcleo, que se pasa como parámetro en todos los informes ServiciosCD40.Nucleos tabNucleo = new ServiciosCD40.Nucleos(); tabNucleo.IdSistema = objConf.Value; ServiciosCD40.Tablas[] dTabNucleos = Servicio.ListSelectSQL(tabNucleo); if (null != dTabNucleos && dTabNucleos.Length > 0) { //Nos quedamos con el primer registro, porque en el sistema sólo se puede definir un nucleo strNucleo = ((ServiciosCD40.Nucleos)dTabNucleos[0]).IdNucleo; dTabNucleos = null; //Liberamos la memoria } //Informe de configuración de elementos lógicos sFicheroReport = Server.MapPath("~/Informes/" + CR_INF_LOGICAL_ELEMENTS); //Consulta de obtención de destinos de telefonía y sus recursos asociados strConsulta.Append("SELECT A.IdSistema, A.IdDestino, A.TipoDestino, A.IdGrupo, A.IdPrefijo, B.IdAbonado, C.IdRed, R.IdRecurso, R.TipoRecurso,"); strConsulta.Append("R.idEquipos, R.IdTIFX,R.Tipo, R.Interface, R.SlotPasarela, R.NumDispositivoSlot, R.ServidorSIP, IFNULL(CAST(R.Diffserv AS CHAR),'0') AS Diffserv, T.IdRed AS recIdRed,"); strConsulta.Append(" T.IdTroncal, T.Lado, T.Modo,T.TipoDestino AS rec_tipoDestino, PR.GananciaAGCTX, PR.GananciaAGCTXdBm, PR.GananciaAGCRX,"); strConsulta.Append("PR.GananciaAGCRXdBm, PR.TamRTP, PR.TipoEM,PR.GrabacionEd137, PR.Codec, PR.SupresionSilencio ,0 AS IdDestinoLCEN,NULL AS IdPrefijoDestinoLCEN, NULL AS idSector, L.isuperv_options, L.itm_superv_options, PR.iDetDtmf, PR.iTmLlamEntrante,"); strConsulta.Append("PR.iDetCallerId, PR.iTmCallerId, PR.iDetInversionPol, PR.iTmDetFinLlamada, PR.iPeriodoSpvRing, PR.iFiltroSpvRing, PR.TReleaseBL "); strConsulta.Append("FROM destinostelefonia A "); strConsulta.Append("INNER JOIN destinosexternos B ON A.IdSistema=B.IdSistema AND A.IdDestino=B.IdDestino AND A.TipoDestino=B.TipoDestino "); strConsulta.Append("LEFT OUTER JOIN redes C ON C.IdSistema=A.IdSistema AND C.IdPrefijo=A.IdPrefijo LEFT OUTER JOIN recursostf T ON T.IdSistema=A.IdSistema AND "); strConsulta.Append(" T.IdDestino=A.IdDestino AND T.TipoDestino=A.TipoDestino AND T.TipoRecurso=1 "); strConsulta.Append("LEFT OUTER JOIN recursoslcen L ON L.IdSistema=A.IdSistema AND L.IdDestino=A.IdDestino AND L.TipoDestino=A.TipoDestino AND L.TipoRecurso=2 "); strConsulta.Append("LEFT OUTER JOIN recursos R ON ((R.IdSistema=T.IdSistema AND R.IdRecurso=T.IdRecurso AND R.TipoRecurso=T.TipoRecurso) OR "); strConsulta.Append("(R.IdSistema=L.IdSistema AND R.IdRecurso=L.IdRecurso AND R.TipoRecurso=L.TipoRecurso)) AND R.TipoRecurso<>0 "); strConsulta.Append("LEFT OUTER JOIN parametrosrecurso PR ON PR.IdSistema=R.IdSistema AND PR.IdRecurso=R.IdRecurso AND PR.TipoRecurso=R.TipoRecurso "); strConsulta.AppendFormat("WHERE A.IdSistema='{0}' ", strIdSistema); strConsulta.Append("AND ((A.IdPrefijo IN (1,3) AND "); strConsulta.Append("NOT EXISTS(SELECT 1 FROM destinosexternossector DE "); strConsulta.Append("WHERE DE.IdSistema=A.IdSistema AND (DE.IdPrefijoDestinoLCEN=A.IdPrefijo AND DE.IdDestinoLCEN=A.IdDestino AND A.IdPrefijo=1 AND DE.IdPrefijoDestinoLCEN=1) "); strConsulta.Append("OR (DE.IdDestino=A.IdDestino and de.IdPrefijo=A.IdPrefijo AND DE.IdDestinoLCEN is not null))) "); strConsulta.Append("OR (A.Idprefijo<>1 AND A.Idprefijo<>3) ) "); dtst = Servicio.ObtenerDataSet(strConsulta.ToString()); //Se obtiene la lista de destinos LCEN asociados a los destinos ATS en el panel de línea caliente de algun sector strConsulta.Clear(); strConsulta.Append("SELECT A.IdSistema, A.IdDestino, A.TipoDestino, A.IdGrupo, A.IdPrefijo, B.IdAbonado, C.IdRed, R.IdRecurso, R.TipoRecurso,"); strConsulta.Append("R.idEquipos, R.IdTIFX,R.Tipo, R.Interface, R.SlotPasarela, R.NumDispositivoSlot, R.ServidorSIP, IFNULL(CAST(R.Diffserv AS CHAR),'0') AS Diffserv, C.IdRed AS recIdRed,"); strConsulta.Append(" NULL AS IdTroncal,NULL AS Lado, NULL AS Modo,0 AS rec_tipoDestino, PR.GananciaAGCTX, PR.GananciaAGCTXdBm, PR.GananciaAGCRX,"); strConsulta.Append("PR.GananciaAGCRXdBm, PR.TamRTP, PR.TipoEM,PR.GrabacionEd137, PR.Codec, PR.SupresionSilencio,DE.IdDestinoLCEN AS IdDestinoLCEN,DE.IdPrefijoDestinoLCEN AS IdPrefijoDestinoLCEN, DE.idSector AS idSector, L.isuperv_options, L.itm_superv_options "); strConsulta.Append("FROM destinostelefonia A "); strConsulta.Append("INNER JOIN destinosexternos B ON A.IdSistema=B.IdSistema AND A.IdDestino=B.IdDestino AND A.TipoDestino=B.TipoDestino "); strConsulta.Append("INNER JOIN destinosexternossector DE ON DE.IdSistema=A.IdSistema AND DE.IdDestino=A.IdDestino AND DE.TipoDestino=A.TipoDestino AND DE.idPrefijo=A.idPrefijo AND DE.IdDestinoLCEN IS NOT NULL "); strConsulta.Append("AND DE.IdPrefijoDestinoLCEN IS NOT NULL "); strConsulta.Append("LEFT OUTER JOIN redes C ON C.IdSistema = A.IdSistema AND C.IdPrefijo = A.IdPrefijo "); strConsulta.Append("LEFT OUTER JOIN recursoslcen L ON L.IdSistema=DE.IdSistema AND L.IdDestino=DE.IdDestinoLCEN AND L.TipoDestino=A.TipoDestino AND L.TipoRecurso=2 "); strConsulta.Append(" LEFT OUTER JOIN recursos R ON R.IdSistema=L.IdSistema AND R.IdRecurso=L.IdRecurso AND R.TipoRecurso=L.TipoRecurso AND R.TipoRecurso<>0 "); strConsulta.Append(" LEFT OUTER JOIN parametrosrecurso PR ON PR.IdSistema=R.IdSistema AND PR.IdRecurso=R.IdRecurso AND PR.TipoRecurso=R.TipoRecurso "); strConsulta.AppendFormat(" WHERE A.IdSistema='{0}' AND A.idprefijo=3 ", strIdSistema); dtsDestinoAtsConLCEN = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Consulta de obtención de recursos de telefonía sin destino troncal o red asociado asociado strConsulta.Append("SELECT R.IdRecurso, R.TipoRecurso, R.idEquipos, R.IdTIFX,T.idDestino,L.IDDESTINO AS Lcen_IdDestino,"); strConsulta.Append("R.Tipo, R.Interface, R.SlotPasarela, R.NumDispositivoSlot, R.ServidorSIP, R.Diffserv, T.IdRed AS recIdRed, T.IdTroncal, T.Lado, T.Modo,"); strConsulta.Append("T.TipoDestino AS rec_tipoDestino, PR.GananciaAGCTX, PR.GananciaAGCTXdBm, PR.GananciaAGCRX, PR.GananciaAGCRXdBm, PR.TamRTP, PR.TipoEM,"); strConsulta.Append("PR.GrabacionEd137, PR.Codec, PR.SupresionSilencio, L.isuperv_options, L.itm_superv_options, PR.iDetDtmf, PR.iTmLlamEntrante,"); strConsulta.Append("PR.iDetCallerId, PR.iTmCallerId, PR.iDetInversionPol, PR.iTmDetFinLlamada, PR.iPeriodoSpvRing, PR.iFiltroSpvRing, PR.TReleaseBL "); strConsulta.Append("FROM recursos R "); strConsulta.Append("INNER JOIN parametrosrecurso PR ON PR.IdSistema=R.IdSistema AND PR.IdRecurso=R.IdRecurso AND PR.TipoRecurso=R.TipoRecurso "); strConsulta.Append("LEFT OUTER JOIN recursostf T ON R.IdSistema=T.IdSistema AND R.IdRecurso=T.IdRecurso AND R.TipoRecurso=T.TipoRecurso "); strConsulta.Append("LEFT OUTER JOIN recursoslcen L ON R.IdSistema=L.IdSistema AND R.IdRecurso=L.IdRecurso AND R.TipoRecurso=L.TipoRecurso "); strConsulta.Append("WHERE R.TipoRecurso<>0 AND T.idDestino IS NULL AND L.idDestino IS NULL AND T.IdTroncal IS NULL AND T.IdRed is null "); strConsulta.AppendFormat("AND R.IdSistema='{0}'", strIdSistema); dtsRecTlfNoAsignados = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); if (System.IO.File.Exists(sFicheroReport)) { CRSourceInf.Report.FileName = sFicheroReport; CRSourceInf.ReportDocument.Load(sFicheroReport); TraducirInforme(CRSourceInf.ReportDocument, strIdioma); //Asociamos los datasources if (null != dtst && dtst.Tables.Count > 0) { try { if (null != GetLocalResourceObject("LB_INFORME_ELEMENTOS_LOG_TLF_SUMMARY")) { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = GetLocalResourceObject("LB_INFORME_ELEMENTOS_LOG_TLF_SUMMARY").ToString(); } else { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = "Informe de Configuración de Destinos y Recursos de Telefonía"; } //El informe principal tiene 2 subreports //Le asignamos los datos if (CRSourceInf.ReportDocument.Subreports.Count > 0) { for (int i = 0; i < CRSourceInf.ReportDocument.Subreports.Count; i++) { if (CRSourceInf.ReportDocument.Subreports[i] != null) { switch (CRSourceInf.ReportDocument.Subreports[i].Name.ToString()) { case CR_INF_LE_SUBINF_DEST_TLF: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtst != null && dtst.Tables.Count > 0) { dtst.Tables[0].TableName = "DestinosTlf"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtst); } break; case CR_INF_LE_SUBINF_DESTTLF_ATS_LCEN: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsDestinoAtsConLCEN != null && dtsDestinoAtsConLCEN.Tables.Count > 0) { dtsDestinoAtsConLCEN.Tables[0].TableName = "RecursosTlf"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsDestinoAtsConLCEN.Tables[0]); } break; case CR_INF_LE_SUBINF_RECTLF_NOASIGNADOS: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsRecTlfNoAsignados != null && dtsRecTlfNoAsignados.Tables.Count > 0) { dtsRecTlfNoAsignados.Tables[0].TableName = "RecursosTlf"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsRecTlfNoAsignados.Tables[0]); } break; default: break; } } } } //Se leen el recurso Version LB_VERSION if (null != GetGlobalResourceObject("Espaniol", "LB_VERSION")) { strVersion = GetGlobalResourceObject("Espaniol", "LB_VERSION").ToString(); } //Se pasan los parámetros al informe. Los parámetros se deben pasar siempre después de configurar //los data Sources. Si no se hace así, la ejecución del report falla, indicando que le faltan parámetros CRSourceInf.ReportDocument.SetParameterValue("p_version", strVersion.ToString()); CRSourceInf.ReportDocument.SetParameterValue("p_idEmplazamiento", strNucleo.ToString()); //CRViewerInf.DataBind(); //CRViewerInf.Visible = true; VisualizaInformePdf(); } catch (System.Threading.ThreadAbortException) { //ThreadException can happen for internale Response implementation if (dtst != null) { dtst.Clear(); } if (dtsRecTlfNoAsignados != null) { dtsRecTlfNoAsignados.Clear(); } if (dtsDestinoAtsConLCEN != null) { dtsDestinoAtsConLCEN.Clear(); } } catch (Exception ex) { logDebugView.Error(string.Format("Error al ejecutar el informe {0}. Error:{1} ", sFicheroReport, ex.Message.ToString())); } } } else { logDebugView.Error(string.Format("Error al ejecutar el informe {0}: el fichero no existe ", sFicheroReport)); DeshabilitaBotonesExportar(); } } }
protected new void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); cMsg = (Mensajes.msgBox) this.Master.FindControl("MsgBox1"); if (Context.Request.IsAuthenticated) { // retrieve user's identity from httpcontext user FormsIdentity ident = (FormsIdentity)Context.User.Identity; string perfil = ident.Ticket.UserData; if (perfil == "0") { Response.Redirect("~/Configuracion/Inicio.aspx?Permiso=NO", false); return; } // BtEliminar.Visible = perfil == "3"; PermisoSegunPerfil = (perfil == "3"); //BtModificar.Visible = (Session["Wizard"] != null && (bool)Session["Wizard"]) && PermisoSegunPerfil; //BtEliminar.Visible = (Session["Wizard"] != null && (bool)Session["Wizard"]); } if (CallbackCompletado == null) { CallbackCompletado = new AsyncCallback(OnCallBackCompleted); } if (servicioParaSectorizacion == null) { servicioParaSectorizacion = new ServiciosCD40.ServiciosCD40(); } // servicioParaSectorizacion.NoTransaction(); // Las actuaciones sobre la base de datos se ejecutarán al margen de TransactionTimeOut. if (!IsPostBack) { //logDebugView.Debug("Entrando en Agrupacion...."); BtAceptar_ConfirmButtonExtender.ConfirmText = (string)GetGlobalResourceObject("Espaniol", "AceptarCambios"); BtCancelar_ConfirmButtonExtender.ConfirmText = (string)GetGlobalResourceObject("Espaniol", "CancelarCambios"); IndexListBox1 = -1; MuestraDatos(DameDatos()); ActualizaWebPadre(true); } else { //Si se ha recargado la página, las variables datos y la variable de session tienen valor nulo es porque // si ha cambiado la sesión del servidor, bien por conmutación o reinicio //por lo que se va a la página de login if (datos == null || Session["idsistema"] == null) { ScriptManager.RegisterStartupScript(this, typeof(Page), "redirect", "<Script language = 'Javascript'> window.parent.location='../Login.aspx' ; </Script>", false); } } //else // { //if (Request.Form["eliminaelemento"] == "1")//El usuario elige eliminar el elemento //{ // Request.Form["eliminaelemento"].Replace("1", "0"); // EliminarElemento(); //} //if (Request.Form["cancelparam"] == "1") //El usuario elige no guardar los cambios //{ // Request.Form["cancelparam"].Replace("1", "0"); // CancelarCambios(); //} //if (Request.Form["aceptparam"] == "1") //El usuario elige guardar los cambios //{ // Request.Form["aceptparam"].Replace("1", "0"); // GuardarCambios(); //} //} }
protected void Page_Load(object sender, EventArgs e) { //Si no está autentificado se redirige a la pagina de login if (Context.Request.IsAuthenticated) { // retrieve user's identity from httpcontext user FormsIdentity ident = (FormsIdentity)Context.User.Identity; string perfil = ident.Ticket.UserData; //A esta pantalla tienen accesos todos los usuarios menos los operadores if (string.Compare(perfil, "0") == 0) { Response.Redirect("~/Login.aspx", false); return; } } else { Response.Redirect("~/Login.aspx", false); return; } if (!IsPostBack) { StringBuilder strConsulta = new StringBuilder(); string strIdSistema = string.Empty; strVersion = strNucleo = string.Empty; dtst = null; dtsTabCalidad = null; dtsRecTabCalidad = null; /* * CRViewerInf.DisplayToolbar = true; * CRViewerInf.EnableParameterPrompt = false; * CRViewerInf.EnableDatabaseLogonPrompt = false; * CRViewerInf.Visible = false; * CRViewerInf.HasToggleGroupTreeButton = false; * CRViewerInf.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None; * CRViewerInf.HasToggleParameterPanelButton = false; * CRViewerInf.HasDrilldownTabs = false; //Se oculta la pestaña pagina principal * CRViewerInf.HasExportButton = false; //Se ocultan las opciones de exportacion de la Toolbar * CRViewerInf.HasCrystalLogo = false; //Se oculta el logo de Crystal Reports * CRViewerInf.HasPrintButton = true; //Se oculta la opción de imprimir */ string strIdioma = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName; ServiciosCD40.ServiciosCD40 Servicio = new ServiciosCD40.ServiciosCD40(); //Se obtiene el valor del parámetro Sistema, configurado en el fichero Web.config Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); KeyValueConfigurationElement objConf = config.AppSettings.Settings[CONF_KEY_SISTEMA]; strIdSistema = objConf.Value; //Obtenemos el Núcleo, que se pasa como parámetro en todos los informes ServiciosCD40.Nucleos tabNucleo = new ServiciosCD40.Nucleos(); tabNucleo.IdSistema = objConf.Value; ServiciosCD40.Tablas[] dTabNucleos = Servicio.ListSelectSQL(tabNucleo); if (null != dTabNucleos && dTabNucleos.Length > 0) { //Nos quedamos con el primer registro, porque en el sistema sólo se puede definir un nucleo strNucleo = ((ServiciosCD40.Nucleos)dTabNucleos[0]).IdNucleo; dTabNucleos = null; //Liberamos la memoria } //Se obtiene el nombre del fichero del informe sFicheroReport = Server.MapPath("~/Informes/" + CR_INF_CONVERSION_TAB_CALIDAD); strConsulta.Append("SELECT idtabla_bss, name FROM tabla_bss "); dtst = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Se obtienen los datos a visualizar en cada subinforme //Se recuperan las tablas de calidad configuradas en el sistema strConsulta.Append("SELECT tb.name AS nombre, vt.idvalores_tabla, vt.valor_prop, vt.valor_rssi FROM valores_tabla vt "); strConsulta.Append("INNER JOIN tabla_bss tb ON tb.idtabla_bss = vt.tabla_bss_idtabla_bss ORDER BY nombre, vt.valor_prop "); dtsTabCalidad = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); //Se recuperan los valores de las tablas de calidad radio strConsulta.Append("SELECT tb.idtabla_bss, tb.name AS nombre, vt.idvalores_tabla, vt.valor_prop, vt.valor_rssi FROM valores_tabla vt "); strConsulta.Append("INNER JOIN tabla_bss tb ON tb.idtabla_bss = vt.tabla_bss_idtabla_bss ORDER BY nombre, vt.valor_prop "); dtsTabCalidad = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); strConsulta.Append("SELECT RD.IdSistema, RD.IdRecurso, RD.TipoRecurso, RD.IdDestino, RD.tabla_bss_idtabla_bss,R.idEquipos, B.name, R.IdTIFX, R.SlotPasarela, R.NumDispositivoSlot,RD.BSS "); strConsulta.Append("FROM recursosradio RD "); strConsulta.Append("INNER JOIN recursos R ON R.IdSistema=RD.IdSistema AND R.IdRecurso=RD.IdRecurso AND R.TipoRecurso=RD.TipoRecurso "); strConsulta.Append("INNER JOIN tabla_bss B ON B.idtabla_bss=RD.tabla_bss_idtabla_bss "); strConsulta.AppendFormat("WHERE r.IdSistema='{0}' ORDER BY B.NAME,RD.IdDestino, RD.IdRecurso", strIdSistema); dtsRecTabCalidad = Servicio.ObtenerDataSet(strConsulta.ToString()); strConsulta.Clear(); if (System.IO.File.Exists(sFicheroReport)) { CRSourceInf.Report.FileName = sFicheroReport; CRSourceInf.ReportDocument.Load(sFicheroReport); TraducirInforme(CRSourceInf.ReportDocument, strIdioma); //Se añaden los dataset al informe principal y a los subinformes if (null != dtst && dtst.Tables.Count > 0) { try { if (null != GetLocalResourceObject("LB_INFORME_CONVERSION_TAB_CALIDAD_SUMMARY")) { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = GetLocalResourceObject("LB_INFORME_CONVERSION_TAB_CALIDAD_SUMMARY").ToString(); } else { CRSourceInf.ReportDocument.SummaryInfo.ReportTitle = "Informe de Tablas de Conversión de índices de calidad radio"; } CRSourceInf.ReportDocument.SetDataSource(dtst.Tables[0]); if (CRSourceInf.ReportDocument.Subreports.Count > 0) { for (int i = 0; i < CRSourceInf.ReportDocument.Subreports.Count; i++) { if (CRSourceInf.ReportDocument.Subreports[i] != null) { switch (CRSourceInf.ReportDocument.Subreports[i].Name.ToString()) { case CR_INF_CONVERSION_TAB_CALIDAD_VALORES: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsTabCalidad != null && dtsTabCalidad.Tables.Count > 0) { dtsTabCalidad.Tables[0].TableName = "tabla_bss"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsTabCalidad.Tables[0]); } break; case CR_INF_CONVERSION_TAB_CALIDAD_RECURSOS: TraducirInforme(CRSourceInf.ReportDocument.Subreports[i], strIdioma); if (dtsRecTabCalidad != null && dtsRecTabCalidad.Tables.Count > 0) { dtsRecTabCalidad.Tables[0].TableName = "RecursosRadioTablaBSS"; CRSourceInf.ReportDocument.Subreports[i].SetDataSource(dtsRecTabCalidad.Tables[0]); } break; default: break; } } } } //Se leen el recurso Version LB_VERSION if (null != GetGlobalResourceObject("Espaniol", "LB_VERSION")) { strVersion = GetGlobalResourceObject("Espaniol", "LB_VERSION").ToString(); } //Se pasan los parámetros al informe. Los parámetros se deben pasar siempre después de configurar //los data Sources. Si no se hace así, la ejecución del report falla, indicando que le faltan parámetros CRSourceInf.ReportDocument.SetParameterValue("p_version", strVersion.ToString()); CRSourceInf.ReportDocument.SetParameterValue("p_idEmplazamiento", strNucleo.ToString()); //CRViewerInf.DataBind(); //CRViewerInf.Visible = true; VisualizaInformePdf(); } catch (System.Threading.ThreadAbortException ex) { //ThreadException can happen for internale Response implementation //La visualización del informe en pdf lanza la excepción interna //Se liberan los dataset if (dtst != null) { dtst.Clear(); } if (dtsTabCalidad != null) { dtsTabCalidad.Clear(); } if (dtsRecTabCalidad != null) { dtsRecTabCalidad.Clear(); } } catch (Exception ex) { logDebugView.Error(string.Format("Error al ejecutar el informe {0}. Error:{1} ", sFicheroReport, ex.Message.ToString())); } } } else { logDebugView.Error(string.Format("Error al ejecutar el informe {0}: el fichero no existe ", sFicheroReport)); DeshabilitaBotonesExportar(); } } }