コード例 #1
0
 void CommandAddCommentExecute()
 {
     if (MovieComment != null)
     {
         if (MovieRating >= 0 && MovieRating <= 5)
         {
             serviceClient.CreateComment(id_movie, User_co.Id_user, MovieComment, MovieRating);
             MessageBox.Show("Commentaire ajouté !");
             clearPage();
             ListComment = serviceClient.SelectCommentByMovie(id_movie);
             rating      = serviceClient.SelectRating(id_movie);
             Note        = rating;
         }
         else
         {
             MessageBox.Show("La note doit être comprise entre 0 et 5");
         }
     }
     else
     {
         MessageBox.Show("Vous n'avez pas ajouter de commentaire");
     }
 }