Пример #1
0
    protected void btnUsarCVar_Click(object sender, EventArgs e)
    {
        sgwMulticapa.Gestor.Gestor FGestor = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        DataSet FData = FGestor.LeerSQL("SELECT ID_DOCENTES FROM SIS_DOCENTES.DOCENTES WHERE ID_USUARIOS = " + Session["UsuarioID"].ToString());

        FGestor.EscribirSQL("UPDATE SIS_DOCENTES.DOCENTES SET CVAR = 'S' WHERE ID_DOCENTES = " + FData.Tables[0].Rows[0].ItemArray[0].ToString());
        FGestor.EscribirSQL("INSERT INTO SIS_DOCENTES.DOCENTES_ORIGENES_CV (CVAR, ID_DOCENTES, FECHA, ID_DOCENTES_ORIGENES_CV) VALUES ('S', " + FData.Tables[0].Rows[0].ItemArray[0].ToString() + ", SYSDATE, SIS_DOCENTES.SEQ_DOCENTES_ORIGENES_CV.NEXTVAL)");
        Response.Redirect("inicio.aspx");
    }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     sgwNucleo.Usuarios.VerificarUsuarioAutenticado();
     actualizarDatosTitulosGrado();
     actualizarDatosTitulosDoctorados();
     actualizarDatosTitulosMaestrias();
     actualizarDatosTitulosEspecializaciones();
     actualizarDatosOtrosTitulos();
     actualizarTituloMaximo();
     cvarActualizarTituloMaximo(Session["CUIT"].ToString());
     if ((Session["ID_ESTADOS_PRESENTACIONES"].ToString() != null) && (Session["ID_ESTADOS_PRESENTACIONES"].ToString() != "2"))
     {
         if (Session["ID_PRESENTACIONES"] != "")
         {
             sgwMulticapa.Gestor.Gestor FGestor = sgwMulticapa.Gestor.Gestor.GestorGlobal();
             DataSet FData = FGestor.LeerSQL("SELECT ID_TIPOS_TITULOS FROM SIS_DOCENTES.DOCENTES WHERE ID_DOCENTES = " + Session["ID_DOCENTES"].ToString());
             string  ID    = FData.Tables[0].Rows[0].ItemArray[0].ToString();
             if (ID != "")
             {
                 FGestor.EscribirSQL("UPDATE SIS_INSTRUCTIVOS.DOCENTES_PRES_TITULOS SET ID_TIPOS_TITULOS = " + ID +
                                     " WHERE ID_PRESENTACIONES = " + Session["ID_PRESENTACIONES"].ToString() + " AND ID_DOCENTES = " + Session["ID_DOCENTES"].ToString());
             }
         }
     }
 }
Пример #3
0
    protected bool verificarCurriculumCvar(string CUIT)
    {
        System.Xml.XmlDocument     CVAR    = null;
        sgwMulticapa.Gestor.Gestor FGestor = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        DataSet FData = FGestor.LeerSQL("SELECT D.ID_PAISES_ORIGEN, P.CODIGO_ISO, D.NUMERO_DOCUMENTO " +
                                        "FROM  SIS_DOCENTES.DOCENTES D, SIS_MAINFRAME.USUARIOS U, SIS_CONEAU.PAISES P " +
                                        "WHERE U.ID_USUARIOS = D.ID_USUARIOS AND D.ID_PAISES_ORIGEN = P.ID_PAISES " +
                                        "AND D.ID_USUARIOS = " + Session["UsuarioID"]);
        string FIdentificador = CUIT;

        if (FData.Tables[0].Rows[0].ItemArray[0].ToString() != "13")
        {
            FIdentificador = FData.Tables[0].Rows[0].ItemArray[1].ToString() + " " + FData.Tables[0].Rows[0].ItemArray[2].ToString();
        }

        try
        {
            CVAR = sgwFunciones.CONEAU.Docentes.cvarLeerXMLRemoto(FIdentificador, "datosPersonales/identificacion");
        }
        catch
        {
            if (FData.Tables[0].Rows[0].ItemArray[0].ToString() != "13")
            {
                try
                {
                    CVAR = sgwFunciones.CONEAU.Docentes.cvarLeerXMLRemoto(CUIT, "datosPersonales/identificacion");
                    FGestor.EscribirSQL("UPDATE SIS_DOCENTES.DOCENTES SET ID_PAISES_ORIGEN = 13 WHERE CUIT = '" + CUIT + "'");
                }
                catch
                {
                    sgwNucleo.Pagina.MostrarEstado("No se encontró un currículum en CVar con su número de CUIT.", 1);
                    return(false);
                }
            }
        }
        string FApellido = sgwFunciones.CONEAU.Docentes.cvarLeer(CVAR, "apellido").ToLower().Trim();

        if (!Session["APELLIDO"].ToString().ToLower().Trim().Contains(FApellido))
        {
            sgwNucleo.Pagina.MostrarEstado("No se encontró un currículum en CVar que coincida con su apellido.", 1);
            return(false);
        }
        CVAR = sgwFunciones.CONEAU.Docentes.cvarLeerXMLRemoto(FIdentificador, "datosPersonales/direccionResidencial");
        string FMail1 = sgwFunciones.CONEAU.Docentes.cvarLeer(CVAR, "email").ToLower().Trim();

        CVAR = sgwFunciones.CONEAU.Docentes.cvarLeerXMLRemoto(FIdentificador, "datosPersonales/direccionLaboral");
        string FMail2 = sgwFunciones.CONEAU.Docentes.cvarLeer(CVAR, "email").ToLower().Trim();

        if ((!Session["UsuarioCorreo"].ToString().ToLower().Trim().Contains(FMail1)) && (!Session["UsuarioCorreo"].ToString().ToLower().Trim().Contains(FMail2)))
        {
            sgwNucleo.Pagina.MostrarEstado("No se encontró un currículum en CVar que coincida con su dirección de correo electrónico.", 1);
            return(false);
        }
        return(true);
    }
Пример #4
0
    protected void btnOtroRechazar_Click(object sender, EventArgs e)
    {
        sgwMulticapa.Gestor.Gestor FGestor = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        DataSet FData = FGestor.LeerSQL("SELECT * FROM SIS_INSTRUCTIVOS.Q_OTRAS_VINCULACIONES WHERE ID_CLAVE = '" +
                                        Request["id"].ToString() + "' AND ID_DOCENTES = " + Session["ID_DOCENTES"].ToString());

        FGestor.EscribirSQL("UPDATE " + FData.Tables[0].Rows[0]["TABLA"].ToString() + " SET " +
                            "ID_TIPOS_ESTADOS_CARGOS = 3 WHERE " + FData.Tables[0].Rows[0]["CAMPO_CLAVE"].ToString() +
                            " = " + FData.Tables[0].Rows[0]["CLAVE"].ToString());
        pnlVinculacionOtro.Visible = true;
        pnlEscribir.Visible        = false;
        Response.Redirect("default.aspx");
    }
Пример #5
0
    protected void btnRechazarO_Click(object sender, EventArgs e)
    {
        if (grdVinculacionesO.FocusedRowIndex < 0)
        {
            return;
        }
        if (pnlNoAnda.Visible)
        {
            sgwNucleo.Pagina.MostrarEstado("No puede continuar debido a que no encontramos su currículum CVar.", 1);
            return;
        }
        if (!tieneTituloMaximo())
        {
            sgwNucleo.Pagina.MostrarEstado("Para continuar debe ingresar su formación (título obtenido).", 1);
            return;
        }
        string FSQL = "UPDATE " + grdVinculacionesO.GetRowValues(grdVinculacionesO.FocusedRowIndex, "TABLA").ToString() + " SET " +
                      "ID_TIPOS_ESTADOS_CARGOS = 3 WHERE " + grdVinculacionesO.GetRowValues(grdVinculacionesO.FocusedRowIndex, "CAMPO_CLAVE").ToString() +
                      " = " + grdVinculacionesO.GetRowValues(grdVinculacionesO.FocusedRowIndex, "CLAVE").ToString();

        sgwMulticapa.Gestor.Gestor FGestor = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        FGestor.EscribirSQL(FSQL);
        actualizarVinculacionesOtras();
    }
Пример #6
0
    protected void btnAceptar_Click(object sender, EventArgs e)
    {
        if ((pnlCUIT.Visible) && (!sgwNucleo.Funciones.VerificarCUIT(txtCUIT.Text)))
        {
            sgwNucleo.Pagina.MostrarEstado("El CUIT ingresado no es válido.", 1);
            return;
        }

        // Origen CVar
        if (ddlOrigen.SelectedIndex == 0)
        {
            if (!verificarCurriculumCvar(txtCUIT.Text))
            {
                return;
            }
        }

        sgwMulticapa.Gestor.Gestor FGestor = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        int idColaborador = 0;

        if (txtColaborador.Text != "")
        {
            if (!sgwNucleo.Funciones.VerificarCorreo(txtColaborador.Text))
            {
                sgwNucleo.Pagina.MostrarEstado("La dirección de correo ingresada no es correcta.", 1);
                return;
            }
            DataSet FData = FGestor.LeerSQL("SELECT U.ID_USUARIOS FROM SIS_MAINFRAME.USUARIOS U WHERE ACTIVO = 'S' AND LOWER(TRIM(U.CORREO_ELECTRONICO)) = '" + txtColaborador.Text.ToLower().Trim() + "'");
            if (FData.Tables[0].Rows.Count != 1)
            {
                sgwNucleo.Pagina.MostrarEstado("El colaborador ingresado no posee cuenta activa de CONEAU Global.", 1);
                return;
            }
            idColaborador = int.Parse(FData.Tables[0].Rows[0].ItemArray[0].ToString());
        }
        string FSQL = "UPDATE SIS_DOCENTES.DOCENTES SET ";

        if (ddlOrigen.SelectedIndex == 0)
        {
            FSQL += "CVAR = 'S'";
        }
        else
        {
            FSQL += "CVAR = 'N'";
        }
        if (pnlCUIT.Visible)
        {
            FSQL += ", CUIT = '" + txtCUIT.Text.Trim() + "'";
        }
        if (txtColaborador.Text != "")
        {
            FSQL += ", ID_USUARIOS_COLABORADOR = " + idColaborador.ToString();
        }
        else
        {
            FSQL += ", ID_USUARIOS_COLABORADOR = NULL";
        }
        FSQL += " WHERE ID_USUARIOS = " + Session["UsuarioID"];

        if (idColaborador > 0)
        {
            DataSet FData = FGestor.LeerSQL("SELECT GU.ID_GRUPOS_USUARIOS FROM SIS_MAINFRAME.GRUPOS_USUARIOS GU WHERE ID_USUARIOS = " + idColaborador + " AND ID_GRUPOS = 76");
            if (FData.Tables[0].Rows.Count == 0)
            {
                FGestor.EscribirSQL("INSERT INTO SIS_MAINFRAME.GRUPOS_USUARIOS (ID_GRUPOS_USUARIOS, ID_GRUPOS, ID_USUARIOS) VALUES (" +
                                    "SIS_MAINFRAME.SEQ_GRUPOS_USUARIOS.NEXTVAL, 76, " + idColaborador + ")");
            }
        }
        FGestor.EscribirSQL(FSQL);

        if (ddlOrigen.SelectedIndex != int.Parse(Session["ORIGENCV"].ToString()))
        {
            if (ddlOrigen.SelectedIndex == 0)
            {
                Session["ORIGENCV"] = "S";
            }
            else
            {
                Session["ORIGENCV"] = "N";
            }
            FGestor.EscribirSQL("INSERT INTO SIS_DOCENTES.DOCENTES_ORIGENES_CV (CVAR, ID_DOCENTES, FECHA, ID_DOCENTES_ORIGENES_CV) VALUES ('" + Session["ORIGENCV"].ToString() + "', " + int.Parse(Session["ID_DOCENTES"].ToString()) + ", SYSDATE, SIS_DOCENTES.SEQ_DOCENTES_ORIGENES_CV.NEXTVAL )");
        }


        Response.Redirect("default.aspx");
    }
Пример #7
0
    public static void cvarActualizarTituloMaximo(string CUIT)
    {
        int idTipoTitulo = 0;

        // Doctorados
        try
        {
            DataSet ds = new DataSet();
            System.Xml.XmlDocument CVAR = sgwFunciones.CONEAU.Docentes.cvarLeerXML(CUIT, "formacionAcademica/doctorados");
            ds.ReadXml(new XmlNodeReader(CVAR));
            if (ds.Tables.Count > 0)
            {
                for (int i = ds.Tables[0].Rows.Count - 1; i >= 0; i--)
                {
                    if ((ds.Tables[0].Columns.IndexOf("situacionDeNivel") >= 0) && (ds.Tables[0].Rows[i]["situacionDeNivel"].ToString() != "Completo"))
                    {
                        ds.Tables[0].Rows[i].Delete();
                    }
                }
                if (ds.Tables[0].Rows.Count > 0)
                {
                    idTipoTitulo = 6;
                }
            }
        }
        catch { }

        // Maestrías
        if (idTipoTitulo == 0)
        {
            try
            {
                DataSet ds = new DataSet();
                System.Xml.XmlDocument CVAR = sgwFunciones.CONEAU.Docentes.cvarLeerXML(CUIT, "formacionAcademica/maestrias");
                ds.ReadXml(new XmlNodeReader(CVAR));
                if (ds.Tables.Count > 0)
                {
                    for (int i = ds.Tables[0].Rows.Count - 1; i >= 0; i--)
                    {
                        if ((ds.Tables[0].Columns.IndexOf("situacionDeNivel") >= 0) && (ds.Tables[0].Rows[i]["situacionDeNivel"].ToString() != "Completo"))
                        {
                            ds.Tables[0].Rows[i].Delete();
                        }
                    }
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        idTipoTitulo = 5;
                    }
                }
            }
            catch { }
        }

        // Especializaciones
        if (idTipoTitulo == 0)
        {
            try
            {
                DataSet ds = new DataSet();
                System.Xml.XmlDocument CVAR = sgwFunciones.CONEAU.Docentes.cvarLeerXML(CUIT, "formacionAcademica/especializaciones");
                ds.ReadXml(new XmlNodeReader(CVAR));
                if (ds.Tables.Count > 0)
                {
                    for (int i = ds.Tables[0].Rows.Count - 1; i >= 0; i--)
                    {
                        if ((ds.Tables[0].Columns.IndexOf("situacionDeNivel") >= 0) && (ds.Tables[0].Rows[i]["situacionDeNivel"].ToString() != "Completo"))
                        {
                            ds.Tables[0].Rows[i].Delete();
                        }
                    }
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        idTipoTitulo = 4;
                    }
                }
            }
            catch { }
        }

        // Grados
        if (idTipoTitulo == 0)
        {
            try
            {
                DataSet ds = new DataSet();
                System.Xml.XmlDocument CVAR = sgwFunciones.CONEAU.Docentes.cvarLeerXML(CUIT, "formacionAcademica/grados");
                ds.ReadXml(new XmlNodeReader(CVAR));
                if (ds.Tables.Count > 0)
                {
                    for (int i = ds.Tables[0].Rows.Count - 1; i >= 0; i--)
                    {
                        if ((ds.Tables[0].Columns.IndexOf("situacionDeNivel") >= 0) && (ds.Tables[0].Rows[i]["situacionDeNivel"].ToString() != "Completo"))
                        {
                            ds.Tables[0].Rows[i].Delete();
                        }
                    }
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        idTipoTitulo = 3;
                    }
                }
            }
            catch { }
        }

        // Terciarios
        if (idTipoTitulo == 0)
        {
            try
            {
                DataSet ds = new DataSet();
                System.Xml.XmlDocument CVAR = sgwFunciones.CONEAU.Docentes.cvarLeerXML(CUIT, "formacionAcademica/terciariaNoUniversitaria");
                ds.ReadXml(new XmlNodeReader(CVAR));
                if (ds.Tables.Count > 0)
                {
                    for (int i = ds.Tables[0].Rows.Count - 1; i >= 0; i--)
                    {
                        if ((ds.Tables[0].Columns.IndexOf("situacionDeNivel") >= 0) && (ds.Tables[0].Rows[i]["situacionDeNivel"].ToString() != "Completo"))
                        {
                            ds.Tables[0].Rows[i].Delete();
                        }
                    }
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        idTipoTitulo = 2;
                    }
                }
            }
            catch { }
        }

        // Guardar el título máximo obtenido
        try
        {
            sgwMulticapa.Gestor.Gestor FGestor = new sgwMulticapa.Gestor.Gestor();
            if (idTipoTitulo == 0)
            {
                FGestor.EscribirSQL("UPDATE SIS_DOCENTES.DOCENTES SET ID_TIPOS_TITULOS = NULL WHERE CVAR = 'S' AND CUIT = '" + CUIT + "'");
            }
            else
            {
                FGestor.EscribirSQL("UPDATE SIS_DOCENTES.DOCENTES SET ID_TIPOS_TITULOS = " + idTipoTitulo + " WHERE CVAR = 'S' AND CUIT = '" + CUIT + "'");
            }
        }
        catch { }
    }
Пример #8
0
    // Botones General
    protected bool guardar()
    {
        string FEstado = "";

        if (!sgwNucleo.Funciones.VerificarRequerido(edtDocenteApellido.Text))
        {
            FEstado = "el apellido";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtDocenteNombre1.Text))
        {
            FEstado = "el primer nombre";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtDocenteFechaNacimiento.Text))
        {
            FEstado = "la fecha de nacimiento";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtDocenteDocumento.Text))
        {
            FEstado = "el número de documento";
        }
        else
        if ((pnlCUIT1.Visible) && ((!sgwNucleo.Funciones.VerificarRequerido(edtDocenteCuit.Text))))
        {
            FEstado = "el número de CUIT/CUIL";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtDocenteCalle.Text))
        {
            FEstado = "la calle";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtDocenteNumero.Text))
        {
            FEstado = "el número";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtDocenteCodigoPostal.Text))
        {
            FEstado = "el código postal";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtDocenteLocalidad.Text))
        {
            FEstado = "la localidad";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtDocenteTelefono.Text))
        {
            FEstado = "el teléfono";
        }
        else
        if (cmbDocentePais.SelectedValue == "13")
        {
            if ((cmbDepartamento.SelectedIndex < 0) || (int.Parse(cmbDepartamento.SelectedValue) < 0))
            {
                FEstado = "el departamento/partido";
            }
        }

        if ((pnlCUIT1.Visible) && (!sgwNucleo.Funciones.VerificarCUIT(edtDocenteCuit.Text)))
        {
            sgwNucleo.Pagina.MostrarEstado("El CUIT ingresado no es válido.", 1);
            return(false);
        }
        if (FEstado != "")
        {
            sgwNucleo.Pagina.MostrarEstado("Debe completar " + FEstado + ".", 1);
            return(false);
        }
        sgwMulticapa.Gestor.Gestor FGestor = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        string FCondicion;

        if (Session["ID_DOCENTES"] != null)
        {
            FCondicion = "ID_DOCENTES = " + Session["ID_DOCENTES"].ToString();
        }
        else
        {
            FCondicion = "ID_USUARIOS = " + Session["UsuarioID"].ToString();
        }
        Docente FDocente = (Docente)FGestor.ObtenerObjeto(typeof(Docente), FCondicion);

        if (FDocente == null)
        {
            FDocente             = new Docente();
            FDocente.ID_USUARIOS = int.Parse(Session["UsuarioID"].ToString());
        }
        FDocente.APELLIDO       = edtDocenteApellido.Text.Trim();
        FDocente.PRIMER_NOMBRE  = edtDocenteNombre1.Text.Trim();
        FDocente.SEGUNDO_NOMBRE = edtDocenteNombre2.Text.Trim();
        FDocente.SEXO           = cmbDocenteSexo.SelectedValue;
        FDocente.GuardarFecha("FECHA_NACIMIENTO", edtDocenteFechaNacimiento.Text);
        FDocente.ID_TIPOS_DOCUMENTO = int.Parse(cmbTipoDocumento.SelectedValue);
        FDocente.NUMERO_DOCUMENTO   = edtDocenteDocumento.Text;
        FDocente.CUIT          = edtDocenteCuit.Text;
        FDocente.CALLE         = edtDocenteCalle.Text;
        FDocente.NUMERO        = edtDocenteNumero.Text;
        FDocente.PISO          = edtDocentePiso.Text;
        FDocente.DEPARTAMENTO  = edtDocenteDepartamento.Text;
        FDocente.LOCALIDAD     = edtDocenteLocalidad.Text;
        FDocente.CODIGO_POSTAL = edtDocenteCodigoPostal.Text;
        FDocente.ID_PAISES     = int.Parse(cmbDocentePais.SelectedValue);
        Session["ID_PAISES"]   = cmbDocentePais.SelectedValue;
        FGestor.EscribirSQL("UPDATE SIS_MAINFRAME.USUARIOS SET SEXO = '" + FDocente.SEXO +
                            "' WHERE ID_USUARIOS = " + Session["UsuarioID"].ToString());
        if (cmbDocentePais.SelectedValue == "13")
        {
            FDocente.ID_ESTADOS       = int.Parse(cmbDocenteProvincia.SelectedValue);
            FDocente.ID_DEPARTAMENTOS = int.Parse(cmbDepartamento.SelectedValue);
        }
        FDocente.TELEFONO = edtDocenteTelefono.Text;
        return(FGestor.GuardarObjeto(FDocente));
    }