public Entête(SVC.ServiceCliniqueClient proxyrecu, ICallback callbackrecu, SVC.Membership memberrecu) { try { InitializeComponent(); proxy = proxyrecu; paramétre = (proxy.GetAllParamétre()); if (paramétre.CheminLogo.ToString() != "") { if (proxy.DownloadDocumentIsHere(paramétre.CheminLogo.ToString()) == true) { imgLogo.Source = LoadImage(proxy.DownloadDocument(paramétre.CheminLogo.ToString())); } } callback = callbackrecu; callbackrecu.InsertParamCallbackEvent += new ICallback.CallbackEventHandler16(callbackrecu_Refresh); GridParam.DataContext = paramétre; proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted); proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed); } catch (Exception ex) { MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error); } }
public void AddRefresh(SVC.Param listmembership) { try { paramétre = (proxy.GetAllParamétre()); GridParam.DataContext = paramétre; } catch (Exception ex) { MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error); } }
public void AddRefresh(SVC.Param listmembership) { try { var converter = new System.Windows.Media.BrushConverter(); SalleAttenteGrid.DataContext = listmembership; EclipsePatientPrésent.Background = (Brush)converter.ConvertFromString((listmembership).RdvPresent); EclipsePatientNomPrésent.Background = (Brush)converter.ConvertFromString((listmembership).RdvNoPresent); EclipsePatientSalle.Background = (Brush)converter.ConvertFromString((listmembership).SalleAttenteTjr); EclipsePatientNoSalle.Background = (Brush)converter.ConvertFromString((listmembership).SalleAttenteQuit); EclipsePatientMedecinSalle.Background = (Brush)converter.ConvertFromString((listmembership).MedecinSalleTjr); EclipsePatientNoSalleMedecin.Background = (Brush)converter.ConvertFromString((listmembership).MedecinSalleNON); VisiteRéglé.Background = (Brush)converter.ConvertFromString((listmembership).VisteRéglé); VisiteNonRéglé.Background = (Brush)converter.ConvertFromString((listmembership).VisteNonRéglé); } catch (Exception ex) { MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error); } }
public ColorPalete(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership memberrecu, ICallback callbackrecu, int interfacerecu, string valeurcolor) { try { InitializeComponent(); lsbBrushes.DataContext = _brushes; proxy = proxyrecu; memberuser = memberrecu; callback = callbackrecu; colorstring = valeurcolor; interfaced = interfacerecu; par = proxy.GetAllParamétre(); proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted); proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed); } catch (Exception ex) { MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error); } }
public ImpressionOrdonnance(SVC.ServiceCliniqueClient proxyrecu, List <SVC.OrdonnancePatient> OrdonnancePatientRecu, SVC.Patient PatientRecu, SVC.Medecin SelectMedecinListe, SVC.EnteteOrdonnace selectedEnteteOrdonnance, bool a4) { try { InitializeComponent(); var people = new List <SVC.Patient>(); people.Add(PatientRecu); proxy = proxyrecu; var Entetemededcin = new List <SVC.EnteteOrdonnace>(); Entetemededcin.Add(selectedEnteteOrdonnance); if (a4 == false) { MemoryStream MyRptStream = new MemoryStream((Medicus.Properties.Resources.Ordonnance), false); reportViewer1.LocalReport.LoadReportDefinition(MyRptStream); } else { if (a4 == true) { MemoryStream MyRptStream = new MemoryStream((Medicus.Properties.Resources.OrdonnanceA4), false); reportViewer1.LocalReport.LoadReportDefinition(MyRptStream); } } ReportDataSource rds = new ReportDataSource(); rds.Name = "DataSet2";//This refers to the dataset name in the RDLC file rds.Value = people; this.reportViewer1.LocalReport.DataSources.Add(rds); var selpara = new List <SVC.Param>(); SVC.Param paramlocal = (proxy.GetAllParamétre()); paramlocal.CheminLogo = "D/Logo.jpg"; selpara.Add((paramlocal)); var peoplemededcin = new List <SVC.Medecin>(); peoplemededcin.Add(SelectMedecinListe); this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", selpara)); this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet3", OrdonnancePatientRecu)); this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet4", peoplemededcin)); this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet5", Entetemededcin)); if (proxy.GetAllParamétre().CheminLogo != "") { if (proxy.DownloadDocumentIsHere(proxy.GetAllParamétre().CheminLogo.ToString()) == true) { reportViewer1.LocalReport.EnableExternalImages = true; /* var image = LoadImage(proxy.DownloadDocument(proxy.GetAllParamétre().CheminLogo.ToString())); * JpegBitmapEncoder encoder = new JpegBitmapEncoder(); * Guid photoID = System.Guid.NewGuid(); * * encoder.Frames.Add(BitmapFrame.Create((BitmapImage)image)); * using (var filestream = new FileStream(photolocation, FileMode.Create)) * encoder.Save(filestream);*/ String photolocation = System.Environment.CurrentDirectory + "/Logo.png"; ReportParameter paramLogo = new ReportParameter(); paramLogo.Name = "ImagePath"; // paramLogo.Values.Add(@"file:///C:\Logo.png"); paramLogo.Values.Add(@"file:///" + photolocation); reportViewer1.LocalReport.SetParameters(paramLogo); // reportViewer1.LocalReport.SetParameters(parameter); } } reportViewer1.RefreshReport(); proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted); proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed); } catch (Exception ex) { MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error); } }