Exemplo n.º 1
0
        void GenerarFormulario(int Opcion, string NUG) //1 Vista Previa, 2Envio de Solicitud
        {
            Ds_Profesionales Ds_Inscripcion = new Ds_Profesionales();

            Ds_Inscripcion.Tables["Dt_Formulario"].Clear();
            DataRow row = Ds_Inscripcion.Tables["Dt_Formulario"].NewRow();

            if (CboCategoriaProfesion.SelectedValue == "1")
            {
                row["Requisitos"] = "Requisitos:\n1) Copia legalizada del título;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU); y  \n3) Copia de documento personal de identificación (DPI).";
            }
            else if (CboCategoriaProfesion.SelectedValue == "2")
            {
                row["Requisitos"] = "Requisitos:\n1) Constancia original de colegiado activo vigente;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU);   y \n3) Copia de documento personal de identificación (DPI).\nPara profesionales con post grado en materia forestal, presentar el documento extendido por la universidad que lo avala.";
            }
            if (CboActividad.SelectedValue == "1" || CboActividad.SelectedValue == "16")
            {
                row["Requisitos"] = row["Requisitos"] + "\nademás de los requisitos anteriores, copia del diploma de aprobación del curso correspondiente.";
            }
            row["Region"]    = CboRegion.Text;
            row["SubRegion"] = CboSubRegion.Text;
            if (Opcion == 1)
            {
                row["NUG"] = "---------------";
            }
            else
            {
                row["NUG"] = NUG;
            }
            row["Fecha"]     = string.Format("{0:dd/MM/yyyy}", ClUtilitarios.FechaDB());
            row["Actividad"] = CboActividad.Text;
            if ((CboActividad.SelectedValue == "1") || (CboActividad.SelectedValue == "16"))
            {
                row["ActividadId"] = 1;
            }
            else
            {
                row["ActividadId"] = 0;
            }
            row["Nombres"]            = TxtNombre.Text;
            row["Apellidos"]          = TxtApellidos.Text;
            row["DPI"]                = TxtDpi.Text;
            row["NIT"]                = TxtNit.Text;
            row["Telefono"]           = TxtTelefono.Text;
            row["Celular"]            = TxtCelular.Text;
            row["Correo"]             = TxtCorreo.Text;
            row["Direccion"]          = TxtDireccion.Text;
            row["Municipio"]          = TxtMunicipio.Text;
            row["Departamento"]       = TxtDepartamento.Text;
            row["CategoriaProfesion"] = CboCategoriaProfesion.Text;
            if (CboCategoriaProfesion.SelectedValue == "1")
            {
                row["No_Colegiado"] = "---------------";
            }
            else
            {
                row["No_Colegiado"] = TxtNoCol.Text;
            }
            if (CboActividad.SelectedValue == "1" || CboActividad.SelectedValue == "16")
            {
                row["No_Diploma"] = TxtDiploma.Text;
            }
            else
            {
                row["No_Diploma"] = "-----------------";
            }
            row["Direccion_Notifica"]    = TxtDireccionNotifica.Text;
            row["Aldea_Notifica"]        = TxtAldea.Text;
            row["Municipio_Notifica"]    = CboMunicipio.Text;
            row["Departamento_Notifica"] = CboDepartamento.Text;
            row["Observaciones"]         = TxtObservaciones.Text;
            row["Nombre"]    = TxtNomFirma.Text;
            row["Profesion"] = CboProfesion.Text;
            if (LblTipoId.InnerText == "DPI")
            {
                row["LabelId"] = "2.3 Número de DPI:";
            }
            else
            {
                row["LabelId"] = "2.3 Número de Pasaporte:";
            }
            Ds_Inscripcion.Tables["Dt_Formulario"].Rows.Add(row);
            Session["DataFormulario"] = Ds_Inscripcion;
            if (Opcion == 1)
            {
                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.º 2
0
 void GrdSolicitudes_ItemCommand(object sender, GridCommandEventArgs e)
 {
     if (e.CommandName == "CmdVer")
     {
         if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString() == "3")
         {
             int Actividad = ClGestion.Get_Actividad_RegistroId(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString()));
             if ((Actividad == 1) || (Actividad == 2) || (Actividad == 3) || (Actividad == 16))
             {
                 DataSet          ds             = ClGestion.Formulario_Profesional(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 Ds_Profesionales Ds_Inscripcion = new Ds_Profesionales();
                 Ds_Inscripcion.Tables["Dt_Formulario"].Clear();
                 DataRow row = Ds_Inscripcion.Tables["Dt_Formulario"].NewRow();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                 {
                     row["Requisitos"] = "Requisitos:\n1) Copia legalizada del título;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU); y  \n3) Copia de documento personal de identificación (DPI).";
                 }
                 else if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "2")
                 {
                     row["Requisitos"] = "Requisitos:\n1) Constancia original de colegiado activo vigente;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU);   y \n3) Copia de documento personal de identificación (DPI).\nPara profesionales con post grado en materia forestal, presentar el documento extendido por la universidad que lo avala.";
                 }
                 if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                 {
                     row["Requisitos"] = row["Requisitos"] + "\nademás de los requisitos anteriores, copia del diploma de aprobación del curso correspondiente.";
                 }
                 row["Region"]    = ds.Tables["Datos"].Rows[0]["region"].ToString();
                 row["SubRegion"] = ds.Tables["Datos"].Rows[0]["Subregion"].ToString();
                 row["NUG"]       = ds.Tables["Datos"].Rows[0]["NUG"].ToString();
                 row["Fecha"]     = ds.Tables["Datos"].Rows[0]["Fecha_Gestion"].ToString();
                 row["Actividad"] = ds.Tables["Datos"].Rows[0]["Nombre_Subcategoria"].ToString();
                 row["Nombres"]   = ds.Tables["Datos"].Rows[0]["Nombres"].ToString();
                 row["Apellidos"] = ds.Tables["Datos"].Rows[0]["Apellidos"].ToString();
                 row["DPI"]       = ds.Tables["Datos"].Rows[0]["DPI"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "")
                 {
                     row["NIT"] = "";
                 }
                 else
                 {
                     row["NIT"] = ds.Tables["Datos"].Rows[0]["NIT"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["telefono"].ToString() == "")
                 {
                     row["Telefono"] = "";
                 }
                 else
                 {
                     row["Telefono"] = ds.Tables["Datos"].Rows[0]["telefono"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["celular"].ToString() == "")
                 {
                     row["Celular"] = "";
                 }
                 else
                 {
                     row["Celular"] = ds.Tables["Datos"].Rows[0]["celular"].ToString();
                 }
                 row["Correo"]             = ds.Tables["Datos"].Rows[0]["Correo"].ToString();
                 row["Direccion"]          = ds.Tables["Datos"].Rows[0]["Direccion"].ToString();
                 row["Municipio"]          = ds.Tables["Datos"].Rows[0]["MunVivienda"].ToString();
                 row["Departamento"]       = ds.Tables["Datos"].Rows[0]["DepaVivienda"].ToString();
                 row["CategoriaProfesion"] = ds.Tables["Datos"].Rows[0]["CategoriaProfesion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                 {
                     row["No_Colegiado"] = "---------------";
                 }
                 else
                 {
                     row["No_Colegiado"] = ds.Tables["Datos"].Rows[0]["No_Colegiado"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                 {
                     row["No_Diploma"] = ds.Tables["Datos"].Rows[0]["No_Diploma"].ToString();
                 }
                 else
                 {
                     row["No_Diploma"] = "-----------------";
                 }
                 row["Direccion_Notifica"] = ds.Tables["Datos"].Rows[0]["Direccion_Notificacion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString() == "")
                 {
                     row["Aldea_Notifica"] = "";
                 }
                 else
                 {
                     row["Aldea_Notifica"] = ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString();
                 }
                 row["Municipio_Notifica"]    = ds.Tables["Datos"].Rows[0]["MunNotifica"].ToString();
                 row["Departamento_Notifica"] = ds.Tables["Datos"].Rows[0]["DepNotifica"].ToString();
                 row["Observaciones"]         = ds.Tables["Datos"].Rows[0]["Observaciones"].ToString();
                 row["Nombre"]    = ds.Tables["Datos"].Rows[0]["Nombre_Firma"].ToString();
                 row["Profesion"] = ds.Tables["Datos"].Rows[0]["Profesion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["Origen_PersonaId"].ToString() == "1")
                 {
                     row["LabelId"] = "2.3 Número de DPI:";
                 }
                 else
                 {
                     row["LabelId"] = "2.3 Número de Pasaporte:";
                 }
                 Ds_Inscripcion.Tables["Dt_Formulario"].Rows.Add(row);
                 ds.Tables.Clear();
                 Session["DataFormulario"] = Ds_Inscripcion;
                 RadWindow1.Title          = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl    = "~/WeForms_Reportes/Wfrm_RepFormularioProfesional.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traite=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("00", true)) + "";
                 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 (e.CommandName == "CmdSeg")
     {
         if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString() == "3")
         {
             int SubCategoriaId = ClGestion.Get_Actividad_RegistroId(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString()));
             if ((SubCategoriaId == 1) || (SubCategoriaId == 2) || (SubCategoriaId == 3) || (SubCategoriaId == 16))
             {
                 DataSet ds = ClGestion.Formulario_Profesional(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 int     CategoriaProfesion = Convert.ToInt32(ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"]);
                 int     ProfesionId        = Convert.ToInt32(ds.Tables["Datos"].Rows[0]["ProfesionId"]);
                 int     OrigenPersonaId    = Convert.ToInt32(ds.Tables["Datos"].Rows[0]["Origen_PersonaId"]);
                 int     SubRegionId        = Convert.ToInt32(ds.Tables["Datos"].Rows[0]["SubRegionId"]);
                 ds.Tables.Clear();
                 string NUG    = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["NUG"].ToString();
                 string Nombre = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["nombres"].ToString();
                 if (Convert.ToInt32(Session["TipoUsuarioId"]) == 11)
                 {
                     Response.Redirect("~/WebForms/Wfrm_Seguimiento_Notificacion_deJuridico_SubRegional.aspx?gestion=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString(), true)) + "&modulo=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString(), true)) + "&subcategoria=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(SubCategoriaId.ToString(), true)) + "&profession=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(ProfesionId.ToString(), true)) + "&categorieprofessionnelle=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(CategoriaProfesion.ToString(), true)) + "&originepersonne=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(OrigenPersonaId.ToString(), true)) + "&gun=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(NUG.ToString(), true)) + "&nom=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(Nombre.ToString(), true)) + "&sousregion=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(SubRegionId.ToString(), true)) + "");
                 }
             }
         }
         else if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString() == "2")
         {
             if (Convert.ToInt32(Session["TipoUsuarioId"]) == 11)
             {
                 string NUG            = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["NUG"].ToString();
                 int    SubCategoriaId = ClManejo.Get_SubCategoriaPlanManejo(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), 2, 2);
                 Response.Redirect("~/WebForms/Wfrm_Seguimiento_Notificacion_deJuridico_SubRegional.aspx?gestion=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString(), true)) + "&modulo=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString(), true)) + "&subcategoria=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(SubCategoriaId.ToString(), true)) + "&dictamentecid=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.Cells[2].Text, true)) + "&dictamenjuridicoid=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.Cells[3].Text, true)) + "&gun=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(NUG.ToString(), true)) + "");
             }
         }
     }
 }
 void GrdSolicitudes_ItemCommand(object sender, GridCommandEventArgs e)
 {
     if (e.CommandName == "CmdVer")
     {
         if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString() == "3")
         {
             int Actividad = ClGestion.Get_Actividad_RegistroId(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString()));
             if ((Actividad == 1) || (Actividad == 2) || (Actividad == 3) || (Actividad == 16))
             {
                 DataSet          ds             = ClGestion.Formulario_Profesional(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 Ds_Profesionales Ds_Inscripcion = new Ds_Profesionales();
                 Ds_Inscripcion.Tables["Dt_Formulario"].Clear();
                 DataRow row = Ds_Inscripcion.Tables["Dt_Formulario"].NewRow();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                 {
                     row["Requisitos"] = "Requisitos:\n1) Copia legalizada del título;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU); y  \n3) Copia de documento personal de identificación (DPI).";
                 }
                 else if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "2")
                 {
                     row["Requisitos"] = "Requisitos:\n1) Constancia original de colegiado activo vigente;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU);   y \n3) Copia de documento personal de identificación (DPI).\nPara profesionales con post grado en materia forestal, presentar el documento extendido por la universidad que lo avala.";
                 }
                 if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                 {
                     row["Requisitos"] = row["Requisitos"] + "\nademás de los requisitos anteriores, copia del diploma de aprobación del curso correspondiente.";
                 }
                 row["Region"]    = ds.Tables["Datos"].Rows[0]["region"].ToString();
                 row["SubRegion"] = ds.Tables["Datos"].Rows[0]["Subregion"].ToString();
                 row["NUG"]       = ds.Tables["Datos"].Rows[0]["NUG"].ToString();
                 row["Fecha"]     = ds.Tables["Datos"].Rows[0]["Fecha_Gestion"].ToString();
                 row["Actividad"] = ds.Tables["Datos"].Rows[0]["Nombre_Subcategoria"].ToString();
                 if ((Actividad == 1) || (Actividad == 16))
                 {
                     row["ActividadId"] = 1;
                 }
                 else
                 {
                     row["ActividadId"] = 0;
                 }
                 row["Nombres"]   = ds.Tables["Datos"].Rows[0]["Nombres"].ToString();
                 row["Apellidos"] = ds.Tables["Datos"].Rows[0]["Apellidos"].ToString();
                 row["DPI"]       = ds.Tables["Datos"].Rows[0]["DPI"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "")
                 {
                     row["NIT"] = "";
                 }
                 else
                 {
                     row["NIT"] = ds.Tables["Datos"].Rows[0]["NIT"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["telefono"].ToString() == "")
                 {
                     row["Telefono"] = "";
                 }
                 else
                 {
                     row["Telefono"] = ds.Tables["Datos"].Rows[0]["telefono"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["celular"].ToString() == "")
                 {
                     row["Celular"] = "";
                 }
                 else
                 {
                     row["Celular"] = ds.Tables["Datos"].Rows[0]["celular"].ToString();
                 }
                 row["Correo"]             = ds.Tables["Datos"].Rows[0]["Correo"].ToString();
                 row["Direccion"]          = ds.Tables["Datos"].Rows[0]["Direccion"].ToString();
                 row["Municipio"]          = ds.Tables["Datos"].Rows[0]["MunVivienda"].ToString();
                 row["Departamento"]       = ds.Tables["Datos"].Rows[0]["DepaVivienda"].ToString();
                 row["CategoriaProfesion"] = ds.Tables["Datos"].Rows[0]["CategoriaProfesion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                 {
                     row["No_Colegiado"] = "---------------";
                 }
                 else
                 {
                     row["No_Colegiado"] = ds.Tables["Datos"].Rows[0]["No_Colegiado"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                 {
                     row["No_Diploma"] = ds.Tables["Datos"].Rows[0]["No_Diploma"].ToString();
                 }
                 else
                 {
                     row["No_Diploma"] = "-----------------";
                 }
                 row["Direccion_Notifica"] = ds.Tables["Datos"].Rows[0]["Direccion_Notificacion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString() == "")
                 {
                     row["Aldea_Notifica"] = "";
                 }
                 else
                 {
                     row["Aldea_Notifica"] = ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString();
                 }
                 row["Municipio_Notifica"]    = ds.Tables["Datos"].Rows[0]["MunNotifica"].ToString();
                 row["Departamento_Notifica"] = ds.Tables["Datos"].Rows[0]["DepNotifica"].ToString();
                 row["Observaciones"]         = ds.Tables["Datos"].Rows[0]["Observaciones"].ToString();
                 row["Nombre"]    = ds.Tables["Datos"].Rows[0]["Nombre_Firma"].ToString();
                 row["Profesion"] = ds.Tables["Datos"].Rows[0]["Profesion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["Origen_PersonaId"].ToString() == "1")
                 {
                     row["LabelId"] = "2.3 Número de DPI:";
                 }
                 else
                 {
                     row["LabelId"] = "2.3 Número de Pasaporte:";
                 }
                 Ds_Inscripcion.Tables["Dt_Formulario"].Rows.Add(row);
                 ds.Tables.Clear();
                 Session["DataFormulario"] = Ds_Inscripcion;
                 RadWindow1.Title          = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl    = "~/WeForms_Reportes/Wfrm_RepFormularioProfesional.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traite=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("00", true)) + "";
                 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 ((Actividad == 4) || (Actividad == 5) || (Actividad == 19) || (Actividad == 20) || (Actividad == 21))
             {
                 Session["TipoReporte"] = "2";
                 Session["Ds_Formulario_Plantacion_Voluntaria"] = ClGestionRegistro.ImpresionFormularioPlantacionVoluntaria(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), 1);
                 RadWindow1.Title       = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioPlantacion.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traite=" + HttpUtility.UrlEncode(Request.QueryString["traite"]) + "&traiteid=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString(), true)) + "";
                 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 (Actividad == 18)
             {
                 Session["TipoReporte"] = "2";
                 Session["Ds_Formulario_Plantacion_Voluntaria"] = ClGestionRegistro.ImpresionFormularioPlantacionVoluntaria(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), 2);
                 RadWindow1.Title       = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioPlantacion.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traite=" + HttpUtility.UrlEncode(Request.QueryString["traite"]) + "&traiteid=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString(), true)) + "";
                 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 ((Actividad == 34) || (Actividad == 35) || (Actividad == 36) || (Actividad == 37) || (Actividad == 38) || (Actividad == 39) || (Actividad == 40) || (Actividad == 41) || (Actividad == 42) || (Actividad == 43))
             {
                 Session["TipoReporte"] = "2";
                 Session["Ds_Formulario_SistemaAgroforestal"] = ClGestionRegistro.ImpresionFormularioSistemaAgroforestal(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 RadWindow1.Title       = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioSistemasAgroforestales.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traite=" + HttpUtility.UrlEncode(Request.QueryString["traite"]) + "&traiteid=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString(), true)) + "";
                 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 ((Actividad == 13) || (Actividad == 29) || (Actividad == 30) || (Actividad == 31) || (Actividad == 32) || (Actividad == 33))
             {
                 Session["TipoReporte"] = "2";
                 Session["Ds_Formulario_FuenteSemillera"] = ClGestionRegistro.ImpresionFormularioFuenteSemillera(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 RadWindow1.Title       = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioFuenteSemillera.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traite=" + HttpUtility.UrlEncode(Request.QueryString["traite"]) + "&traiteid=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString(), true)) + "";
                 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 ((Actividad == 7) || (Actividad == 9) || (Actividad == 10) || (Actividad == 12) || (Actividad == 17) || (Actividad == 22) || (Actividad == 23) || (Actividad == 24))
             {
                 Session["Ds_Empresas"] = ClGestionRegistro.ImpresionFormularioEmpresas(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 RadWindow1.Title       = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioEmpresas.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", 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 ((Actividad == 25) || (Actividad == 26) || (Actividad == 27) || (Actividad == 28))
             {
                 Session["Dt_Entidad"]  = ClGestionRegistro.ImpresionFormularioEntidad(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 RadWindow1.Title       = "Vista Previa Insripción";
                 RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioEntidad.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "";
                 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 ((Actividad == 11) || (Actividad == 15))
             {
                 Session["Ds_MotoSierra"] = ClGestionRegistro.ImpresionFormularioMotoSierra(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 RadWindow1.Title         = "Vista Previa Insripción";
                 RadWindow1.NavigateUrl   = "~/WeForms_Reportes/Wfrm_RepFormularioMotoSierra.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "";
                 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 (Actividad == 14)
             {
                 Session["Ds_Formulario_BosqueNatural"] = ClGestionRegistro.ImpresionFormularioBosqueNatural(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 RadWindow1.Title       = "Formulario de Inscripción";
                 Session["TipoReporte"] = 2;
                 RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioBosqueNatural.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traiteid=" + HttpUtility.UrlEncode(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString()) + "";
                 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 (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString() == "2")
         {
             RadWindow1.Title = "Plan de Manejo Forestal";
             int SubCategoriaId = ClManejo.Get_SubCategoriaPlanManejo(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), 2, 2);
             RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_PlanManejoForestal.aspx?identificateur=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString(), true)) + "&source=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("2", true)) + "&souscategorie=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(SubCategoriaId.ToString(), true)) + "";
             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 (e.CommandName == "CmdAnexos")
     {
         if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString() == "3")
         {
             if (ClGestion.Tiene_Anexos_Inventerio(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])) == 1)
             {
                 //Llamada 0 = PV, AF 1 = SAF
                 int Actividad = ClGestion.Get_Actividad_RegistroId(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 int Categoria = ClGestion.Get_CategoriaRNFId(Actividad);
                 int Tipo      = 0;
                 if ((Categoria == 2) || (Categoria == 3))
                 {
                     Tipo = 0;
                 }
                 else if (Categoria == 4)
                 {
                     Tipo = 1;
                 }
                 else if (Categoria == 6)
                 {
                     Tipo = 2;
                 }
                 if (Categoria != 1)
                 {
                     Session["Datos_InventarioForestal"] = ClGestion.Impresion_Inventario_Forestal(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), Tipo);
                     RadWindow1.Title       = "Inventario Forestal";
                     RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepInventarioForestal.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(Tipo.ToString(), true)) + "";
                     ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
                 }
             }
             if (ClGestion.Tiene_Anexos_Poligono(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])) == 1)
             {
                 int    Id  = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]);
                 string url = "";
                 //url =  "/Segefor_new/Mapas/MenuMapas.aspx?Id=" + Id;
                 string RutaMapa = System.Configuration.ConfigurationManager.AppSettings["SitioMapas"];
                 url = RutaMapa + "/MenuMapas.aspx?Id=" + Id;
                 string popupScript = "window.open('" + url + "', 'popup_window', 'left=100,top=100,resizable=yes');";
                 ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "script", popupScript, true);
             }
         }
         else if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString() == "2")
         {
             int    Id        = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]);
             string GestionNo = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["NUG"].ToString();
             String js        = "window.open('Wfrm_AnexosPlanManejo.aspx?idgestion=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(Id.ToString(), true)) + "&NUG=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(GestionNo.ToString(), true)) + "', '_blank');";
             ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Open Signature.aspx", js, true);
         }
     }
 }
Exemplo n.º 4
0
 void GrdSolicitudes_ItemCommand(object sender, GridCommandEventArgs e)
 {
     if (e.CommandName == "CmdVer")
     {
         if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString() == "3")
         {
             int Actividad = ClGestion.Get_Actividad_RegistroId(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString()));
             if ((Actividad == 1) || (Actividad == 2) || (Actividad == 3) || (Actividad == 16))
             {
                 DataSet          ds             = ClGestion.Formulario_Profesional(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 Ds_Profesionales Ds_Inscripcion = new Ds_Profesionales();
                 Ds_Inscripcion.Tables["Dt_Formulario"].Clear();
                 DataRow row = Ds_Inscripcion.Tables["Dt_Formulario"].NewRow();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                 {
                     row["Requisitos"] = "Requisitos:\n1) Copia legalizada del título;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU); y  \n3) Copia de documento personal de identificación (DPI).";
                 }
                 else if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "2")
                 {
                     row["Requisitos"] = "Requisitos:\n1) Constancia original de colegiado activo vigente;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU);   y \n3) Copia de documento personal de identificación (DPI).\nPara profesionales con post grado en materia forestal, presentar el documento extendido por la universidad que lo avala.";
                 }
                 if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                 {
                     row["Requisitos"] = row["Requisitos"] + "\nademás de los requisitos anteriores, copia del diploma de aprobación del curso correspondiente.";
                 }
                 row["Region"]    = ds.Tables["Datos"].Rows[0]["region"].ToString();
                 row["SubRegion"] = ds.Tables["Datos"].Rows[0]["Subregion"].ToString();
                 row["NUG"]       = ds.Tables["Datos"].Rows[0]["NUG"].ToString();
                 row["Fecha"]     = ds.Tables["Datos"].Rows[0]["Fecha_Gestion"].ToString();
                 row["Actividad"] = ds.Tables["Datos"].Rows[0]["Nombre_Subcategoria"].ToString();
                 row["Nombres"]   = ds.Tables["Datos"].Rows[0]["Nombres"].ToString();
                 row["Apellidos"] = ds.Tables["Datos"].Rows[0]["Apellidos"].ToString();
                 row["DPI"]       = ds.Tables["Datos"].Rows[0]["DPI"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "")
                 {
                     row["NIT"] = "";
                 }
                 else
                 {
                     row["NIT"] = ds.Tables["Datos"].Rows[0]["NIT"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["telefono"].ToString() == "")
                 {
                     row["Telefono"] = "";
                 }
                 else
                 {
                     row["Telefono"] = ds.Tables["Datos"].Rows[0]["telefono"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["celular"].ToString() == "")
                 {
                     row["Celular"] = "";
                 }
                 else
                 {
                     row["Celular"] = ds.Tables["Datos"].Rows[0]["celular"].ToString();
                 }
                 row["Correo"]             = ds.Tables["Datos"].Rows[0]["Correo"].ToString();
                 row["Direccion"]          = ds.Tables["Datos"].Rows[0]["Direccion"].ToString();
                 row["Municipio"]          = ds.Tables["Datos"].Rows[0]["MunVivienda"].ToString();
                 row["Departamento"]       = ds.Tables["Datos"].Rows[0]["DepaVivienda"].ToString();
                 row["CategoriaProfesion"] = ds.Tables["Datos"].Rows[0]["CategoriaProfesion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                 {
                     row["No_Colegiado"] = "---------------";
                 }
                 else
                 {
                     row["No_Colegiado"] = ds.Tables["Datos"].Rows[0]["No_Colegiado"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                 {
                     row["No_Diploma"] = ds.Tables["Datos"].Rows[0]["No_Diploma"].ToString();
                 }
                 else
                 {
                     row["No_Diploma"] = "-----------------";
                 }
                 row["Direccion_Notifica"] = ds.Tables["Datos"].Rows[0]["Direccion_Notificacion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString() == "")
                 {
                     row["Aldea_Notifica"] = "";
                 }
                 else
                 {
                     row["Aldea_Notifica"] = ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString();
                 }
                 row["Municipio_Notifica"]    = ds.Tables["Datos"].Rows[0]["MunNotifica"].ToString();
                 row["Departamento_Notifica"] = ds.Tables["Datos"].Rows[0]["DepNotifica"].ToString();
                 row["Observaciones"]         = ds.Tables["Datos"].Rows[0]["Observaciones"].ToString();
                 row["Nombre"]    = ds.Tables["Datos"].Rows[0]["Nombre_Firma"].ToString();
                 row["Profesion"] = ds.Tables["Datos"].Rows[0]["Profesion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["Origen_PersonaId"].ToString() == "1")
                 {
                     row["LabelId"] = "2.3 Número de DPI:";
                 }
                 else
                 {
                     row["LabelId"] = "2.3 Número de Pasaporte:";
                 }
                 Ds_Inscripcion.Tables["Dt_Formulario"].Rows.Add(row);
                 ds.Tables.Clear();
                 Session["DataFormulario"] = Ds_Inscripcion;
                 RadWindow1.Title          = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl    = "~/WeForms_Reportes/Wfrm_RepFormularioProfesional.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traite=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("00", true)) + "";
                 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 ((Actividad == 4) || (Actividad == 5) || (Actividad == 19) || (Actividad == 20) || (Actividad == 21))
             {
                 Session["Ds_Formulario_Plantacion_Voluntaria"] = ClGestion.ImpresionFormularioPlantacionVoluntaria(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), 1);
                 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 (Actividad == 18)
             {
                 Session["Ds_Formulario_Plantacion_Voluntaria"] = ClGestion.ImpresionFormularioPlantacionVoluntaria(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), 2);
                 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 (e.CommandName == "CmdSolComple")
     {
         TxtGestionId.Text = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString();
         GrdDetalle.Rebind();
         ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindowDetalle.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
     }
     else if (e.CommandName == "DocAceptacion")
     {
         RadWindow1.Title = "Constancia de Admisión de Expediente";
         string Admision_GestionId = ClGestion.Get_DocumentoId(1, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         string SubCategoria       = ClGestion.Get_SubCategoria_Gestion(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepConstanciaAdmisionExp.aspx?gestion=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(Admision_GestionId, true)) + "&subcategoria=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(SubCategoria.ToString(), true)) + "";
         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 (e.CommandName == "DocProvidencia")
     {
         RadWindow1.Title = "Providencia para traslado de Expediente";
         string  ProvidenciaId    = ClGestion.Get_DocumentoId(2, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet DatosProvidencia = ClGestion.ImpresionProvidenciaGestion(2, Convert.ToInt32(ProvidenciaId), "", "", Convert.ToInt32(Session["UsuarioId"]), 0);
         Session["DatosProvidencia"] = DatosProvidencia;
         RadWindow1.NavigateUrl      = "~/WeForms_Reportes/Wfrm_RepProvidenciaTrasladoExp.aspx";
         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 (e.CommandName == "DocJurudico")
     {
         RadWindow1.Title = "Dictamen Juridico";
         string  Dictamen_Juridico_Id = ClGestion.Get_DocumentoId(3, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet dsTemp = new DataSet();
         DataSet DatosDictamenJuridico = ClGestion.ImpresionDictamenJuridicoGestion(2, Convert.ToInt32(Dictamen_Juridico_Id), 0, "", "", "", "", "", 0, "", "", "", dsTemp, "");
         Session["DatosDictamenJuridico"] = DatosDictamenJuridico;
         RadWindow1.NavigateUrl           = "~/WeForms_Reportes/Wfrm_RepDictamenJuridico.aspx";
         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 (e.CommandName == "DocResolucion")
     {
         RadWindow1.Title = "Resolución de Aprobación de Inscripción";
         string  ResolucionId    = ClGestion.Get_DocumentoId(4, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet DatosResolucion = ClGestion.ImpresionResolucion_Aprobacion(2, Convert.ToInt32(ResolucionId), Convert.ToInt32(Session["UsuarioId"]), 0);
         Session["DatosResolucion"] = DatosResolucion;
         RadWindow1.NavigateUrl     = "~/WeForms_Reportes/Wfrm_RepResolucionAprobacion.aspx";
         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 (e.CommandName == "DocEnmiendas")
     {
         RadWindow1.Title = "Oficio de enmiendas jurídicas";
         string  OficioEnmiendaId     = ClGestion.Get_DocumentoId(5, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet DatosOficioEnmiendas = ClGestion.ImpresionOficioEnmiendasJuridico(2, Convert.ToInt32(OficioEnmiendaId), Convert.ToInt32(Session["UsuarioId"]));
         Session["DatosOficioEnmiendasJuridico"] = DatosOficioEnmiendas;
         RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepOficioEnmiendaJuridica.aspx";
         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 (e.CommandName == "DocOficioDev")
     {
         RadWindow1.Title = "Oficio de Devolución";
         string  OficioDevolucionId    = ClGestion.Get_DocumentoId(6, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet dsTemp                = new DataSet();
         DataSet DatosOficioDevolucion = ClGestion.ImpresionOficioDevolucion(2, Convert.ToInt32(OficioDevolucionId), 0, dsTemp, "", 0, 0);
         Session["DatosOficioDevolucion"] = DatosOficioDevolucion;
         RadWindow1.NavigateUrl           = "~/WeForms_Reportes/Wfrm_RepOficioDevolucion.aspx";
         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 (e.CommandName == "DocRnf")
     {
         RadWindow1.Title = "Constancia RNF";
         string  RegistroId    = ClGestion.Get_DocumentoId(7, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet DatosRegistro = ClGestion.ImpresionConstanciaRFF(2, Convert.ToInt32(RegistroId), 0, 0, DateTime.Now, "01/01/2000", DateTime.Now);
         Session["DatosConstanciaRRF"] = DatosRegistro;
         RadWindow1.NavigateUrl        = "~/WeForms_Reportes/Wfrm_ConstanciaRRF.aspx";
         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.º 5
0
        void ImgVerinfo_Click(object sender, ImageClickEventArgs e)
        {
            if (Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["modulo"].ToString()), true)) == 3)
            {
                int SubCategoriaId = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["subcategoria"].ToString()), true));
                if ((SubCategoriaId == 1) || (SubCategoriaId == 2) || (SubCategoriaId == 3) || (SubCategoriaId == 16))
                {
                    DataSet          ds             = ClGestion.Formulario_Profesional(Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["gestion"].ToString()), true)));
                    Ds_Profesionales Ds_Inscripcion = new Ds_Profesionales();
                    Ds_Inscripcion.Tables["Dt_Formulario"].Clear();
                    DataRow row = Ds_Inscripcion.Tables["Dt_Formulario"].NewRow();
                    if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                    {
                        row["Requisitos"] = "Requisitos:\n1) Copia legalizada del título;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU); y  \n3) Copia de documento personal de identificación (DPI).";
                    }
                    else if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "2")
                    {
                        row["Requisitos"] = "Requisitos:\n1) Constancia original de colegiado activo vigente;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU);   y \n3) Copia de documento personal de identificación (DPI).\nPara profesionales con post grado en materia forestal, presentar el documento extendido por la universidad que lo avala.";
                    }
                    if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                    {
                        row["Requisitos"] = row["Requisitos"] + "\nademás de los requisitos anteriores, copia del diploma de aprobación del curso correspondiente.";
                    }
                    row["Region"]    = ds.Tables["Datos"].Rows[0]["region"].ToString();
                    row["SubRegion"] = ds.Tables["Datos"].Rows[0]["Subregion"].ToString();
                    row["NUG"]       = ds.Tables["Datos"].Rows[0]["NUG"].ToString();
                    row["Fecha"]     = ds.Tables["Datos"].Rows[0]["Fecha_Gestion"].ToString();
                    row["Actividad"] = ds.Tables["Datos"].Rows[0]["Nombre_Subcategoria"].ToString();
                    if ((SubCategoriaId == 1) || (SubCategoriaId == 16))
                    {
                        row["ActividadId"] = 1;
                    }
                    else
                    {
                        row["ActividadId"] = 0;
                    }
                    row["Nombres"]   = ds.Tables["Datos"].Rows[0]["Nombres"].ToString();
                    row["Apellidos"] = ds.Tables["Datos"].Rows[0]["Apellidos"].ToString();
                    row["DPI"]       = ds.Tables["Datos"].Rows[0]["DPI"].ToString();
                    if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "")
                    {
                        row["NIT"] = "";
                    }
                    else
                    {
                        row["NIT"] = ds.Tables["Datos"].Rows[0]["NIT"].ToString();
                    }
                    if (ds.Tables["Datos"].Rows[0]["telefono"].ToString() == "")
                    {
                        row["Telefono"] = "";
                    }
                    else
                    {
                        row["Telefono"] = ds.Tables["Datos"].Rows[0]["telefono"].ToString();
                    }
                    if (ds.Tables["Datos"].Rows[0]["celular"].ToString() == "")
                    {
                        row["Celular"] = "";
                    }
                    else
                    {
                        row["Celular"] = ds.Tables["Datos"].Rows[0]["celular"].ToString();
                    }
                    row["Correo"]             = ds.Tables["Datos"].Rows[0]["Correo"].ToString();
                    row["Direccion"]          = ds.Tables["Datos"].Rows[0]["Direccion"].ToString();
                    row["Municipio"]          = ds.Tables["Datos"].Rows[0]["MunVivienda"].ToString();
                    row["Departamento"]       = ds.Tables["Datos"].Rows[0]["DepaVivienda"].ToString();
                    row["CategoriaProfesion"] = ds.Tables["Datos"].Rows[0]["CategoriaProfesion"].ToString();
                    if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                    {
                        row["No_Colegiado"] = "---------------";
                    }
                    else
                    {
                        row["No_Colegiado"] = ds.Tables["Datos"].Rows[0]["No_Colegiado"].ToString();
                    }
                    if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                    {
                        row["No_Diploma"] = ds.Tables["Datos"].Rows[0]["No_Diploma"].ToString();
                    }
                    else
                    {
                        row["No_Diploma"] = "-----------------";
                    }
                    row["Direccion_Notifica"] = ds.Tables["Datos"].Rows[0]["Direccion_Notificacion"].ToString();
                    if (ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString() == "")
                    {
                        row["Aldea_Notifica"] = "";
                    }
                    else
                    {
                        row["Aldea_Notifica"] = ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString();
                    }
                    row["Municipio_Notifica"]    = ds.Tables["Datos"].Rows[0]["MunNotifica"].ToString();
                    row["Departamento_Notifica"] = ds.Tables["Datos"].Rows[0]["DepNotifica"].ToString();
                    row["Observaciones"]         = ds.Tables["Datos"].Rows[0]["Observaciones"].ToString();
                    row["Nombre"]    = ds.Tables["Datos"].Rows[0]["Nombre_Firma"].ToString();
                    row["Profesion"] = ds.Tables["Datos"].Rows[0]["Profesion"].ToString();
                    if (ds.Tables["Datos"].Rows[0]["Origen_PersonaId"].ToString() == "1")
                    {
                        row["LabelId"] = "2.3 Número de DPI:";
                    }
                    else
                    {
                        row["LabelId"] = "2.3 Número de Pasaporte:";
                    }
                    Ds_Inscripcion.Tables["Dt_Formulario"].Rows.Add(row);
                    ds.Tables.Clear();
                    Session["DataFormulario"] = Ds_Inscripcion;
                    RadWindow1.Title          = "Formulario de Inscripción";
                    RadWindow1.NavigateUrl    = "~/WeForms_Reportes/Wfrm_RepFormularioProfesional.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traite=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("00", true)) + "";
                    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 (Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["modulo"].ToString()), true)) == 2)
            {
                RadWindow1.Title = "Plan de Manejo Forestal";
                int SubCategoriaId = ClManejo.Get_SubCategoriaPlanManejo(Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["gestion"].ToString()), true)), 2, 2);
                int GestionId      = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["gestion"].ToString()), true));
                RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_PlanManejoForestal.aspx?identificateur=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(GestionId.ToString(), true)) + "&source=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("2", true)) + "&souscategorie=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(SubCategoriaId.ToString(), true)) + "";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
        }