protected void btn_ajoutComment_Click(object sender, EventArgs e) { if (tb_commment.Text != "") { Commentaires comm = new Commentaires(); if (Session["personneID"] != null && ViewState["evenementId"] != null) { comm.ajouterCommentaire(int.Parse(Session["personneID"].ToString()), int.Parse(ViewState["evenementId"].ToString()), int.Parse(listeParticipantAyantListe.SelectedItem.Value), tb_commment.Text); } tb_commment.Text = ""; SuccessText.Text = "Le commentaire a bien été ajouté."; chargerCommentaires(); } }
/// <summary> /// /// </summary> /// <param name="evt"></param> /// <param name="personneListe"></param> /// <param name="commentaire"></param> public void enregistrerCommentaire(Evenement evt, Personne personneListe, Personne personneConnectee, Commentaire commentaire) { Commentaires commentaireDAL = new Commentaires(); commentaireDAL.ajouterCommentaire(personneConnectee.id_personne, evt.id_evenement, personneListe.id_personne, commentaire.commentaire); }