Ejemplo n.º 1
0
        public ImpressionMouvement(SVC.ServiceCliniqueClient proxyrecu, List <SVC.Depense> listrecudepense)
        {
            try
            {
                InitializeComponent();

                proxy = proxyrecu;

                MemoryStream MyRptStream = new MemoryStream((Medicus.Properties.Resources.MouvementCaisse), false);

                reportViewer1.LocalReport.LoadReportDefinition(MyRptStream);

                var selpara = new List <SVC.Param>();
                selpara.Add((proxy.GetAllParamétre()));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", selpara));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", listrecudepense));
                reportViewer1.LocalReport.EnableExternalImages = true;
                ReportParameter paramLogo = new ReportParameter();
                paramLogo.Name = "ImagePath";
                String photolocation = System.Environment.CurrentDirectory + "/Logo.png";

                paramLogo.Values.Add(@"file:///" + photolocation);
                reportViewer1.LocalReport.SetParameters(paramLogo);
                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);
            }
        }
Ejemplo n.º 2
0
        public AjouterMotifDepense(SVC.ServiceCliniqueClient proxyrecu, ICallback callbackrecu, SVC.MotifDepense motifrecu, SVC.Membership memberrecu)
        {
            try
            {
                InitializeComponent();
                callback   = callbackrecu;
                proxy      = proxyrecu;
                special    = motifrecu;
                membership = memberrecu;
                proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);

                proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
                if (special != null)
                {
                    MotifGrid.DataContext = special;
                    f.Content             = "Modifier le motif de dépense";
                }
                else
                {
                    btnCreer.IsEnabled = false;
                    f.Content          = "Créer un motif de dépense";
                }
                title = this.Title;
                //   titlebrush = this.WindowTitleBrush;
            }
            catch (Exception ex)
            {
                MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Ejemplo n.º 3
0
        public ImpressionArret(SVC.ServiceCliniqueClient proxyrecu, List <SVC.ArretDetravail> listdetailArretDetravail, List <SVC.Medecin> listmededcin)
        {
            try
            {
                InitializeComponent();



                MemoryStream MyRptStream1 = new MemoryStream((Medicus.Properties.Resources.ArretDeTravail), false);
                reportViewerCertificatArret.LocalReport.LoadReportDefinition(MyRptStream1);



                this.reportViewerCertificatArret.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", listmededcin));
                this.reportViewerCertificatArret.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", listdetailArretDetravail));

                reportViewerCertificatArret.LocalReport.EnableExternalImages = true;



                ReportParameter paramLogo = new ReportParameter();
                paramLogo.Name = "ImagePath";
                String photolocation = System.Environment.CurrentDirectory + "/Logo.png";

                paramLogo.Values.Add(@"file:///" + photolocation);

                reportViewerCertificatArret.LocalReport.SetParameters(paramLogo);
                reportViewerCertificatArret.RefreshReport();
            }catch (Exception ex)
            {
                MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
        public ImpressionMotifDepense(SVC.ServiceCliniqueClient proxyRECU, List <SVC.MotifDepense> Listerecu)
        {
            try
            {
                InitializeComponent();
                proxy = proxyRECU;
                // datable = datatablerecu;


                MemoryStream MyRptStream = new MemoryStream((Medicus.Properties.Resources.ReportListeMotifDepense), false);

                reportViewer1.LocalReport.LoadReportDefinition(MyRptStream);
                ReportDataSource rds = new ReportDataSource();
                rds.Name = "DataSet1"; //This refers to the dataset name in the RDLC file
                                       // rds.Value = proxy1.GetAllMembership();
                rds.Value = Listerecu;
                this.reportViewer1.LocalReport.DataSources.Add(rds);
                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);
            }
        }
Ejemplo n.º 5
0
        public bool authentification(SVC.ServiceCliniqueClient testproxy, string usernameTextbox)
        {
            var query = from c in testproxy.GetAllMembership()
                        select c;

            var results    = query.ToList();
            var disponible = results.Where(list1 => list1.MotDePasse == usernameTextbox).FirstOrDefault();

            MemBerShip = disponible;
            if (disponible != null && disponible.Actif == true)
            {
                MemBerShip = disponible;
                username   = disponible.UserName;

                return(true);
            }
            else
            {
                this.Title            = "Cette Session n'existe pas ou inactif";
                this.WindowTitleBrush = Brushes.Red;
                this.localClient      = null;
                proxy.Close();
                return(false);
            }
        }
Ejemplo n.º 6
0
        //  Brush titlebrush;
        public AjouterDci(SVC.ServiceCliniqueClient proxyrecu, SVC.Dci spécialtiérecu, SVC.Membership membershirecu)
        {
            try
            {
                InitializeComponent();

                proxy      = proxyrecu;
                special    = spécialtiérecu;
                membership = membershirecu;
                proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);

                proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
                if (special != null)
                {
                    FournVousGrid.DataContext = special;
                }
                else
                {
                    btnCreer.IsEnabled = false;
                }
                title = this.Title;
                //  titlebrush = this.WindowTitleBrush;
            }
            catch (Exception ex)
            {
                MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
        public AjouterDictionnaire(SVC.ServiceCliniqueClient proxyrecu, ICallback callbackrecu, SVC.Dictionnaire spécialtiérecu, SVC.Membership membershirecu)
        {
            try
            {
                InitializeComponent();
                callback   = callbackrecu;
                proxy      = proxyrecu;
                special    = spécialtiérecu;
                membership = membershirecu;
                proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);

                proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
                if (special != null)
                {
                    ActeGrid.DataContext = special;
                    f.Content            = "Modifier terminologie dentaire";
                }
                else
                {
                    f.Content = "Créer une terminologie dentaire";
                }
                title = this.Title;
                //      titlebrush = this.WindowTitleBrush;
            }
            catch (Exception ex)
            {
                MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Ejemplo n.º 8
0
        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);
            }
        }
Ejemplo n.º 9
0
        public ReportListePatient(SVC.ServiceCliniqueClient proxyrecu, List <SVC.Patient> listerecu)
        {
            try
            {
                InitializeComponent();
                proxy = proxyrecu;
                // datable = datatablerecu;

                reportViewer1.LocalReport.ReportPath = "../../Patient/ReportPatients.rdlc";
                ReportDataSource rds = new ReportDataSource();
                rds.Name = "DataSet1"; //This refers to the dataset name in the RDLC file
                                       // rds.Value = proxy1.GetAllMembership();
                rds.Value = listerecu;
                this.reportViewer1.LocalReport.DataSources.Add(rds);
                var selpara = new List <SVC.Param>();
                selpara.Add((proxy.GetAllParamétre()));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", selpara));
                reportViewer1.LocalReport.EnableExternalImages = true;
                ReportParameter paramLogo = new ReportParameter();
                paramLogo.Name = "ImagePath";
                String photolocation = System.Environment.CurrentDirectory + "/Logo.png";

                paramLogo.Values.Add(@"file:///" + photolocation);
                reportViewer1.LocalReport.SetParameters(paramLogo);

                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);
            }
        }
Ejemplo n.º 10
0
        public VisiteAs(SVC.ServiceCliniqueClient proxyrecu, SVC.Diagnostic diarecu, DossierPatient dossierrecu, SVC.Constante constanterecu)
        {
            try
            {
                InitializeComponent();

                proxy                                  = proxyrecu;
                dia                                    = diarecu;
                constantep                             = constanterecu;
                txtIMDC.DataContext                    = diarecu;
                txtCardiAdulte.DataContext             = diarecu;
                txtYeux.DataContext                    = diarecu;
                txtCards.DataContext                   = diarecu;
                DatePriseAnamnese.SelectedDate         = DateTime.Now;
                ConstaneAnamneseDétailGrid.DataContext = constanterecu;
                dossierrecu.IsEnabled                  = false;
                doss                                   = dossierrecu;
                proxy.InnerDuplexChannel.Opened       += new EventHandler(InnerDuplexChannel_Opened);
                proxy.InnerDuplexChannel.Closed       += new EventHandler(InnerDuplexChannel_Closed);
            }
            catch (Exception ex)
            {
                MessageBoxResult results = Xceed.Wpf.Toolkit.MessageBox.Show(Medicus.Properties.Resources.Logiciel, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Ejemplo n.º 11
0
        public Dicom(SVC.ServiceCliniqueClient proxyrecu, SVC.DicomFichier castrecu)
        {
            try
            {
                InitializeComponent();
                proxy         = proxyrecu;
                dicom         = castrecu;
                dd            = new DicomDecoder();
                pixels8       = new List <byte>();
                pixels16      = new List <ushort>();
                pixels24      = new List <byte>();
                imageOpened   = false;
                signedImage   = false;
                maxPixelValue = 0;
                minPixelValue = 65535;
                //imagePanelControl = new ImagePanelControl();
                BinaryWriter binWriter = new BinaryWriter(new MemoryStream());
                binWriter.Write(proxy.DownloadDocument(dicom.ChemainFichier.ToString()));

                readBinary = new BinaryReader(binWriter.BaseStream);

                ReadAndDisplayDicomFileBinaryReader(readBinary, dicom.NomFichierDicom);

                this.Title = dicom.ChemainFichier;


                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 ImpressionOneSession(SVC.ServiceCliniqueClient proxy1, SVC.Membership SelectMedecin)
        {
            try
            {
                InitializeComponent();

                var people = new List <Membership>();
                people.Add(SelectMedecin);
                proxy = proxy1;
                // datable = datatablerecu;


                MemoryStream MyRptStream = new MemoryStream((Medicus.Properties.Resources.ReportOneMembership), false);

                reportViewer1.LocalReport.LoadReportDefinition(MyRptStream);
                ReportDataSource rds = new ReportDataSource();
                rds.Name  = "DataSetOneMembership";//This refers to the dataset name in the RDLC file
                rds.Value = people;
                this.reportViewer1.LocalReport.DataSources.Add(rds);
                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);
            }
        }
Ejemplo n.º 13
0
        public DXWindowMain(SVC.ServiceCliniqueClient PROXYRECU, SVC.Membership memberrecu, ICallback callbackrecu, SVC.Client localclientrecu)
        {
            try
            {
                InitializeComponent();
                MemBerShip           = memberrecu;
                proxy                = PROXYRECU;
                callback             = callbackrecu;
                localClient          = localclientrecu;
                SESSSIONNAME.Content = localClient.UserName.ToString();
                //  VisiteAs ll = new VisiteAs();
                //ll.Show();

                FrameInterieur.Navigate(new Aceuill(proxy, MemBerShip, callback, this, localClient));

                autorisation(PROXYRECU, memberrecu, callbackrecu, localclientrecu);



                callbackrecu.callback += new ICallback.CallbackEventHandler(callbackrecu_callback);

                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);
            }
        }
Ejemplo n.º 14
0
        public ParamétreColor(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership memberrecu, ICallback callbackrecu)
        {
            try
            {
                InitializeComponent();
                proxy      = proxyrecu;
                memberuser = memberrecu;
                callback   = callbackrecu;
                SalleAttenteGrid.DataContext = proxy.GetAllParamétre();
                proxy      = proxyrecu;
                memberuser = memberrecu;
                callback   = callbackrecu;
                callbackrecu.InsertParamCallbackEvent += new ICallback.CallbackEventHandler16(callbackrecu_Refresh);

                var converter = new System.Windows.Media.BrushConverter();
                EclipsePatientPrésent.Background    = (Brush)converter.ConvertFromString((proxy.GetAllParamétre()).RdvPresent);
                EclipsePatientNomPrésent.Background = (Brush)converter.ConvertFromString((proxy.GetAllParamétre()).RdvNoPresent);
                EclipsePatientSalle.Background      = (Brush)converter.ConvertFromString((proxy.GetAllParamétre()).SalleAttenteTjr);
                EclipsePatientNoSalle.Background    = (Brush)converter.ConvertFromString((proxy.GetAllParamétre()).SalleAttenteQuit);

                EclipsePatientMedecinSalle.Background   = (Brush)converter.ConvertFromString((proxy.GetAllParamétre()).MedecinSalleTjr);
                EclipsePatientNoSalleMedecin.Background = (Brush)converter.ConvertFromString((proxy.GetAllParamétre()).MedecinSalleNON);
                VisiteRéglé.Background    = (Brush)converter.ConvertFromString((proxy.GetAllParamétre()).VisteRéglé);
                VisiteNonRéglé.Background = (Brush)converter.ConvertFromString((proxy.GetAllParamétre()).VisteNonRéglé);


                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);
            }
        }
Ejemplo n.º 15
0
        public HistoriqueConstante(SVC.ServiceCliniqueClient proxyrecu, List <SVC.Constante> listerecu)
        {
            try
            {
                InitializeComponent();
                proxy = proxyrecu;
                // datable = datatablerecu;

                reportViewer1.LocalReport.ReportPath = "../../Patient/ReportConstante.rdlc";
                ReportDataSource rds = new ReportDataSource();
                rds.Name = "DataSet1"; //This refers to the dataset name in the RDLC file
                                       // rds.Value = proxy1.GetAllMembership();
                rds.Value = listerecu;
                this.reportViewer1.LocalReport.DataSources.Add(rds);
                var selpara = new List <SVC.Param>();
                selpara.Add((proxy.GetAllParamétre()));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", selpara));
                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);
            }
        }
Ejemplo n.º 16
0
 public Aceuill(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership memberrecu, ICallback callbackrecu, DXWindowMain windowrecu, SVC.Client localclientrecu)
 {
     try
     {
         InitializeComponent();
         proxy       = proxyrecu;
         memberuser  = memberrecu;
         callback    = callbackrecu;
         windowmain  = windowrecu;
         localclient = localclientrecu;
         if (localclientrecu.Chat)
         {
             tile6.Visibility = Visibility.Visible;
             tile6.IsEnabled  = true;
         }
         else
         {
             tile6.Visibility = Visibility.Collapsed;
             tile6.IsEnabled  = false;
         }
     }
     catch (Exception ex)
     {
     }
 }
Ejemplo n.º 17
0
        public Caisse(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership memberrecu, ICallback callbackrecu, SVC.Client clientrecu)
        {
            try
            {
                InitializeComponent();
                proxy      = proxyrecu;
                memberuser = memberrecu;
                callback   = callbackrecu;

                DateSaisieFin.SelectedDate   = DateTime.Now;
                DateSaisieDébut.SelectedDate = DateTime.Now;
                PatientDataGrid.ItemsSource  = proxy.GetAllDepense();
                txtDebit.Text   = Convert.ToString((proxy.GetAllDepense()).AsEnumerable().Sum(o => o.Montant));
                TxtCreebit.Text = Convert.ToString((proxy.GetAllDepense()).AsEnumerable().Sum(o => o.MontantCrédit));
                txtSolde.Text   = Convert.ToString(((proxy.GetAllDepense()).AsEnumerable().Sum(o => o.MontantCrédit)) - ((proxy.GetAllDepense()).AsEnumerable().Sum(o => o.Montant)));
                callbackrecu.InsertDepenseCallbackEvent += new ICallback.CallbackEventHandler18(callbackrecu_Refresh);
                CLIENTCONNECT = clientrecu;
                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);
            }
        }
Ejemplo n.º 18
0
        private void HandleProxy()
        {
            if (proxy != null)
            {
                switch (this.proxy.State)
                {
                case CommunicationState.Closed:
                    proxy = null;
                    this.Close();
                    break;

                case CommunicationState.Closing:
                    break;

                case CommunicationState.Created:
                    break;

                case CommunicationState.Faulted:
                    proxy.Abort();
                    proxy = null;
                    this.Close();
                    break;

                case CommunicationState.Opened:

                    break;

                case CommunicationState.Opening:
                    break;

                default:
                    break;
                }
            }
        }
Ejemplo n.º 19
0
        public ListePatientHome(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership memberrecu, ICallback callbackrecu, List <SVC.Patient> patientrecu, SVC.Client clientrecu)
        {
            try
            {
                InitializeComponent();
                proxy = proxyrecu;


                memberuser = memberrecu;

                callback    = callbackrecu;
                localclient = clientrecu;
                PatientDataGrid.ItemsSource = patientrecu;
                var disponible = (proxy.GetAllMedecin()).Where(list1 => list1.UserName == memberuser.UserName).FirstOrDefault();
                if (disponible != null)
                {
                    MedecinEnCours = disponible;
                }
                proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);

                proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
            }
            catch (Exception ex)
            {
                HandleProxy();
            }
        }
Ejemplo n.º 20
0
        public void chargerpatient(SVC.ServiceCliniqueClient proxyrecu, ICallback callbackrecu)
        {
            Dispatcher.BeginInvoke(new Action(() => {
                PatientDataGrid.ItemsSource              = proxyrecu.GetAllPatient();
                callbackrecu.InsertPatientCallbackEvent += new ICallback.CallbackEventHandler7(callbackrecu_Refresh);
                proxyrecu.InnerDuplexChannel.Faulted    += new EventHandler(InnerDuplexChannel_Faulted);

                proxyrecu.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
            }), DispatcherPriority.SystemIdle);

            //   Thread.();
        }
Ejemplo n.º 21
0
        public void loadmedecin(SVC.ServiceCliniqueClient proxyrecu)
        {
            Dispatcher.BeginInvoke(new Action(() => {
                var disponible = (proxyrecu.GetAllMedecin()).Where(list1 => list1.UserName == memberuser.UserName).FirstOrDefault();
                if (disponible != null)
                {
                    MedecinEnCours = (proxyrecu.GetAllMedecin()).Where(list1 => list1.UserName == memberuser.UserName).FirstOrDefault();
                }
            }), DispatcherPriority.SystemIdle);

            //   Thread.();
        }
Ejemplo n.º 22
0
        public VersementPatient(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership membershiprecu, ICallback callbackrecu, SVC.Patient fournrecu, SVC.Visite visiterecu, bool valeurbool)
        {
            try
            {
                InitializeComponent();
                proxy         = proxyrecu;
                callback      = callbackrecu;
                MemberUser    = membershiprecu;
                PatientR      = fournrecu;
                VisiteAregler = visiterecu; //Convert.ToString(VisiteApayer.Id) + Convert.ToString(DateTime.Now.TimeOfDay)
                                            // cléfiltre =  Convert.ToString(VisiteAregler.Id) + Convert.ToString(DateTime.Now.TimeOfDay) ;
                //  if (valeurbool==false)
                //  {
                depaiemlist = (proxy.GetAllDepeiment()).Where(n => n.cle == VisiteAregler.cle).ToList();
                // }else
                // {
                //      SVC.Depeiment soldededepart= (proxy.GetAllDepeiment()).Find(n => n.cle == PatientR.cle);
                //     depaiemlist.Add(soldededepart);
                // }
                labelFournisseur.Content = fournrecu.Id + " " + fournrecu.Nom + " " + fournrecu.Prénom;
                // var okmultiple = (proxy.GetAllDepeiementMultiple()).Find(n => n.cleVisite == VisiteAregler.cle);
                var okmultiple = (proxy.GetAllDepeiementMultiple()).FindAll(n => n.cleVisite == VisiteAregler.cle);

                if (okmultiple.Count > 0)
                {
                    foreach (SVC.DepeiementMultiple itemmultiple in okmultiple)
                    {
                        DepeimentMultiple = proxy.GetAllDepeiment().Find(n => n.CleMultiple == itemmultiple.cleMultiple);
                        if (!depaiemlist.Contains(DepeimentMultiple) && DepeimentMultiple.Multiple == true)
                        {
                            depaiemlist.Add(DepeimentMultiple);
                        }
                    }


                    FournDataGrid.ItemsSource = depaiemlist;
                }
                else
                {
                    FournDataGrid.ItemsSource = depaiemlist;
                }

                callbackrecu.InsertDepaiemCallbackevent += new ICallback.CallbackEventHandler32(callbackrecu_Refresh);
                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);
            }
        }
Ejemplo n.º 23
0
        public ImpressionDiagnostic(SVC.ServiceCliniqueClient proxyrecu, SVC.Patient patientrecu, List <SVC.Diagnostic> diagnosticrecu, int interfacerecu)
        {
            try
            {
                InitializeComponent();

                proxy = proxyrecu;
                // datable = datatablerecu;

                if (interfacerecu == 1)
                {
                    MemoryStream MyRptStream = new MemoryStream((Medicus.Properties.Resources.DiagnosticDiab), false);

                    reportViewer1.LocalReport.LoadReportDefinition(MyRptStream);
                }
                else
                {
                    if (interfacerecu == 2)
                    {
                        MemoryStream MyRptStream = new MemoryStream((Medicus.Properties.Resources.ConsultationClinique), false);

                        reportViewer1.LocalReport.LoadReportDefinition(MyRptStream);
                    }
                }

                List <SVC.Patient> listpatient = new List <SVC.Patient>();
                listpatient.Add(patientrecu);

                var selpara = new List <SVC.Param>();
                selpara.Add((proxy.GetAllParamétre()));
                reportViewer1.LocalReport.EnableExternalImages = true;

                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", selpara));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", listpatient));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet3", diagnosticrecu));
                ReportParameter paramLogo = new ReportParameter();
                paramLogo.Name = "ImagePath";
                String photolocation = System.Environment.CurrentDirectory + "/Logo.png";

                paramLogo.Values.Add(@"file:///" + photolocation);
                reportViewer1.LocalReport.SetParameters(paramLogo);
                reportViewer1.RefreshReport();

                proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);

                proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
            }
            catch
            {
                HandleProxy();
            }
        }
Ejemplo n.º 24
0
        public Chat(SVC.Client LOCALCLIENTRECU, ICallback callbackrecu, SVC.ServiceCliniqueClient proxy1, DXWindowMain main, Membership memberrecu)
        {
            try
            {
                InitializeComponent();
                //  proxy.ReConnectAsync(LOCALCLIENTRECU);
                callbackrecu.callback                          += new ICallback.CallbackEventHandler(callbackrecu_callback);
                callbackrecu.callbackUserjoin                  += new ICallback.CallbackEventHandler1(callbackrecu_callbackjoin);
                callbackrecu.callbackUserLeave                 += new ICallback.CallbackEventHandler2(callbackrecu_callbackleave);
                callbackrecu.callbackMessageRecu               += new ICallback.CallbackEventHandler3(callbackrecu_callbackReceive);
                callbackrecu.IsWritingCallbackEvent            += new ICallback.CallbackEventHandler4(callbackrecu_callbackIswrite);
                callbackrecu.InsertReceiveFileCallbackevent    += new ICallback.CallbackEventHandler47(callbackrecureceiveFile_callbackIswrite);
                callbackrecu.InsertReceiveWhisperCallbackevent += new ICallback.CallbackEventHandler48(callbackrecureceiveWhisper_callbackWhisperReceive);

                Membershipsession = memberrecu;

                chatListBoxNames.SelectionChanged += new SelectionChangedEventHandler(chatListBoxNames_SelectionChanged);
                chatTxtBoxType.KeyDown            += new KeyEventHandler(chatTxtBoxType_KeyDown);
                chatTxtBoxType.KeyUp += new KeyEventHandler(chatTxtBoxType_KeyUp);
                proxy       = proxy1;
                localClient = LOCALCLIENTRECU;

                chatLabelCurrentUName.Content = localClient.UserName;
                main.AddEvent += new EventHandler(addClientWindow_AddEvent);
                proxy.ReConnectAsync(LOCALCLIENTRECU);
                proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);
                proxy.InnerDuplexChannel.Closed  += new EventHandler(InnerDuplexChannel_Closed);
                DirectoryInfo dir = new DirectoryInfo(rcvFilesPath);
                dir.Create();

                /*    var ist = proxy.GetAllClientDict();
                 *
                 *    foreach(var Item in ist.ToList())
                 *    {
                 *        MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show("List Dictionnary "  +Item.Key.UserName.ToString()+" "+Item.Value.ToString(), Medicus.Properties.Resources.SiteWeb, MessageBoxButton.YesNo, MessageBoxImage.Question);
                 *
                 *    }
                 *
                 *   List<Client> ist1 = proxy.GetAllClient();
                 *
                 *   foreach(var Item in ist1.ToList())
                 *   {
                 *       MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show("LIST CLIENT "+Item.UserName.ToString()+" ", Medicus.Properties.Resources.SiteWeb, MessageBoxButton.YesNo, MessageBoxImage.Question);
                 *
                 *   } */
            }
            catch (Exception ex)

            {
                HandleProxy();
            }
        }
Ejemplo n.º 25
0
        private void txtMotDePasse_KeyUp(object sender, KeyEventArgs e)
        {
            try
            {
                if (loginTxtBoxIP.Text != "")
                {
                    if (e.Key != System.Windows.Input.Key.Enter)
                    {
                        return;
                    }

                    // your event handler here
                    e.Handled = true;
                    if (proxy == null)
                    {
                        callback = new ICallback();
                        InstanceContext cntx = new InstanceContext(callback);
                        proxy = new SVC.ServiceCliniqueClient(cntx);
                        string servicePath       = proxy.Endpoint.ListenUri.AbsolutePath;
                        string serviceListenPort = proxy.Endpoint.Address.Uri.Port.ToString();

                        ////////////////////////*************a supprimer***************///////

                        //this.localClient = new SVC.Client();
                        //this.localClient.UserName = txtMotDePasse.Password;
                        proxy.Endpoint.Address = new EndpointAddress("net.tcp://" + loginTxtBoxIP.Text.ToString() + ":" + serviceListenPort + servicePath);
                        //

                        proxy.Open();

                        var oper = authentification(proxy, txtMotDePasse.Password);
                        if (oper == true)
                        {
                            this.localClient          = new SVC.Client();
                            this.localClient.UserName = MemBerShip.UserName;
                            this.localClient.Actif    = Convert.ToBoolean(MemBerShip.Actif);
                            proxy.TestConnect(localClient);
                            TestConnecttCompleted();
                        }
                    }
                    else
                    {
                        HandleProxy();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, GestionClinique.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Stop);
            }
        }
Ejemplo n.º 26
0
        public FeuilleCalcule(SVC.ServiceCliniqueClient proxyrecu)
        {
            try
            {
                InitializeComponent();
                proxy = proxyrecu;
                proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);

                proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
            }
            catch (Exception ex)
            {
                HandleProxy();
            }
        }
Ejemplo n.º 27
0
        private void HandleProxy()
        {
            try
            {
                if (proxy != null)
                {
                    switch (this.proxy.State)
                    {
                    case CommunicationState.Closed:
                        proxy = null;

                        break;

                    case CommunicationState.Closing:
                        this.Close();
                        break;

                    case CommunicationState.Created:
                        break;

                    case CommunicationState.Faulted:

                        proxy.Abort();
                        proxy = null;
                        this.Close();

                        break;

                    case CommunicationState.Opened:

                        break;

                    case CommunicationState.Opening:



                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Stop);
            }
        }
Ejemplo n.º 28
0
        public MainAdministrateur(SVC.ServiceCliniqueClient proxyrecu, ICallback callbackrecu, SVC.Membership membershiprecu, SVC.Client clientrecu)
        {
            try
            {
                InitializeComponent();
                proxy       = proxyrecu;
                callback    = callbackrecu;
                MemBerShip  = membershiprecu;
                localClient = clientrecu;
            }

            catch (Exception ex)
            {
                MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Ejemplo n.º 29
0
        private void HandleProxy()
        {
            if (proxy != null)
            {
                switch (this.proxy.State)
                {
                case CommunicationState.Closed:
                    proxy = null;

                    break;

                case CommunicationState.Closing:
                    break;

                case CommunicationState.Created:
                    break;

                case CommunicationState.Faulted:
                    proxy.Abort();
                    proxy = null;
                    var wndlistsession = Window.GetWindow(this);

                    Grid test = (Grid)wndlistsession.FindName("gridAuthentification");
                    test.Visibility = Visibility.Visible;
                    Button confirmer = (Button)wndlistsession.FindName("Confirmer");
                    confirmer.IsEnabled = false;
                    Grid tests = (Grid)wndlistsession.FindName("gridhome");
                    tests.Visibility = Visibility.Collapsed;
                    if (SessionOpened == true)
                    {
                        AddEventSession(CLSession, new EventArgs());
                    }
                    break;

                case CommunicationState.Opened:


                    break;

                case CommunicationState.Opening:
                    break;

                default:
                    break;
                }
            }
        }
Ejemplo n.º 30
0
        public ImpressionExamenRadio(SVC.ServiceCliniqueClient proxyrecu, SVC.Patient patientrecu, List <ExamenRadiologie> examenmm, string examenvariable)
        {
            try
            {
                InitializeComponent();
                proxy = proxyrecu;
                MemoryStream MyRptStream = new MemoryStream((Medicus.Properties.Resources.BonExamenRadio), false);

                reportViewer1.LocalReport.LoadReportDefinition(MyRptStream);


                List <SVC.Patient> listpatient = new List <SVC.Patient>();
                listpatient.Add(patientrecu);

                var selpara = new List <SVC.Param>();
                selpara.Add((proxy.GetAllParamétre()));



                reportViewer1.LocalReport.EnableExternalImages = true;

                /**********************************************************************************/
                ReportParameter paramexamenvariable = new ReportParameter();
                paramexamenvariable.Name = "AutreBilan";
                paramexamenvariable.Values.Add(examenvariable.ToString());
                reportViewer1.LocalReport.SetParameters(paramexamenvariable);
                /*********************************************************************************/
                ReportParameter paramLogo = new ReportParameter();
                paramLogo.Name = "ImagePath";
                String photolocation = System.Environment.CurrentDirectory + "/Logo.png";

                paramLogo.Values.Add(@"file:///" + photolocation);
                reportViewer1.LocalReport.SetParameters(paramLogo);
                /**********************************************************************************/
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", selpara));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", listpatient));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet3", examenmm));
                reportViewer1.RefreshReport();
                proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);

                proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
            }
            catch (Exception ex)
            {
                HandleProxy();
            }
        }