/// <summary> /// Ouvre le rapport congé séléctionné /// </summary> public Conge RapportImprimer() { if (this._DataGridMain.SelectedItem != null) { if (this._DataGridMain.SelectedItems.Count == 1) { ReportingWindow reportingWindow = new ReportingWindow(); long toShow = ((Conge)this._DataGridMain.SelectedItem).Identifiant; reportingWindow._webBrowser.Source = new Uri("http://srv-sql/ReportServer/Pages/ReportViewer.aspx?%2fCONGES&rs:Command=Render&ReportParameter1=" + toShow); reportingWindow.Title = "Rapport pour impression : congé de - " + ((Conge)this._DataGridMain.SelectedItem).Salarie1.Personne.fullname + "-"; bool? dialogResult = reportingWindow.ShowDialog(); return null; } else { MessageBox.Show("Vous ne devez sélectionner qu'un seul congé.", "Attention", MessageBoxButton.OK, MessageBoxImage.Exclamation); return null; } } else { MessageBox.Show("Vous devez sélectionner un congé.", "Attention", MessageBoxButton.OK, MessageBoxImage.Exclamation); return null; } }