示例#1
0
    public DataTable ObternerHoja(EAspirantes idAspirante)
    {
        DataTable        datosE    = new DataTable();
        NpgsqlConnection conection = new NpgsqlConnection(ConfigurationManager.ConnectionStrings["MiConexion"].ConnectionString);

        try
        {
            NpgsqlDataAdapter dataAdapter = new NpgsqlDataAdapter("uniempleo.obtener_hoja", conection);
            dataAdapter.SelectCommand.Parameters.Add("_idaspirante", NpgsqlDbType.Integer).Value = idAspirante.IdAspirante;
            dataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;

            conection.Open();
            dataAdapter.Fill(datosE);
        }
        catch (Exception Ex)
        {
            throw Ex;
        }
        finally
        {
            if (conection != null)
            {
                conection.Close();
            }
        }
        return(datosE);
    }
示例#2
0
    public DataTable eliminarCita(EAspirantes ida) //Int32 _id_asp
    {
        DataTable        perfil   = new DataTable();
        NpgsqlConnection conexion = new NpgsqlConnection(ConfigurationManager.ConnectionStrings["MiConexion"].ConnectionString);

        try
        {
            NpgsqlDataAdapter dataAdapter = new NpgsqlDataAdapter("uniempleo.f_eliminar_cita", conexion);
            dataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;
            dataAdapter.SelectCommand.Parameters.Add("_id_c", NpgsqlDbType.Integer).Value = ida.IdAspirante;

            conexion.Open();
            dataAdapter.Fill(perfil);
        }
        catch (Exception Ex)
        {
            throw Ex;
        }
        finally
        {
            if (conexion != null)
            {
                conexion.Close();
            }
        }
        return(perfil);
    }
示例#3
0
    protected void Lb_cancelar_cita_Command(object sender, CommandEventArgs e)
    {
        if (e.CommandName.Equals("Eliminar"))
        {
            String      ida      = e.CommandArgument.ToString();
            DAspirantes cancelar = new DAspirantes();
            EAspirantes cosa     = new EAspirantes();

            cosa.IdAspirante = int.Parse(ida);
            cancelar.eliminarCita(cosa);

            Response.Redirect("VerPerfilAspirante.aspx");
        }
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int         idp               = (int)Session["id"];
        EAspirantes aspirante         = new EAspirantes();
        DAspirantes aspirantecompleto = new DAspirantes();

        aspirante.IdAspirante = Int32.Parse(Convert.ToString(Request.QueryString["id"]));
        DataTable datosp = aspirantecompleto.AspiranteCompletoDatos(aspirante);

        DL_datosp.DataSource = datosp;
        DL_datosp.DataBind();


        DataTable datosh = aspirantecompleto.ObternerHoja(aspirante);

        DL_hoja.DataSource = datosh;
        DL_hoja.DataBind();

        Eperfil perfilcompleto = new Eperfil();
        Dperfil perfil         = new Dperfil();

        perfilcompleto.Idasp  = Int32.Parse(Convert.ToString(Request.QueryString["id"]));
        perfilcompleto.Estado = 2;
        DataTable perfilgp = perfil.obtenerPuntos(perfilcompleto);

        GV_puntos.DataSource = perfilgp;
        GV_puntos.DataBind();
        DataTable perfilgc = perfil.obtenerComentariosAsp(perfilcompleto);

        GV_comentarios.DataSource = perfilgc;
        GV_comentarios.DataBind();
        //Pinta suma de puntos
        Eperfil perf    = new Eperfil();
        Dperfil perfile = new Dperfil();

        perf.Idasp = Int32.Parse(Convert.ToString(Request.QueryString["id"]));
        DataTable pinta = perfile.ObtienePuntosTotalesA(perf);

        DL_SumaPuntosAsp.DataSource = pinta;
        DL_SumaPuntosAsp.DataBind();
    }