Exemplo n.º 1
0
        protected void rdpFecchaFin_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
        {
            try
            {
                if (rdpFechaInicio.SelectedDate != null && rdpFecchaFin.SelectedDate != null)
                {
                    negocioPaciente = new PacienteNegocio();
                    RadHtmlChartTension.PlotArea.XAxis.DataLabelsField = "Fecha";
                    RadHtmlChartTension.PlotArea.Series[0].DataFieldY  = "valor1";
                    RadHtmlChartTension.PlotArea.Series[1].DataFieldY  = "valor2";
                    RadHtmlChartTension.DataSource = negocioPaciente.ConsultaGraficaFiltroFechas(Convert.ToInt16(Request.QueryString["idTipoIdentificacion"]), Request.QueryString["NumeroIdentifacion"], Constantes.TIPOEVENTOTENSION, Convert.ToDateTime(rdpFechaInicio.SelectedDate), Convert.ToDateTime(rdpFecchaFin.SelectedDate));
                    RadHtmlChartTension.DataBind();

                    PlotBand xAxisPlotBand = new PlotBand();
                    xAxisPlotBand.From  = (decimal?)Convert.ToInt16(Request.QueryString["limiteInferiorSistolica"]);
                    xAxisPlotBand.To    = (decimal?)Convert.ToInt16(Request.QueryString["limiteSuperiorSistolica"]);
                    xAxisPlotBand.Color = System.Drawing.ColorTranslator.FromHtml("#6453FD");
                    xAxisPlotBand.Alpha = (byte)190;
                    RadHtmlChartTension.PlotArea.YAxis.PlotBands.Add(xAxisPlotBand);

                    PlotBand xAxisPlotBand2 = new PlotBand();
                    xAxisPlotBand2.From  = (decimal?)Convert.ToInt16(Request.QueryString["limiteSuperiorDiastolica"]);
                    xAxisPlotBand2.To    = (decimal?)Convert.ToInt16(Request.QueryString["limiteInferiorDiastolica"]);
                    xAxisPlotBand2.Color = System.Drawing.ColorTranslator.FromHtml("#FC6969");
                    xAxisPlotBand2.Alpha = (byte)190;
                    RadHtmlChartTension.PlotArea.YAxis.PlotBands.Add(xAxisPlotBand2);
                }
            }
            catch (Exception ex)
            {
                RadNotificationMensajes.Show(ex.Message);
            }
        }
Exemplo n.º 2
0
        private void CargarGraficaTension()
        {
            try
            {
                negocioPaciente = new PacienteNegocio();
                RadHtmlChartTension.DataSource = negocioPaciente.ConsultaGraficaTension(Convert.ToInt16(Request.QueryString["idTipoIdentificacion"]), Request.QueryString["NumeroIdentifacion"], Constantes.TIPOEVENTOTENSION);
                RadHtmlChartTension.DataBind();
                RadHtmlChartTension.PlotArea.XAxis.DataLabelsField = "fechaEvento";
                RadHtmlChartTension.PlotArea.XAxis.LabelsAppearance.RotationAngle = 90;

                PlotBand xAxisPlotBand = new PlotBand();
                xAxisPlotBand.From  = (decimal?)Convert.ToInt16(Request.QueryString["limiteInferiorSistolica"]);
                xAxisPlotBand.To    = (decimal?)Convert.ToInt16(Request.QueryString["limiteSuperiorSistolica"]);
                xAxisPlotBand.Color = System.Drawing.ColorTranslator.FromHtml("#6453FD");
                xAxisPlotBand.Alpha = (byte)190;
                RadHtmlChartTension.PlotArea.YAxis.PlotBands.Add(xAxisPlotBand);

                PlotBand xAxisPlotBand2 = new PlotBand();
                xAxisPlotBand2.From  = (decimal?)Convert.ToInt16(Request.QueryString["limiteSuperiorDiastolica"]);
                xAxisPlotBand2.To    = (decimal?)Convert.ToInt16(Request.QueryString["limiteInferiorDiastolica"]);
                xAxisPlotBand2.Color = System.Drawing.ColorTranslator.FromHtml("#FC6969");
                xAxisPlotBand2.Alpha = (byte)190;
                RadHtmlChartTension.PlotArea.YAxis.PlotBands.Add(xAxisPlotBand2);
            }
            catch (Exception ex)
            {
                RadNotificationMensajes.Show(ex.Message);
            }
        }