protected void Page_Load(object sender, EventArgs e)
        {
            ClPersona     = new Cl_Persona();
            ClUtilitarios = new Cl_Utilitarios();
            System.Web.UI.HtmlControls.HtmlGenericControl sidvar;
            sidvar         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("MenuAdm");
            sidvar.Visible = false;

            System.Web.UI.WebControls.Label lblUsuario;
            lblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
            lblUsuario.Text = "Usuario Creado";

            System.Web.UI.WebControls.Label LblTipoUsuario;
            LblTipoUsuario         = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
            LblTipoUsuario.Visible = false;

            System.Web.UI.HtmlControls.HtmlGenericControl lines;
            lines         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("lines");
            lines.Visible = false;

            System.Web.UI.HtmlControls.HtmlGenericControl Notif;
            Notif         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("Notif");
            Notif.Visible = false;

            System.Web.UI.HtmlControls.HtmlImage ImgPerfil;
            ImgPerfil         = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
            ImgPerfil.Src     = "../imagenes/User_Ok.png";
            ImgPerfil.Visible = true;

            if (!IsPostBack)
            {
                Mensaje.Text = "Estimado(a): " + ClPersona.Nombre_Usuario(Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["appel"].ToString()), true))) + " tenemos el agrado de informarle que su usuario para ingresar al Sistema Electrónico de Gestión Forestal -SEGEFOR- fue creado con éxito en breve estará recibiendo en su correo electrónico sus datos de ingreso al sistema.";
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClTraductor   = new Cl_Traductor();
            ClCatalogos   = new Cl_Catalogos();
            ClUtilitarios = new Cl_Utilitarios();
            ClClinica     = new Cl_Clinica();
            ClUsuario     = new Cl_Usuario();

            ImageButton ImgEng;

            ImgEng        = (ImageButton)Master.FindControl("ImgEng");
            ImgEng.Click += ImgEng_Click;

            ImageButton ImgEsp;

            ImgEsp        = (ImageButton)Master.FindControl("ImgEsp");
            ImgEsp.Click += ImgEsp_Click;
            CboPais.SelectedIndexChanged         += CboPais_SelectedIndexChanged;
            CboDepartamento.SelectedIndexChanged += CboDepartamento_SelectedIndexChanged;
            BtnGrabar.Click           += BtnGrabar_Click;
            GrdDetalle.NeedDataSource += GrdDetalle_NeedDataSource;
            GrdDetalle.ItemCommand    += GrdDetalle_ItemCommand;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                Traduce();
                ValidaGrabar();
            }
        }
        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)
        {
            ClGestion     = new Cl_Gestion_Registro();
            ClUtilitarios = new Cl_Utilitarios();
            DataSet Ds_ConstanciaRRF = new DataSet();

            Ds_ConstanciaRRF = ((DataSet)Session["DatosConstanciaRRF"]);

            Reporte.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
            Reporte.SetDataSource(Ds_ConstanciaRRF);
            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);
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();
            ClGestion     = new Cl_Gestion_Registro();
            ClManejo      = new Cl_Manejo();
            ClCatalogos   = new Cl_Catalogos();

            GrdSolicitudes.ItemDataBound     += GrdSolicitudes_ItemDataBound;
            GrdSolicitudes.NeedDataSource    += GrdSolicitudes_NeedDataSource;
            GrdSolicitudes.ItemCommand       += GrdSolicitudes_ItemCommand;
            GrdDetalle.ItemCommand           += GrdDetalle_ItemCommand;
            GrdDetalle.NeedDataSource        += GrdDetalle_NeedDataSource;
            BtnBuscar.ServerClick            += BtnBuscar_ServerClick;
            GrdManejoForestal.NeedDataSource += GrdManejoForestal_NeedDataSource;
            GrdManejoForestal.ItemDataBound  += GrdManejoForestal_ItemDataBound;
            GrdManejoForestal.ItemCommand    += GrdManejoForestal_ItemCommand;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                ClUsuario.Insertar_Ingreso_Pagina(8, Convert.ToInt32(Session["UsuarioId"]), ClUsuario.CorrId_IngresoPagina());
                ClUtilitarios.Permisos(Master, Convert.ToInt32(Session["UsuarioId"]));
                System.Web.UI.WebControls.Label LblPerfil;
                LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                LblPerfil.Text = ClUsuario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                System.Web.UI.WebControls.Label LblUsuario;
                LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));

                System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                System.Web.UI.WebControls.Image      ImgPerfil;
                ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");
                if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                {
                    ImgPerfilFake.Visible = false;
                    ImgPerfil.Visible     = true;
                }
                else
                {
                    ImgPerfilFake.Visible = true;
                    ImgPerfil.Visible     = false;
                    if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                    {
                        ImgPerfilFake.Src = "../imagenes/male.png";
                    }

                    else
                    {
                        ImgPerfilFake.Src = "../imagenes/female.png";
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ClGestion     = new Cl_Gestion_Registro();
            ClUtilitarios = new Cl_Utilitarios();
            DataSet ds = new DataSet();

            ds = ClGestion.ImpresionAdmisionExpediente(Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["gestion"].ToString()), true)), Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["subcategoria"].ToString()), true)));

            Reporte.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
            Reporte.SetDataSource(ds);
            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);
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClPersona     = new Cl_Persona();
            ClUtilitarios = new Cl_Utilitarios();
            ClTraductor   = new Cl_Traductor();
            ClUsuario     = new Cl_Usuario();
            ClCita        = new Cl_Cita();

            BtnGrabar.Click += BtnGrabar_Click;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                int     PersonaId = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["Person"].ToString()), true));
                DataSet DsArchivo = new DataSet();
                DsArchivo = ClPersona.Get_Datos_Persona(Convert.ToInt32(PersonaId), Session["Idioma"].ToString());
                //LblNombreUsuario.Text = DsArchivo.Tables["DATOS"].Rows[0]["Nombre"].ToString();
                if (DsArchivo.Tables["DATOS"].Rows[0]["Foto_Perfil"].ToString() != "")
                {
                    byte[] bytes = (byte[])DsArchivo.Tables["DATOS"].Rows[0]["Foto_Perfil"];
                    ImgPerfil.Src = "data:image/png;base64," + Convert.ToBase64String(bytes);
                }
                LblNombreDato.InnerText = DsArchivo.Tables["DATOS"].Rows[0]["Nombres"] + " " + DsArchivo.Tables["DATOS"].Rows[0]["Apellidos"];
                DsArchivo.Clear();
                DataSet dsEspecialidad = ClPersona.Get_Especialidad_Usuario(PersonaId, Session["Idioma"].ToString());
                if (dsEspecialidad.Tables["Datos"].Rows.Count > 0)
                {
                    string Especialidades = "";
                    for (int i = 0; i < dsEspecialidad.Tables["Datos"].Rows.Count; i++)
                    {
                        if (Especialidades == "")
                        {
                            Especialidades = dsEspecialidad.Tables["Datos"].Rows[i]["Espe"].ToString();
                        }
                        else
                        {
                            Especialidades = Especialidades + ", " + dsEspecialidad.Tables["Datos"].Rows[i]["Espe"].ToString();
                        }
                    }
                    LblEspecialidadesDato.InnerText = Especialidades;
                }
                else
                {
                    LblEspecialidadesDato.InnerText = "";
                }
                Traduce();

                var localDateTime = DateTime.Now.ToString("yyyy-MM-dd");
                TxtFecCita.Value = localDateTime;

                var localTime = DateTime.Now.ToString("HH:mm");
                TxtHoraCita.Value = localTime;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUtilitarios     = new Cl_Utilitarios();
            ClPersona         = new Cl_Persona();
            ClGestio_Registro = new Cl_Gestion_Registro();
            DataSet Ds_Formulario_BosqueNatural = new DataSet();

            Ds_Formulario_BosqueNatural           = ((DataSet)Session["Ds_Formulario_BosqueNatural"]);
            Reporte.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
            Reporte.SetDataSource((DataSet)Ds_Formulario_BosqueNatural);

            if (Convert.ToInt32(Session["TipoReporte"]) == 1)
            {
                string UsuarioId = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["utilisateurid"].ToString()), true);
                Reporte.Subreports[0].SetDataSource(ClGestio_Registro.Fincas_Registro(Convert.ToInt32(UsuarioId), Convert.ToInt32(Session["TipoReporte"])));
            }
            else
            {
                string[] GestionId = Ds_Formulario_BosqueNatural.Tables["Dt_BosqueNatural"].Rows[0]["NUG"].ToString().Split('-');
                string   IdGestion = HttpUtility.UrlDecode(Request.QueryString["traiteid"].ToString());
                Reporte.Subreports[0].SetDataSource(ClGestio_Registro.Fincas_Registro(Convert.ToInt32(IdGestion), Convert.ToInt32(Session["TipoReporte"])));
            }


            string llamada = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["appel"].ToString()), true);
            string NomReporte;

            if (llamada == "1")
            {
                NomReporte = Ds_Formulario_BosqueNatural.Tables["Dt_Plantacion_Voluntaria"].Rows[0]["NUG"] + ".pdf";
            }
            else
            {
                NomReporte = Guid.NewGuid().ToString() + ".pdf";
            }
            //string url = System.AppDomain.CurrentDomain.BaseDirectory + DirRep + NomReporte;
            string url     = Server.MapPath(".") + @"\" + DirRep + NomReporte;
            string attchat = Server.MapPath(".") + @"\" + DirRep + NomReporte;
            //string attchat = System.AppDomain.CurrentDomain.BaseDirectory + 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;
            //if (llamada == "1")
            //{
            //    string Mensaje = "Su solicitud fue enviada exitosamente, con Numero Único de Gestión (NUG): " + Ds_Formulario_BosqueNatural.Tables["Dt_Plantacion_Voluntaria"].Rows[0]["NUG"] + ". Por lo que solicitamos presentarse a la oficina Subregional " + Ds_Formulario_BosqueNatural.Tables["Dt_Plantacion_Voluntaria"].Rows[0]["SubRegion"] + ", con la documentación que deberá presentar para dar trámite a su solicitud.";
            //    ClUtilitarios.EnvioCorreo(Session["Correo_Usuario"].ToString(), ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"])).ToString(), "Solicitud SEGEFOR", Mensaje, 1, attchat, NomReporte);
            //}
            base.Response.Redirect(url);
        }
Exemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClCatalogos   = new Cl_Catalogos();
            ClUtilitarios = new Cl_Utilitarios();
            ClUsuario     = new Cl_Usuario();
            ClPersona     = new Cl_Persona();
            CboDep.SelectedIndexChanged += CboDep_SelectedIndexChanged;
            BtnCrearUsuario.Click       += BtnCrearUsuario_Click;
            CboTipoIdentificacion.SelectedIndexChanged += CboTipoIdentificacion_SelectedIndexChanged;
            LnkTerminos.Click += LnkTerminos_Click;

            System.Web.UI.HtmlControls.HtmlGenericControl sidvar;
            sidvar         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("MenuAdm");
            sidvar.Visible = false;

            System.Web.UI.WebControls.Label lblUsuario;
            lblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
            lblUsuario.Text = "Nuevo Usuario";

            System.Web.UI.WebControls.Label LblTipoUsuario;
            LblTipoUsuario         = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
            LblTipoUsuario.Visible = false;

            System.Web.UI.HtmlControls.HtmlGenericControl lines;
            lines         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("lines");
            lines.Visible = false;

            System.Web.UI.HtmlControls.HtmlGenericControl Notif;
            Notif         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("Notif");
            Notif.Visible = false;

            System.Web.UI.HtmlControls.HtmlImage ImgPerfil;
            ImgPerfil         = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
            ImgPerfil.Src     = "../imagenes/New_User.png";
            ImgPerfil.Visible = true;
            TxtFecNac.MinDate = new DateTime(1920, 1, 1);
            TxtFecNac.MaxDate = DateTime.Today;


            if (!IsPostBack)
            {
                ClUtilitarios.LlenaCombo(ClCatalogos.ListadoGenero(), CboGenero, "generoid", "genero");
                ClUtilitarios.AgregarSeleccioneCombo(CboGenero, "Genero");
                ClUtilitarios.LlenaCombo(ClCatalogos.ListadoDepartamentos(), CboDep, "DepartamentoId", "Departamento");
                ClUtilitarios.AgregarSeleccioneCombo(CboDep, "Departamento");
                ClUtilitarios.AgregarSeleccioneCombo(CboMun, "Municipio");
                ClUtilitarios.LlenaCombo(ClCatalogos.ListadoTipoIdentificacion(), CboTipoIdentificacion, "Origen_PersonaId", "Origen_Persona");
                ClUtilitarios.AgregarSeleccioneCombo(CboTipoIdentificacion, "Tipo de identificación");
                TxtFecNac.SelectedDate = DateTime.Today;
                TxtFecNac.MaxDate      = DateTime.Today;
                ClUtilitarios.LlenaCombo(ClCatalogos.ListadoPais(), CboPais, "PaisId", "Pais");
                ClUtilitarios.AgregarSeleccioneCombo(CboPais, "Pais");
                TxtFecVenId.MinDate = DateTime.Today;
            }
        }
Exemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClTraductor   = new Cl_Traductor();
            ClCatalogos   = new Cl_Catalogos();
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();
            ClClinca      = new Cl_Clinica();
            ClCliente     = new Cl_Cliente();

            ImageButton ImgEng;

            ImgEng        = (ImageButton)Master.FindControl("ImgEng");
            ImgEng.Click += ImgEng_Click;

            ImageButton ImgEsp;

            ImgEsp        = (ImageButton)Master.FindControl("ImgEsp");
            ImgEsp.Click += ImgEsp_Click;

            CboPais.SelectedIndexChanged         += CboPais_SelectedIndexChanged;
            CboDepartamento.SelectedIndexChanged += CboDepartamento_SelectedIndexChanged;
            BtnGrabar.Click           += BtnGrabar_Click;
            GrdDetalle.NeedDataSource += GrdDetalle_NeedDataSource;
            GrdDetalle.ItemCommand    += GrdDetalle_ItemCommand;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                DataSet dsPermisos = ClUsuario.Get_Roles_Forma_Usuario(Convert.ToInt32(Session["UsuarioId"]), 2);
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Editar"]) == 0)
                {
                    BtnGrabar.Enabled = false;
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Insertar"]) == 0)
                {
                    BtnGrabar.Enabled = false;
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Eliminar"]) == 0)
                {
                }
                dsPermisos.Clear();
                Traduce();
                DataSet DsClincas = ClClinca.Get_Clincas(Convert.ToInt32(Session["ClienteId"]));
                if (DsClincas.Tables["Datos"].Rows.Count == 1)
                {
                    GrdDetalle.Columns[7].Visible = false;
                }
                ValidaGrabar();
            }
            TxtIdioma.Value = Session["Idioma"].ToString();
        }
Exemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();

            BtnIngresar.Click         += BtnIngresar_Click;
            BtnOlvio.ServerClick      += BtnOlvio_ServerClick;
            BtnEnviaClave.ServerClick += BtnEnviaClave_ServerClick;
            string conver = HttpUtility.UrlEncode(ClUtilitarios.Encrypt("1234", true));
        }
Exemplo n.º 12
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();

            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.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUtilitarios = new Cl_Utilitarios();
            ClXml         = new Cl_Xml();
            ClPoligono    = new Cl_Poligono();

            BtnCargar.Click            += BtnCargar_Click;
            BtnGrabar.Click            += BtnGrabar_Click;
            GrdPoligono.NeedDataSource += GrdPoligono_NeedDataSource;
            LblTitConfirmacion.Text     = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["region"].ToString()), true);
            LblRegionId.Text            = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["regionid"].ToString()), true);
        }
Exemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUtilitarios = new Cl_Utilitarios();
            System.Net.WebClient client = new System.Net.WebClient();
            Byte[] buffer = client.DownloadData(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["Route"].ToString()), true));

            if (buffer != null)
            {
                Response.ContentType = "application/pdf";
                Response.AddHeader("content-length", buffer.Length.ToString());
                Response.BinaryWrite(buffer);
            }
        }
Exemplo n.º 16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                ClUsuario     = new Cl_Usuario();
                ClUtilitarios = new Cl_Utilitarios();
                ClPersona     = new Cl_Persona();
                string Test = HttpUtility.UrlEncode(ClUtilitarios.Encrypt("4", true));

                ClUsuario.Insertar_Ingreso_Pagina(44, Convert.ToInt32(Session["UsuarioId"]), ClUsuario.CorrId_IngresoPagina());
                ClUtilitarios.Permisos(Master, Convert.ToInt32(Session["UsuarioId"]));
                System.Web.UI.WebControls.Label LblPerfil;
                LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                LblPerfil.Text = ClUsuario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                System.Web.UI.WebControls.Label LblUsuario;
                LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));

                System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                System.Web.UI.WebControls.Image      ImgPerfil;
                ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");
                if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                {
                    ImgPerfilFake.Visible = false;
                    ImgPerfil.Visible     = true;
                }
                else
                {
                    ImgPerfilFake.Visible = true;
                    ImgPerfil.Visible     = false;
                    if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                    {
                        ImgPerfilFake.Src = "../imagenes/male.png";
                    }

                    else
                    {
                        ImgPerfilFake.Src = "../imagenes/female.png";
                    }
                }
            }
        }
Exemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUsuario                             = new Cl_Usuario();
            ClTraductor                           = new Cl_Traductor();
            ClCatalogos                           = new Cl_Catalogos();
            ClUtilitarios                         = new Cl_Utilitarios();
            ClClinica                             = new Cl_Clinica();
            GrdMedicos.NeedDataSource            += GrdMedicos_NeedDataSource;
            CboEspecialidad.SelectedIndexChanged += CboEspecialidad_SelectedIndexChanged;
            GrdMedicos.ItemCommand               += GrdMedicos_ItemCommand;

            ImageButton ImgEng;

            ImgEng        = (ImageButton)Master.FindControl("ImgEng");
            ImgEng.Click += ImgEng_Click;

            ImageButton ImgEsp;

            ImgEsp        = (ImageButton)Master.FindControl("ImgEsp");
            ImgEsp.Click += ImgEsp_Click;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                DataSet dsPermisos = ClUsuario.Get_Roles_Forma_Usuario(Convert.ToInt32(Session["UsuarioId"]), 7);
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Editar"]) == 0)
                {
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Insertar"]) == 0)
                {
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Eliminar"]) == 0)
                {
                }
                dsPermisos.Clear();
                Traduce();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();
            DataSet Ds_FormularioInscripcion = new DataSet();

            Ds_FormularioInscripcion = ((DataSet)Session["DataFormulario"]);
            Reporte.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
            Reporte.SetDataSource((DataSet)Ds_FormularioInscripcion);
            string llamada = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["appel"].ToString()), true);
            string NomReporte;

            if (llamada == "1")
            {
                NomReporte = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["traite"].ToString()), true) + ".pdf";
            }
            else
            {
                NomReporte = Guid.NewGuid().ToString() + ".pdf";
            }
            string url     = Server.MapPath(".") + @"\" + DirRep + NomReporte;
            string attchat = 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;
            //if (llamada == "1")
            //{
            //    string Mensaje = "Su solicitud fue enviada exitosamente, con Numero Único de Gestión (NUG): " + ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["traite"].ToString()), true) + ". Por lo que solicitamos presentarse a la oficina Subregional " + Ds_FormularioInscripcion.Tables["Dt_Formulario"].Rows[0]["SubRegion"] + ", con la documentación que deberá presentar para dar trámite a su solicitud.";
            //    ClUtilitarios.EnvioCorreo(Session["Correo_Usuario"].ToString(), ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"])).ToString(), "Solicitud SEGEFOR", Mensaje, 1, attchat,NomReporte);
            //}

            base.Response.Redirect(url);
        }
Exemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClTraductor   = new Cl_Traductor();
            ClCatalogos   = new Cl_Catalogos();
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();
            ClUsuario     = new Cl_Usuario();

            BtnGrabar.Click           += BtnGrabar_Click;
            GrdDetalle.NeedDataSource += GrdDetalle_NeedDataSource;
            GrdDetalle.ItemCommand    += GrdDetalle_ItemCommand;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                Traduce();
            }
        }
Exemplo n.º 20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClTraductor   = new Cl_Traductor();
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();



            ImgEng.Click                += ImgEng_Click;
            ImgEsp.Click                += ImgEsp_Click;
            BtnIngresar.ServerClick     += BtnIngresar_ServerClick;
            LblForgot.ServerClick       += LblForgot_ServerClick;
            BtnCrearUsuario.ServerClick += BtnCrearUsuario_ServerClick;

            if (!IsPostBack)
            {
                string Clave = ClUtilitarios.Encrypt("1", true);
                Session["Idioma"] = "es-GT";
                Traducir();
            }
        }
Exemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClTraductor   = new Cl_Traductor();
            ClCatalogos   = new Cl_Catalogos();
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();

            BtnGrabar.Click += BtnGrabar_Click;

            ImageButton ImgEsp;

            ImgEsp        = (ImageButton)Master.FindControl("ImgEsp");
            ImgEsp.Click += ImgEsp_Click;

            ImageButton ImgEng;

            ImgEng        = (ImageButton)Master.FindControl("ImgEng");
            ImgEng.Click += ImgEng_Click;



            Traduce();
            System.Web.UI.HtmlControls.HtmlGenericControl sidebar;
            sidebar         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("sidebar");
            sidebar.Visible = false;

            System.Web.UI.HtmlControls.HtmlGenericControl liMensajes;
            liMensajes         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("liMensajes");
            liMensajes.Visible = false;

            System.Web.UI.HtmlControls.HtmlGenericControl liTickets;
            liTickets         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("liTickets");
            liTickets.Visible = false;

            System.Web.UI.HtmlControls.HtmlGenericControl liPerfil;
            liPerfil         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("liPerfil");
            liPerfil.Visible = false;
        }
Exemplo n.º 22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();
            ClCatalogos   = new Cl_Catalogos();
            ClRegiones    = new Cl_Regiones();

            GrdRegiones.ItemDataBound                     += GrdRegiones_ItemDataBound;
            GrdRegiones.ItemCommand                       += GrdRegiones_ItemCommand;
            GrdSubRegiones.NeedDataSource                 += GrdSubRegiones_NeedDataSource;
            GrdRegiones.NeedDataSource                    += GrdRegiones_NeedDataSource;
            GrdSubRegiones.ItemDataBound                  += GrdSubRegiones_ItemDataBound;
            GrdSubRegiones.ItemCommand                    += GrdSubRegiones_ItemCommand;
            btnNuevo.ServerClick                          += btnNuevo_ServerClick;
            BtnGrabar.ServerClick                         += BtnGrabar_ServerClick;
            GrdMunicipios.NeedDataSource                  += GrdMunicipios_NeedDataSource;
            BtnNuevoMun.ServerClick                       += BtnNuevoMun_ServerClick;
            CboDepartamento.SelectedIndexChanged          += CboDepartamento_SelectedIndexChanged;
            BtnGrabarMunicipio.ServerClick                += BtnGrabarMunicipio_ServerClick;
            GrdMunicipios.ItemDataBound                   += GrdMunicipios_ItemDataBound;
            GrdMunicipios.ItemCommand                     += GrdMunicipios_ItemCommand;
            CboDepartamentoSubRegion.SelectedIndexChanged += CboDepartamentoSubRegion_SelectedIndexChanged;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                ClUsuario.Insertar_Ingreso_Pagina(51, Convert.ToInt32(Session["UsuarioId"]), ClUsuario.CorrId_IngresoPagina());
                ClUtilitarios.Permisos(Master, Convert.ToInt32(Session["UsuarioId"]));
                System.Web.UI.WebControls.Label LblPerfil;
                LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                LblPerfil.Text = ClUsuario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                System.Web.UI.WebControls.Label LblUsuario;
                LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));


                DataSet dsPermisos = ClUsuario.Get_Roles(Convert.ToInt32(Session["UsuarioId"]), 51);
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Editar"]) == 0)
                {
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Insertar"]) == 0)
                {
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Eliminar"]) == 0)
                {
                }
                dsPermisos.Clear();


                System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                System.Web.UI.WebControls.Image      ImgPerfil;
                ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");

                if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                {
                    ImgPerfilFake.Visible = false;
                    ImgPerfil.Visible     = true;
                }
                else
                {
                    ImgPerfilFake.Visible = true;
                    ImgPerfil.Visible     = false;
                    if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                    {
                        ImgPerfilFake.Src = "../imagenes/male.png";
                    }

                    else
                    {
                        ImgPerfilFake.Src = "../imagenes/female.png";
                    }
                }
                ClUtilitarios.LlenaCombo(ClCatalogos.ListadoPersonas(), CboPersona, "PersonaId", "Persona");
                ClUtilitarios.AgregarSeleccioneCombo(CboPersona, "Persona");
                ClUtilitarios.LlenaCombo(ClCatalogos.ListadoDepartamentos(), CboDepartamento, "DepartamentoId", "Departamento");
                ClUtilitarios.AgregarSeleccioneCombo(CboDepartamento, "Departamento");
                ClUtilitarios.LlenaCombo(ClCatalogos.ListadoDepartamentos(), CboDepartamentoSubRegion, "DepartamentoId", "Departamento");
                ClUtilitarios.AgregarSeleccioneCombo(CboDepartamentoSubRegion, "Departamento");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();
            ClRegistro    = new Cl_Registro();

            BtnSubirFoto.Click          += BtnSubirFoto_Click;
            BtnUploadMapaVocacion.Click += BtnUploadMapaVocacion_Click;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                ClUsuario.Insertar_Ingreso_Pagina(52, Convert.ToInt32(Session["UsuarioId"]), ClUsuario.CorrId_IngresoPagina());
                ClUtilitarios.Permisos(Master, Convert.ToInt32(Session["UsuarioId"]));
                System.Web.UI.WebControls.Label LblPerfil;
                LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                LblPerfil.Text = ClUsuario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                System.Web.UI.WebControls.Label LblUsuario;
                LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));


                DataSet dsPermisos = ClUsuario.Get_Roles(Convert.ToInt32(Session["UsuarioId"]), 52);
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Editar"]) == 0)
                {
                    BtnSubirFoto.Visible          = false;
                    BtnUploadMapaVocacion.Visible = false;
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Insertar"]) == 0)
                {
                    BtnSubirFoto.Visible          = false;
                    BtnUploadMapaVocacion.Visible = false;
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Eliminar"]) == 0)
                {
                    BtnSubirFoto.Visible          = false;
                    BtnUploadMapaVocacion.Visible = false;
                }
                dsPermisos.Clear();


                System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                System.Web.UI.WebControls.Image      ImgPerfil;
                ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");

                if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                {
                    ImgPerfilFake.Visible = false;
                    ImgPerfil.Visible     = true;
                }
                else
                {
                    ImgPerfilFake.Visible = true;
                    ImgPerfil.Visible     = false;
                    if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                    {
                        ImgPerfilFake.Src = "../imagenes/male.png";
                    }

                    else
                    {
                        ImgPerfilFake.Src = "../imagenes/female.png";
                    }
                }
                CargarImagenes();
            }
        }
Exemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();
            ClCatalogos   = new Cl_Catalogos();
            ClProfesion   = new Cl_Profesion();
            GrdProfesion.NeedDataSource += GrdProfesion_NeedDataSource;
            BtnGrabar.Click             += BtnGrabar_Click;
            BtnNuevo.ServerClick        += BtnNuevo_ServerClick;
            GrdProfesion.ItemCommand    += GrdProfesion_ItemCommand;
            BtnYes.Click += BtnYes_Click;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                ClUsuario.Insertar_Ingreso_Pagina(22, Convert.ToInt32(Session["UsuarioId"]), ClUsuario.CorrId_IngresoPagina());
                ClUtilitarios.Permisos(Master, Convert.ToInt32(Session["UsuarioId"]));
                System.Web.UI.WebControls.Label LblPerfil;
                LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                LblPerfil.Text = ClUsuario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                System.Web.UI.WebControls.Label LblUsuario;
                LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));

                DataSet dsPermisos = ClUsuario.Get_Roles(Convert.ToInt32(Session["UsuarioId"]), 22);
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Editar"]) == 0)
                {
                    GrdProfesion.Columns[4].Visible = false;
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Insertar"]) == 0)
                {
                    BtnGrabar.Visible = false;
                    BtnNuevo.Visible  = false;
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Eliminar"]) == 0)
                {
                }
                dsPermisos.Clear();

                System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                System.Web.UI.WebControls.Image      ImgPerfil;
                ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");

                if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                {
                    ImgPerfilFake.Visible = false;
                    ImgPerfil.Visible     = true;
                }
                else
                {
                    ImgPerfilFake.Visible = true;
                    ImgPerfil.Visible     = false;
                    if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                    {
                        ImgPerfilFake.Src = "../imagenes/male.png";
                    }

                    else
                    {
                        ImgPerfilFake.Src = "../imagenes/female.png";
                    }
                }

                ClUtilitarios.LlenaCombo(ClCatalogos.Categoria_Profesion_GetAll(), CboCategoria, "CategoriaProfesionId", "CategoriaProfesion");
                ClUtilitarios.AgregarSeleccioneCombo(CboCategoria, "Grado Académico");
                ClUtilitarios.LlenaCombo(ClCatalogos.Estatus_Profesion_GetAll(), CboEstatus, "EstatusProfesionId", "EstatusProfesion");
                ClUtilitarios.AgregarSeleccioneCombo(CboEstatus, "Estatus");
            }
        }
Exemplo n.º 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Clutilitarios = new Cl_Utilitarios();
            Clususario    = new Cl_Usuario();
            ClPersona     = new Cl_Persona();

            BtnCambia.Click += BtnCambia_Click;
            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                Clususario.Insertar_Ingreso_Pagina(15, Convert.ToInt32(Session["UsuarioId"]), Clususario.CorrId_IngresoPagina());
                if (Clutilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["appel"].ToString()), true) == "1")
                {
                    System.Web.UI.HtmlControls.HtmlGenericControl sidvar;
                    sidvar         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("MenuAdm");
                    sidvar.Visible = false;

                    System.Web.UI.WebControls.Label lblUsuario;
                    lblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                    lblUsuario.Text = "Nuevo Usuario";


                    System.Web.UI.HtmlControls.HtmlGenericControl lines;
                    lines         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("lines");
                    lines.Visible = false;

                    System.Web.UI.HtmlControls.HtmlGenericControl Notif;
                    Notif         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("Notif");
                    Notif.Visible = false;

                    DataSet dsPermisos = Clususario.Get_Roles(Convert.ToInt32(Session["UsuarioId"]), 15);
                    if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Editar"]) == 0)
                    {
                        BtnCambia.Visible = false;
                    }
                    if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Insertar"]) == 0)
                    {
                    }
                    if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Eliminar"]) == 0)
                    {
                    }
                    dsPermisos.Clear();

                    System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                    System.Web.UI.WebControls.Image      ImgPerfil;
                    ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                    ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");
                    if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                    {
                        ImgPerfilFake.Visible = false;
                        ImgPerfil.Visible     = true;
                    }
                    else
                    {
                        ImgPerfilFake.Visible = true;
                        ImgPerfil.Visible     = false;
                        if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                        {
                            ImgPerfilFake.Src = "../imagenes/male.png";
                        }

                        else
                        {
                            ImgPerfilFake.Src = "../imagenes/female.png";
                        }
                    }

                    System.Web.UI.WebControls.Label LblPerfil;
                    LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                    LblPerfil.Text = Clususario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                    System.Web.UI.WebControls.Label LblUsuario;
                    LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                    LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));
                }
                else
                {
                    Clutilitarios.Permisos(Master, Convert.ToInt32(Session["UsuarioId"]));
                    System.Web.UI.WebControls.Label LblPerfil;
                    LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                    LblPerfil.Text = Clususario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                    System.Web.UI.WebControls.Label LblUsuario;
                    LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                    LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));

                    DataSet dsPermisos = Clususario.Get_Roles(Convert.ToInt32(Session["UsuarioId"]), 15);
                    if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Editar"]) == 0)
                    {
                        BtnCambia.Visible = false;
                    }
                    if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Insertar"]) == 0)
                    {
                    }
                    if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Eliminar"]) == 0)
                    {
                    }
                    dsPermisos.Clear();


                    System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                    System.Web.UI.WebControls.Image      ImgPerfil;
                    ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                    ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");
                    if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                    {
                        ImgPerfilFake.Visible = false;
                        ImgPerfil.Visible     = true;
                    }
                    else
                    {
                        ImgPerfilFake.Visible = true;
                        ImgPerfil.Visible     = false;
                        if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                        {
                            ImgPerfilFake.Src = "../imagenes/male.png";
                        }

                        else
                        {
                            ImgPerfilFake.Src = "../imagenes/female.png";
                        }
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();
            ClPersona     = new Cl_Persona();
            ClManejo      = new Cl_Manejo();
            ClRegistro    = new Cl_Registro();

            BtnRegresar.Click += BtnRegresar_Click;
            CboNombre.SelectedIndexChanged     += CboNombre_SelectedIndexChanged;
            BtnAsignaRegente.Click             += BtnAsignaRegente_Click;
            CboNombreEcut.SelectedIndexChanged += CboNombreEcut_SelectedIndexChanged;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                ClUtilitarios.Permisos(Master, Convert.ToInt32(Session["UsuarioId"]));
                System.Web.UI.WebControls.Label LblPerfil;
                LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                LblPerfil.Text = ClUsuario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                System.Web.UI.WebControls.Label LblUsuario;
                LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));



                System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                System.Web.UI.WebControls.Image      ImgPerfil;
                ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");

                if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                {
                    ImgPerfilFake.Visible = false;
                    ImgPerfil.Visible     = true;
                }
                else
                {
                    ImgPerfilFake.Visible = true;
                    ImgPerfil.Visible     = false;
                    if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                    {
                        ImgPerfilFake.Src = "../imagenes/male.png";
                    }

                    else
                    {
                        ImgPerfilFake.Src = "../imagenes/female.png";
                    }
                }

                TxtAreaAprovecha.Text = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["taille"].ToString()), true);
                double Area        = Convert.ToDouble(TxtAreaAprovecha.Text);
                int    CategoriaId = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["categorie"].ToString()), true));
                ClUtilitarios.LlenaCombo(ClManejo.Get_Regentes(Area, 2), CboNombre, "RegistroId", "Nombre");
                if (CategoriaId == 8)
                {
                    if (Area > 1)
                    {
                        ClUtilitarios.LlenaCombo(ClManejo.Get_Regentes(Area, 1), CboNombreEcut, "RegistroId", "Nombre");
                        DivEcut.Visible = true;
                    }
                }

                switch (CategoriaId)
                {
                case 3:
                    LblTitulo.Text = "SOLICITUD DE LICENCIA DE APROVECHAMIENTO FORESTAL";
                    break;

                case 4:
                    LblTitulo.Text = "SOLICITUD DE LICENCIA DE APROVECHAMIENTO CON FINES SANITARIOS";
                    break;

                case 5:
                    LblTitulo.Text = "SOLICITUD DE LICENCIA DE SANEAMIENTO";
                    break;

                case 6:
                    LblTitulo.Text = "SOLICITUD DE LICENCIA DE SALVAMENTO";
                    break;

                case 7:
                    LblTitulo.Text = "SOLICITUD DE LICENCIA CON FINES CIENTIFICOS";
                    break;

                case 8:
                    LblTitulo.Text = "SOLICITUD DE LICENCIA PARA CAMBIO DE USO DE TIERRA";

                    break;
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUsuario                        = new Cl_Usuario();
            ClUtilitarios                    = new Cl_Utilitarios();
            ClPersona                        = new Cl_Persona();
            ClCatalogos                      = new Cl_Catalogos();
            BtnBuscar.ServerClick           += BtnBuscar_ServerClick;
            CboPersona.SelectedIndexChanged += CboPersona_SelectedIndexChanged;
            BtnGrabar.Click                 += BtnGrabar_Click;

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                ClUsuario.Insertar_Ingreso_Pagina(49, Convert.ToInt32(Session["UsuarioId"]), ClUsuario.CorrId_IngresoPagina());
                ClUtilitarios.Permisos(Master, Convert.ToInt32(Session["UsuarioId"]));
                System.Web.UI.WebControls.Label LblPerfil;
                LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                LblPerfil.Text = ClUsuario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                System.Web.UI.WebControls.Label LblUsuario;
                LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));


                DataSet dsPermisos = ClUsuario.Get_Roles(Convert.ToInt32(Session["UsuarioId"]), 49);
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Editar"]) == 0)
                {
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Insertar"]) == 0)
                {
                }
                if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Eliminar"]) == 0)
                {
                }
                dsPermisos.Clear();


                System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                System.Web.UI.WebControls.Image      ImgPerfil;
                ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");

                if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                {
                    ImgPerfilFake.Visible = false;
                    ImgPerfil.Visible     = true;
                }
                else
                {
                    ImgPerfilFake.Visible = true;
                    ImgPerfil.Visible     = false;
                    if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                    {
                        ImgPerfilFake.Src = "../imagenes/male.png";
                    }

                    else
                    {
                        ImgPerfilFake.Src = "../imagenes/female.png";
                    }
                }

                ClUtilitarios.LlenaCombo(ClCatalogos.Get_PersonasGestionTecnico(), CboPersona, "PersonaId", "Nombres");
                ClUtilitarios.AgregarSeleccioneCombo(CboPersona, "Persona");
            }
        }
Exemplo n.º 28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Clutilitarios = new Cl_Utilitarios();
            Clususario    = new Cl_Usuario();
            ClPersona     = new Cl_Persona();

            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                Clutilitarios.Permisos(Master, Convert.ToInt32(Session["UsuarioId"]));
                System.Web.UI.WebControls.Label LblPerfil;
                LblPerfil      = (System.Web.UI.WebControls.Label)Master.FindControl("LblTipoUsuario");
                LblPerfil.Text = Clususario.Get_Tipo_Usuario(Convert.ToInt32(Session["UsuarioId"]));

                System.Web.UI.WebControls.Label LblUsuario;
                LblUsuario      = (System.Web.UI.WebControls.Label)Master.FindControl("lblUsuario");
                LblUsuario.Text = ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"]));

                System.Web.UI.HtmlControls.HtmlImage ImgPerfilFake;
                System.Web.UI.WebControls.Image      ImgPerfil;
                ImgPerfilFake = (System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("ImgPerfilFake");
                ImgPerfil     = (System.Web.UI.WebControls.Image)Master.FindControl("ImgPerfil");
                if (ClPersona.Existe_FotoPerfil(Convert.ToInt32(Session["PersonaId"])) == true)
                {
                    ImgPerfilFake.Visible = false;
                    ImgPerfil.Visible     = true;
                }
                else
                {
                    ImgPerfilFake.Visible = true;
                    ImgPerfil.Visible     = false;
                    if (ClPersona.Genero_Usuario(Convert.ToInt32(Session["PersonaId"])) == 1)
                    {
                        ImgPerfilFake.Src = "../imagenes/male.png";
                    }

                    else
                    {
                        ImgPerfilFake.Src = "../imagenes/female.png";
                    }
                }

                System.Web.UI.HtmlControls.HtmlGenericControl Notif;
                Notif         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("Notif");
                Notif.Visible = false;
                string llamada = "";
                if (Request.QueryString["appel"].ToString() != "0")
                {
                    llamada = Clutilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["appel"].ToString()), true);
                }
                if (llamada == "0")
                {
                    Mensaje.Visible = false;
                    LnkLink.Visible = false;
                }
                else if (llamada == "1")
                {
                    Mensaje.Visible = true;
                    LnkLink.Visible = true;
                    Mensaje.Text    = "Estimado(a): " + ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"])) + " su solicitud fue enviada exitosamente, en breve recibira un correo donde podra imprimir su formulario de inscripción, debera presentarse a la oficina del INAB correspondiente lo antes posible, por favor dirigase al siguiente enlace para ver sus gestiones e imprimir los documentos correspondientes para el ingreso de su gestión";
                    //RadWindow1.Title = "Formulario de Inscripción";
                    //RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioProfesional.aspx?appel=" + HttpUtility.UrlEncode(Clutilitarios.Encrypt("1", true)) + "&traite=" + HttpUtility.UrlEncode(Request.QueryString["traite"]) + "";
                    //ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
                }
                else if (llamada == "2")
                {
                    Mensaje.Visible = true;
                    LnkLink.Visible = true;
                    Mensaje.Text    = "Estimado(a): " + ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"])) + " su solicitud fue enviada exitosamente, en breve recibira un correo donde podra imprimir su formulario de inscripción, debera presentarse a la oficina del INAB correspondiente lo antes posible, por favor dirigase al siguiente enlace para ver sus gestiones e imprimir los documentos correspondientes para el ingreso de su gestión";
                    //RadWindow1.Title = "Formulario de Inscripción";
                    //RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioPlantacion.aspx?appel=" + HttpUtility.UrlEncode(Clutilitarios.Encrypt("1", true)) + "&traite=" + HttpUtility.UrlEncode(Request.QueryString["traite"]) + "";
                    //ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
                }
                else if (llamada == "3")
                {
                    Mensaje.Visible = true;
                    LnkLink.Visible = true;
                    Mensaje.Text    = Clutilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["message"].ToString()), true);
                }
                else if (llamada == "4")
                {
                    Mensaje.Visible = true;
                    LnkLink.Visible = true;
                    Mensaje.Text    = "Estimado(a): " + ClPersona.Nombre_Usuario(Convert.ToInt32(Session["PersonaId"])) + " la solicitud de inscripción de Bosques Naturales a nombre de: " + Session["Solicitante"] + " fue enviada exitosamente.";
                    //RadWindow1.Title = "Formulario de Inscripción";
                    //RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioPlantacion.aspx?appel=" + HttpUtility.UrlEncode(Clutilitarios.Encrypt("1", true)) + "&traite=" + HttpUtility.UrlEncode(Request.QueryString["traite"]) + "";
                    //ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
                }
            }
        }
Exemplo n.º 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClTraductor   = new Cl_Traductor();
            ClUsuario     = new Cl_Usuario();
            ClUtilitarios = new Cl_Utilitarios();

            if (ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["appel"].ToString()), true) == "1")
            {
                System.Web.UI.HtmlControls.HtmlGenericControl sidebar;
                sidebar         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("sidebar");
                sidebar.Visible = false;

                System.Web.UI.HtmlControls.HtmlGenericControl liMensajes;
                liMensajes         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("liMensajes");
                liMensajes.Visible = false;

                System.Web.UI.HtmlControls.HtmlGenericControl liTickets;
                liTickets         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("liTickets");
                liTickets.Visible = false;

                System.Web.UI.HtmlControls.HtmlGenericControl liPerfil;
                liPerfil         = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("liPerfil");
                liPerfil.Visible = false;
            }



            ImageButton ImgEng;

            ImgEng        = (ImageButton)Master.FindControl("ImgEng");
            ImgEng.Click += ImgEng_Click;

            ImageButton ImgEsp;

            ImgEsp        = (ImageButton)Master.FindControl("ImgEsp");
            ImgEsp.Click += ImgEsp_Click;

            BtnChangePass.Click += BtnChangePass_Click;



            if (Session["UsuarioId"] == null)
            {
                Response.Redirect("~/Wfrm_Login.aspx");
            }
            else if (!IsPostBack)
            {
                Traduce();
                if (ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["appel"].ToString()), true) == "2")
                {
                    DataSet dsPermisos = ClUsuario.Get_Roles_Forma_Usuario(Convert.ToInt32(Session["UsuarioId"]), 2);
                    if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Editar"]) == 0)
                    {
                        BtnChangePass.Enabled = false;
                    }
                    if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Insertar"]) == 0)
                    {
                        BtnChangePass.Enabled = false;
                    }
                    if (Convert.ToInt32(dsPermisos.Tables["Datos"].Rows[0]["Eliminar"]) == 0)
                    {
                    }
                    dsPermisos.Clear();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ClUtilitarios = new Cl_Utilitarios();
            DataSet Ds_Datos = new DataSet();

            Ds_Datos = ((DataSet)Session["Datos_InventarioForestal"]);
            string llamada = ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["appel"].ToString()), true);

            if (llamada == "0")
            {
                Reporte.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
                Reporte.SetDataSource(Ds_Datos);
                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);
            }
            else if (llamada == "1")
            {
                Reporte2.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
                Reporte2.SetDataSource(Ds_Datos);
                string NomReporte = NomReporte = Guid.NewGuid().ToString() + ".pdf";
                string url        = Server.MapPath(".") + @"\" + DirRep + NomReporte;
                DiskFileDestinationOptions options2 = new DiskFileDestinationOptions
                {
                    DiskFileName = url
                };
                ExportOptions exportOptions = Reporte2.ExportOptions;
                exportOptions.ExportDestinationType    = ExportDestinationType.DiskFile;
                exportOptions.ExportFormatType         = ExportFormatType.PortableDocFormat;
                exportOptions.ExportDestinationOptions = options2;
                Reporte2.Export();
                url = DirApp + DirRepLong + NomReporte;
                base.Response.Redirect(url);
            }
            else if (llamada == "2")
            {
                Reporte3.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
                Reporte3.SetDataSource(Ds_Datos);
                string NomReporte = NomReporte = Guid.NewGuid().ToString() + ".pdf";
                string url        = Server.MapPath(".") + @"\" + DirRep + NomReporte;
                DiskFileDestinationOptions options2 = new DiskFileDestinationOptions
                {
                    DiskFileName = url
                };
                ExportOptions exportOptions = Reporte3.ExportOptions;
                exportOptions.ExportDestinationType    = ExportDestinationType.DiskFile;
                exportOptions.ExportFormatType         = ExportFormatType.PortableDocFormat;
                exportOptions.ExportDestinationOptions = options2;
                Reporte3.Export();
                url = DirApp + DirRepLong + NomReporte;
                base.Response.Redirect(url);
            }
        }