Ejemplo n.º 1
0
        private void Test1_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.Report rpt = (Telerik.Reporting.Processing.Report)sender;
            int             c              = rpt.Parameters.Count;
            int             tipoId         = Convert.ToInt32(rpt.Parameters["pTipoId"].Value);
            int             instalacionId  = Convert.ToInt32(rpt.Parameters["pInstalacionId"].Value);
            DateTime        desdeFecha     = Convert.ToDateTime(rpt.Parameters["pDesdeFecha"].Value);
            DateTime        hastaFecha     = Convert.ToDateTime(rpt.Parameters["pHastaFecha"].Value);
            LainsaSci       ctx            = new LainsaSci("LainsaSciCTX");
            Instalacion     instalacion    = CntLainsaSci.GetInstalacion(instalacionId, ctx);
            TipoDispositivo tipo           = CntLainsaSci.GetTipoDispositivo(tipoId, ctx);
            IList <ResTipoPlantillaView> l = null;

            if (instalacion != null)
            {
                if (tipo != null)
                {
                    l = CntInforme.GetTipoPlantillaViews(
                        desdeFecha,
                        hastaFecha,
                        instalacion,
                        tipo,
                        ctx);
                }
                else
                {
                    l = CntInforme.GetTipoPlantillaViews(
                        desdeFecha,
                        hastaFecha,
                        instalacion,
                        ctx);
                }
            }
            else
            {
                textBox1.Value = "Revisiones por instalación";
                l = CntInforme.GetTipoPlantillaViews(
                    desdeFecha,
                    hastaFecha,
                    tipo,
                    ctx);
            }


            if (l.Count == 0)
            {
                rpt.Visible = false;
            }
            else
            {
                rpt.DataSource = l;
                MontaGrafico(l);
            }
        }
Ejemplo n.º 2
0
        private void LoadDataSource()
        {
            int       pInstalacionId = (int)this.ReportParameters["pInstalacionId"].Value;
            DateTime  dFecha         = (DateTime)this.ReportParameters["pDesdeFecha"].Value;
            DateTime  hFecha         = (DateTime)this.ReportParameters["pHastaFecha"].Value;
            LainsaSci ctx            = new LainsaSci();

            this.DataSource = CntInforme.GetTipoPlantillaViews(
                dFecha,
                hFecha,
                CntLainsaSci.GetInstalacion(pInstalacionId, ctx),
                ctx);
        }
Ejemplo n.º 3
0
        private void Test1_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.Report rpt = (Telerik.Reporting.Processing.Report)sender;
            int       c             = rpt.Parameters.Count;
            int       instalacionId = Convert.ToInt32(rpt.Parameters["pInstalacionId"].Value);
            DateTime  desdeFecha    = Convert.ToDateTime(rpt.Parameters["pDesdeFecha"].Value);
            DateTime  hastaFecha    = Convert.ToDateTime(rpt.Parameters["pHastaFecha"].Value);
            LainsaSci ctx           = new LainsaSci("LainsaSciCTX");

            rpt.DataSource = CntInforme.GetTipoPlantillaViews(
                desdeFecha,
                hastaFecha,
                CntLainsaSci.GetInstalacion(instalacionId, ctx),
                ctx);
        }
Ejemplo n.º 4
0
        private void RptTipoPlantillaChart_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.Report rpt = (Telerik.Reporting.Processing.Report)sender;
            int       c                    = rpt.Parameters.Count;
            int       instalacionId        = Convert.ToInt32(rpt.Parameters["pInstalacionId"].Value);
            DateTime  desdeFecha           = Convert.ToDateTime(rpt.Parameters["pDesdeFecha"].Value);
            DateTime  hastaFecha           = Convert.ToDateTime(rpt.Parameters["pHastaFecha"].Value);
            LainsaSci ctx                  = new LainsaSci("LainsaSciCTX");
            IList <ResTipoPlantillaView> l = CntInforme.GetTipoPlantillaViews(
                desdeFecha,
                hastaFecha,
                CntLainsaSci.GetInstalacion(instalacionId, ctx),
                ctx);

            if (l.Count == 0)
            {
                rpt.Visible = false;
            }
            else
            {
                MontaCarta(l);
            }
        }