protected void Page_Load(object sender, EventArgs e)
        {
            ClManejoImpresion = new Cl_Manejo_Impresion();
            ClUtilitarios     = new Cl_Utilitarios();

            int AsignacionId = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["identificateur"].ToString()), true));
            int RegionId     = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["idnoiger"].ToString()), true));
            int SubRegionId  = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["sousnoigerid"].ToString()), true));

            DataSet Ds_Solicitud = ClManejoImpresion.Impresion_Solicitud(AsignacionId, RegionId, SubRegionId);

            Reporte.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
            Reporte.SetDataSource(Ds_Solicitud);
            string NomReporte = NomReporte = Guid.NewGuid().ToString() + ".pdf";
            string url        = Server.MapPath(".") + @"\" + DirRep + NomReporte;
            DiskFileDestinationOptions options2 = new DiskFileDestinationOptions
            {
                DiskFileName = url
            };
            ExportOptions exportOptions = Reporte.ExportOptions;

            exportOptions.ExportDestinationType    = ExportDestinationType.DiskFile;
            exportOptions.ExportFormatType         = ExportFormatType.PortableDocFormat;
            exportOptions.ExportDestinationOptions = options2;
            Reporte.Export();
            url = DirApp + DirRepLong + NomReporte;
            base.Response.Redirect(url);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ClManejoImpresion = new Cl_Manejo_Impresion();
            ClUtilitarios     = new Cl_Utilitarios();

            int AsignacionId = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["identificateur"].ToString()), true));
            int RegionId     = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["idnoiger"].ToString()), true));
            int SubRegionId  = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["sousnoigerid"].ToString()), true));

            DataSet Ds_Solicitud = ClManejoImpresion.Impresion_Solicitud(AsignacionId, RegionId, SubRegionId);
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUtilitarios     = new Cl_Utilitarios();
            ClManejo          = new Cl_Manejo();
            ClPoligono        = new Cl_Poligono();
            ClManejoImpresion = new Cl_Manejo_Impresion();

            DataTable  DtAnexosCroquis    = DsAnexos.Tables.Add("AnexoCroquis");
            DataColumn NombreAnexoCroquis = DtAnexosCroquis.Columns.Add("NombreAnexoCroquis", typeof(string));
            DataColumn PathAnexoCroquis   = DtAnexosCroquis.Columns.Add("PathAnexoCroquis", typeof(string));


            DataTable  DtAnexosMapaUsoActual    = DsAnexos.Tables.Add("AnexoUsoActual");
            DataColumn NombreAnexoMapaUsoActual = DtAnexosMapaUsoActual.Columns.Add("NombreAnexoMapaUsoActual", typeof(string));
            DataColumn PathAnexoMapaUsoActual   = DtAnexosMapaUsoActual.Columns.Add("PathAnexoMapaUsoActual", typeof(string));

            DataTable  DtAnexosMapaPendintes    = DsAnexos.Tables.Add("AnexoMapaPendiente");
            DataColumn NombreAnexoMapaPendiente = DtAnexosMapaPendintes.Columns.Add("NombreAnexoMapaPendiente", typeof(string));
            DataColumn PathAnexoMapaPendiente   = DtAnexosMapaPendintes.Columns.Add("PathAnexoMapaPendiente", typeof(string));

            DataTable  DtAnexosMapaUbicacion    = DsAnexos.Tables.Add("AnexoMapaUbicacion");
            DataColumn NombreAnexoMapaUbicacion = DtAnexosMapaUbicacion.Columns.Add("NombreAnexoMapaUbicacion", typeof(string));
            DataColumn PathAnexoMapaUbicacion   = DtAnexosMapaUbicacion.Columns.Add("PathAnexoMapaUbicacion", typeof(string));

            DataTable  DtAnexosMapaRonda    = DsAnexos.Tables.Add("AnexoMapaRonda");
            DataColumn NombreAnexoMapaRonda = DtAnexosMapaRonda.Columns.Add("NombreAnexoMapaRonda", typeof(string));
            DataColumn PathAnexoMapaRonda   = DtAnexosMapaRonda.Columns.Add("PathAnexoMapaRonda", typeof(string));

            GrdAnexoCroquia.NeedDataSource       += GrdAnexoCroquia_NeedDataSource;
            GrdAnexoMapaUsoActual.NeedDataSource += GrdAnexoMapaUsoActual_NeedDataSource;
            GrdAnexoMapaPendiente.NeedDataSource += GrdAnexoMapaPendiente_NeedDataSource;
            GrdAnexoMapaUbicacion.NeedDataSource += GrdAnexoMapaUbicacion_NeedDataSource;
            GrdInmueblePol.NeedDataSource        += GrdInmueblePol_NeedDataSource;
            GrdAnexoMapaRonda.NeedDataSource     += GrdAnexoMapaRonda_NeedDataSource;
            GrdAnexoCroquia.ItemCommand          += GrdAnexoCroquia_ItemCommand;
            GrdAnexoMapaUsoActual.ItemCommand    += GrdAnexoMapaUsoActual_ItemCommand;
            GrdAnexoMapaPendiente.ItemCommand    += GrdAnexoMapaPendiente_ItemCommand;
            GrdAnexoMapaUbicacion.ItemCommand    += GrdAnexoMapaUbicacion_ItemCommand;
            GrdAnexoMapaRonda.ItemCommand        += GrdAnexoMapaRonda_ItemCommand;
            GrdInmueblePol.ItemCommand           += GrdInmueblePol_ItemCommand;
            TxtId.Text  = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["idgestion"].ToString()), true);
            LblNug.Text = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["NUG"].ToString()), true);
            if (Request.QueryString["typpe"] == null)
            {
                TxtTipo.Text = "2";
            }
            else
            {
                TxtTipo.Text = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["typpe"].ToString()), true);
            }

            ImgPolRepoblacion.Click += ImgPolRepoblacion_Click;
            ImgPrintCenso.Click     += ImgPrintCenso_Click;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ClManejoImpresion = new Cl_Manejo_Impresion();
            ClUtilitarios = new Cl_Utilitarios();

            Reporte.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
            int Id = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["identificateur"].ToString()), true));
            int Origen = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["source"].ToString()), true));
            int SubCategoria = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["souscategorie"].ToString()), true));
            DataSet ReportePrincipal = ClManejoImpresion.Impresion_PlanManejo(Id, Origen, SubCategoria);
            Reporte.SetDataSource(ReportePrincipal);

            
            if (Origen == 1)
            {
                
                string AsignacionId = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["identificateur"].ToString()), true);
                DataSet SubReportes = ClManejoImpresion.VistaPrevia_PlanManejo(Convert.ToInt32(AsignacionId), Origen);
                Reporte.Subreports[0].SetDataSource(SubReportes);
                Reporte.Subreports[1].SetDataSource(SubReportes);
                Reporte.Subreports[2].SetDataSource(SubReportes);
                Reporte.Subreports[3].SetDataSource(SubReportes);
                Reporte.Subreports[4].SetDataSource(SubReportes);
                Reporte.Subreports[5].SetDataSource(SubReportes);
                Reporte.Subreports[6].SetDataSource(SubReportes);
                Reporte.Subreports[7].SetDataSource(SubReportes);
                Reporte.Subreports[8].SetDataSource(SubReportes);
                Reporte.Subreports[9].SetDataSource(SubReportes);
                Reporte.Subreports[10].SetDataSource(SubReportes);
                Reporte.Subreports[11].SetDataSource(SubReportes);
                Reporte.Subreports[12].SetDataSource(SubReportes);
                Reporte.Subreports[13].SetDataSource(SubReportes);
                Reporte.Subreports[14].SetDataSource(SubReportes);
                Reporte.Subreports[15].SetDataSource(SubReportes);
                Reporte.Subreports[16].SetDataSource(SubReportes);
                Reporte.Subreports[17].SetDataSource(SubReportes);
                Reporte.Subreports[18].SetDataSource(SubReportes);
                Reporte.Subreports[19].SetDataSource(SubReportes);
                Reporte.Subreports[20].SetDataSource(SubReportes);
                Reporte.Subreports[21].SetDataSource(SubReportes);
                Reporte.Subreports[22].SetDataSource(SubReportes);
                Reporte.Subreports[23].SetDataSource(SubReportes);
            }
            else
            {
                string GestionId = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["identificateur"].ToString()), true);
                DataSet SubReportes = ClManejoImpresion.VistaPrevia_PlanManejo(Convert.ToInt32(GestionId), Origen);
                Reporte.Subreports[0].SetDataSource(SubReportes);
                Reporte.Subreports[1].SetDataSource(SubReportes);
                Reporte.Subreports[2].SetDataSource(SubReportes);
                Reporte.Subreports[3].SetDataSource(SubReportes);
                Reporte.Subreports[4].SetDataSource(SubReportes);
                Reporte.Subreports[5].SetDataSource(SubReportes);
                Reporte.Subreports[6].SetDataSource(SubReportes);
                Reporte.Subreports[7].SetDataSource(SubReportes);
                Reporte.Subreports[8].SetDataSource(SubReportes);
                Reporte.Subreports[9].SetDataSource(SubReportes);
                Reporte.Subreports[10].SetDataSource(SubReportes);
                Reporte.Subreports[11].SetDataSource(SubReportes);
                Reporte.Subreports[12].SetDataSource(SubReportes);
                Reporte.Subreports[13].SetDataSource(SubReportes);
                Reporte.Subreports[14].SetDataSource(SubReportes);
                Reporte.Subreports[15].SetDataSource(SubReportes);
                Reporte.Subreports[16].SetDataSource(SubReportes);
                Reporte.Subreports[17].SetDataSource(SubReportes);
                Reporte.Subreports[18].SetDataSource(SubReportes);
                Reporte.Subreports[19].SetDataSource(SubReportes);
                Reporte.Subreports[20].SetDataSource(SubReportes);
                Reporte.Subreports[21].SetDataSource(SubReportes);
                Reporte.Subreports[22].SetDataSource(SubReportes);
                Reporte.Subreports[23].SetDataSource(SubReportes);
            }

            string NomReporte = NomReporte = Guid.NewGuid().ToString() + ".pdf";
            string url = Server.MapPath(".") + @"\" + DirRep + NomReporte;
            DiskFileDestinationOptions options2 = new DiskFileDestinationOptions
            {
                DiskFileName = url
            };
            ExportOptions exportOptions = Reporte.ExportOptions;
            exportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
            exportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
            exportOptions.ExportDestinationOptions = options2;
            Reporte.Export();
            url = DirApp + DirRepLong + NomReporte;
            base.Response.Redirect(url);
        }