private void VerDatosPostulacion(int IdPostulacion) { Postulacion P = LogicaPostulacion.FindbyId(IdPostulacion); if (P != null) { HdnIdPostulacion.Value = P.PostulacionId.ToString(); LblNombre.Text = P.Jugador.NombreCompleto(); LblFecha.Text = P.Fecha.ToString().Split(':')[0] + ":" + P.Fecha.ToString().Split(':')[1]; LblComentario.Text = P.Comentario; } }
protected void RegistrarPostulacion_Click(object sender, EventArgs e) { if (DDLHoras.SelectedValue != null) { int postulanteId = ((Jugador)Session["Logueado"]).JugadorId; Postulacion P = new Postulacion { Comentario = TxtComentario.Text, Fecha = DateTime.Parse(TxtFecha.Text + " " + DDLHoras.SelectedValue), Lugar = TxtLugar.Text, Confirmada = false }; LogicaPostulacion.Add(P, postulanteId); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Logueado"] != null) { int jugadorId = ((Jugador)Session["Logueado"]).JugadorId; var postulaciones = LogicaPostulacion.FindAllOrdenadoPorFecha(jugadorId); if (postulaciones.Count > 0) { RepeaterPostulaciones.DataSource = postulaciones; RepeaterPostulaciones.DataBind(); } else { //postulaciones vacia } } }