diff --git a/Business/Business.csproj b/Business/Business.csproj
index 49f7a4f2..1e4ed3e8 100644
--- a/Business/Business.csproj
+++ b/Business/Business.csproj
@@ -313,6 +313,8 @@
Code
+
+
diff --git a/Business/Data/Laboratorio/HojaTrabajo.cs b/Business/Data/Laboratorio/HojaTrabajo.cs
index 8df32f87..c05d6b43 100644
--- a/Business/Data/Laboratorio/HojaTrabajo.cs
+++ b/Business/Data/Laboratorio/HojaTrabajo.cs
@@ -538,7 +538,7 @@ public bool IsChanged
public DataTable GetDataSet_HojaTrabajoPreeliminar()
{
-
+ // 'XX/XX/XXXX' AS fecha ==> CONVERT(varchar(10), GETDATE(), 103) AS fecha ; para evitar error de la formula 'CDate({ht.fecha})'
string m_strSQL = @" with lineas as (
select "+ this.IdHojaTrabajo.ToString()+ @" as idhojatrabajo, '01' as linea, 'p' as pac
union
@@ -575,7 +575,7 @@ public DataTable GetDataSet_HojaTrabajoPreeliminar()
SELECT TOP (100) PERCENT 'A' as letra, linea AS numero, '' as numeroOrigen,'___' as cantidad, HT.idHojaTrabajo,
CASE WHEN HT.imprimirPrioridad = 1 THEN 'R' ELSE '' END AS prioridad, '0' as antecedente ,
CASE WHEN HT.imprimirorigen = 1 THEN '-A' ELSE '' END AS origen, CHT.textoImprimir AS item, A.nombre AS area,
- CHT.idDetalleHojaTrabajo AS ORDEN, 'XX/XX/XXXX' AS fecha, HT.responsable, HT.codigo AS codigoHT,
+ CHT.idDetalleHojaTrabajo AS ORDEN, CONVERT(varchar(10), GETDATE(), 103) AS fecha, HT.responsable, HT.codigo AS codigoHT,
CASE WHEN HT.imprimirApellidoNombre = 1 THEN '-Paciente' ELSE '' END +
CASE WHEN HT.imprimirDiagnostico = 1 then '-Diag' else '' end AS paciente,
CASE WHEN HT.imprimirEdad = 1 THEN '-0' ELSE '' END AS edad, CASE WHEN HT.imprimirSexo = 1 THEN '-F' ELSE '' END AS sexo,
diff --git a/WebLab/Estadisticas/Grafico.aspx.cs b/WebLab/Estadisticas/Grafico.aspx.cs
index d468e66c..50fb75bb 100644
--- a/WebLab/Estadisticas/Grafico.aspx.cs
+++ b/WebLab/Estadisticas/Grafico.aspx.cs
@@ -5,7 +5,6 @@
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
-using InfoSoftGlobal;
using System.Web.Script.Serialization;
namespace WebLab.Estadisticas
diff --git a/WebLab/Estadisticas/GraficoChart.ascx b/WebLab/Estadisticas/GraficoChart.ascx
index 5566edec..87acd217 100644
--- a/WebLab/Estadisticas/GraficoChart.ascx
+++ b/WebLab/Estadisticas/GraficoChart.ascx
@@ -1,7 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GraficoChart.ascx.cs" Inherits="WebLab.Estadisticas.GraficoChart" %>
-
-
+
diff --git a/WebLab/Estadisticas/GraficoChart.ascx.cs b/WebLab/Estadisticas/GraficoChart.ascx.cs
index 279c022f..f10ea3e3 100644
--- a/WebLab/Estadisticas/GraficoChart.ascx.cs
+++ b/WebLab/Estadisticas/GraficoChart.ascx.cs
@@ -1,4 +1,8 @@
using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Script.Serialization;
using System.Web.UI;
namespace WebLab.Estadisticas
@@ -41,5 +45,58 @@ public partial class GraficoChart : System.Web.UI.UserControl
///
///
public string tituloY { get; set; } //titulo de eje Y
+ ///
+ /// Controla si se muestran los labels en la leyenda (true por defecto)
+ ///
+ public string MostrarLabels { get; set; }
+
+ /*
+ * ASP.NET WebForms está llamando al Render del control dos veces durante
+ * el ciclo de vida de la página(algo común con master pages, dependiendo
+ * de cómo se estructura el árbol de controles). *
+ */
+
+ ///
+ /// Banderas para que se ejecute una sola vez DecodeLabels
+ ///
+ private string labelsDecodificadas;
+ private bool seDecodificaronLabels;
+
+ ///
+ /// DecodeLabels: Retorna LabelsJson con entidades HTML decodificadas si MostrarLabels es true
+ /// Ej: Si recibo "Orina, obtención desconocido" lo transformo a "Orina, obtención desconocido"
+ ///
+ public string LabelsJsonDecoded
+ {
+ get
+ {
+ if (!seDecodificaronLabels)
+ {
+ labelsDecodificadas = DecodeLabels();
+ seDecodificaronLabels = true;
+ }
+ return labelsDecodificadas;
+ }
+ }
+
+ private string DecodeLabels()
+ {
+ if (!string.IsNullOrEmpty(LabelsJson))
+ {
+ bool mostrar = string.IsNullOrEmpty(MostrarLabels) ||
+ MostrarLabels.Equals("true", StringComparison.OrdinalIgnoreCase);
+ if (mostrar)
+ {
+ var js = new JavaScriptSerializer();
+ var labels = js.Deserialize>(LabelsJson);
+ if (labels != null)
+ {
+ labels = labels.Select(l => HttpUtility.HtmlDecode(l)).ToList();
+ return js.Serialize(labels);
+ }
+ }
+ }
+ return LabelsJson;
+ }
}
}
diff --git a/WebLab/Estadisticas/Reporte.aspx b/WebLab/Estadisticas/Reporte.aspx
index b719f236..f0f0ffea 100644
--- a/WebLab/Estadisticas/Reporte.aspx
+++ b/WebLab/Estadisticas/Reporte.aspx
@@ -42,14 +42,25 @@
>Descargar Detalle Por Determinacion--%>
-