Beispiel #1
0
        public string SetBoardConfigs()
        {
            List <Pboard>   list        = new List <Pboard>();
            Pboard          pboard      = new Pboard();
            BoardConfig     boardConfig = new BoardConfig();
            List <PlotBand> bands       = new List <PlotBand>();
            PlotBand        plotBand    = new PlotBand();

            plotBand.From  = -20;
            plotBand.To    = 120;
            plotBand.Color = "#55BF3B";
            bands.Add(plotBand);
            boardConfig.Min       = -20;
            boardConfig.Max       = 200;
            boardConfig.Title     = "℃";
            boardConfig.PlotBands = bands;
            pboard.Name           = "thermograph";
            pboard.Config         = boardConfig;
            list.Add(pboard);

            using (StringWriter sw = new StringWriter())
            {
                XmlSerializer serializer = new XmlSerializer(typeof(List <Pboard>));
                serializer.Serialize(sw, list);
                sw.Close();
                string str = sw.ToString();

                return(str);
            }
        }
 protected void cboRangoGlucosa_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
 {
     try
     {
         if (cboRangoGlucosa.SelectedValue != null && rdpFechaInicioGlucosa.SelectedDate != null && rdpFechaFinGlucosa.SelectedDate != null)
         {
             negocioPaciente = new PacienteNegocio();
             RadHtmlChartTalla.PlotArea.XAxis.DataLabelsField = "Fecha";
             RadHtmlChartTalla.PlotArea.Series[0].DataFieldY  = "valor1";
             RadHtmlChartTalla.PlotArea.Series[1].DataFieldY  = "valor2";
             RadHtmlChartTalla.DataSource = negocioPaciente.ConsultaGraficaFiltroHora(Convert.ToInt16(Request.QueryString["idTipoIdentificacion"]), Request.QueryString["NumeroIdentifacion"], Constantes.TIPOEVENTOGLUCOSA, Convert.ToDateTime(rdpFechaInicioGlucosa.SelectedDate), Convert.ToDateTime(rdpFechaFinGlucosa.SelectedDate), cboRangoGlucosa.SelectedValue);
             RadHtmlChartTalla.DataBind();
             PlotBand xAxisPlotBand = new PlotBand();
             xAxisPlotBand.From  = (decimal?)Convert.ToInt16(Request.QueryString["limiteInferiorGlucosa"]);
             xAxisPlotBand.To    = (decimal?)Convert.ToInt16(Request.QueryString["limiteSuperiorGlucosa"]);
             xAxisPlotBand.Color = System.Drawing.ColorTranslator.FromHtml("#e83737");
             xAxisPlotBand.Alpha = (byte)190;
             RadHtmlChartTalla.PlotArea.YAxis.PlotBands.Add(xAxisPlotBand);
         }
         else
         {
             RadNotificationMensajes.Show("Por favor escoger primero el rango de fechas");
         }
     }
     catch (Exception ex)
     {
         RadNotificationMensajes.Show(ex.Message);
     }
 }
        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);
            }
        }
        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);
            }
        }