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); }
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); }
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"); } }
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(); }