void service_SelectDonatiiComentariiByDonatieCompleted(object sender, ServiceReference2.SelectDonatiiComentariiByDonatieCompletedEventArgs e) { foreach (ComentariiDonatiiType comment in e.Result) { Comentariu ComentariuControl = new Comentariu(comment.TextComentariu, comment.Data.ToString(), comment.Usr, comment.Poza); detaliiComentariiStackPanel.Children.Add(ComentariuControl); detaliiComentariiStackPanel.Height += 122; } AddCommentControl CommentToAdd = new AddCommentControl(null,2); detaliiComentariiStackPanel.Children.Add(CommentToAdd); CommentToAdd.idCampanieTextBlock.Text = idDonatie.ToString(); detaliiComentariiStackPanel.Height += 135; }
void service_SelectComentariiCompleted(object sender, SelectComentariiCompletedEventArgs e) { foreach (ComentariiDetaliat Comment in e.Result) { Comentariu com = new Comentariu(Comment.TextCampanie, Comment.Data.ToShortDateString(),Comment.Usr,Comment.Poza); detaliiComentariiStackPanel.Height += 121; detaliiComentariiStackPanel.Children.Add(com); } AddCommentControl addComment = new AddCommentControl(null,1); //aici tb sa adug poza userului logat addComment.idCampanieTextBlock.Text = id.ToString(); //adaug controlul de adaugat comentarii detaliiComentariiStackPanel.Children.Add(addComment); detaliiComentariiStackPanel.Height += 134; }