Exemple #1
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);
            }
        }
Exemple #2
0
        public bool authentification(SVC.ServiceCliniqueClient testproxy, string usernameTextbox)
        {
            if (usernameTextbox != "Admin" && usernameTextbox != "Administrateur" && usernameTextbox != "ADMIN" && usernameTextbox != "ADMINISTRATEUR" && usernameTextbox != "administrateur" && usernameTextbox != "admin")
            {
                Membership = new Membership
                {
                    UserName = usernameTextbox,
                    Actif    = true,

                    DiscussionPrivé    = true,
                    EnvoiReceptMessage = true,
                    EnvoiRécéptFichier = true,
                    ImpressionAchat    = true,

                    ModificationAchat = true,

                    ModificationCaisse = true,

                    ModuleAchat = true,

                    ModuleCaisse = true,
                    ModuleChat   = true,
                    AccèsToutLesDossierPatient = true,
                    ActiverServer              = true,
                    CréationAchat              = true,
                    CréationAdministrateur     = true,
                    CréationCaisse             = true,
                    CréationDossierPatient     = true,
                    CréationLaboratoire        = true,
                    CréationPatient            = true,
                    CréationRendezVous         = true,
                    CréationSalleAttente       = true,
                    ImpressionAdministrateur   = true,
                    ImpressionDossierPatient   = true,
                    ImpressionLaboratoire      = true,
                    ImpressionPatient          = true,
                    ImpressionRendezVous       = true,
                    ImpressionSalleAttente     = true,
                    ImressionCaisse            = true,
                    ModificationAdministrateur = true,
                    ModificationDossierPatient = true,
                    ModificationLaboratoire    = true,
                    ModificationPatient        = true,
                    ModificationRendezVous     = true,
                    ModificationSalleAttente   = true,
                    ModuleAdministrateur       = true,
                    ModuleDossierPatient       = true,
                    ModuleLaboratoire          = true,
                    ModulePatient              = true,
                    ModuleSalleAttente         = true,
                    ModuleRendezVous           = true,
                    SuppressionAdministrateur  = true,
                    SuppressionDossierPatient  = true,
                    SuppressionLaboratoire     = true,
                    SuppressionPatient         = true,
                    SuppressionRendezVous      = true,
                    SuppréssionCaisse          = true,
                    SupressionAchat            = true,
                    SupressionSalleAttente     = true,
                };
                username = usernameTextbox;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #3
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);
            }
        }
        public ListeSession(SVC.ServiceCliniqueClient proxy1, ICallback callbackrecu, SVC.Membership mem)
        {
            try
            {
                InitializeComponent();
                proxy = proxy1;
                callbackrecu.InsertMmebershipCallbackEvent += new ICallback.CallbackEventHandler5(callbackrecu_Refresh);
                SessionUser = mem;
                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 OrdoParam(SVC.ServiceCliniqueClient proxyrecu, ICallback callbackrecu, SVC.Membership memberrecu)
        {
            try
            {
                InitializeComponent();

                InitializeComponent();
                proxy      = proxyrecu;
                membership = memberrecu;
                callback   = callbackrecu;

                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);
            }
        }
Exemple #6
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);
            }
        }
        private void btnValider_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                SVC.Membership NewMembership;

                NewMembership = new SVC.Membership
                {
                    UserName                   = txtUserName.Text.Trim(),
                    Nom                        = txtNom.Text.Trim(),
                    Prénom                     = txtPrenom.Text.Trim(),
                    MotDePasse                 = txtMotDePasse.Text.Trim(),
                    Actif                      = chACTIF.IsChecked,
                    ModuleAdministrateur       = chadmin.IsChecked,
                    CréationAdministrateur     = chcreeradmin.IsChecked,
                    ModificationAdministrateur = chmodifadmin.IsChecked,
                    SuppressionAdministrateur  = chsuppadmin.IsChecked,
                    ImpressionAdministrateur   = chimpradmin.IsChecked,

                    ModuleRendezVous       = chaRendz.IsChecked,
                    CréationRendezVous     = chcreerRendz.IsChecked,
                    ModificationRendezVous = chmodifRendz.IsChecked,
                    SuppressionRendezVous  = chsuppRendz.IsChecked,
                    ImpressionRendezVous   = chimprRendz.IsChecked,

                    ModulePatient       = chaPatient.IsChecked,
                    CréationPatient     = chcreerPatient.IsChecked,
                    ModificationPatient = chmodifPatient.IsChecked,
                    SuppressionPatient  = chsuppPatient.IsChecked,
                    ImpressionPatient   = chimprPatient.IsChecked,

                    CréerLe = DateTime.Now,
                    ModuleDossierPatient       = chaDossierPatient.IsChecked,
                    CréationDossierPatient     = chcreerDossierPatient.IsChecked,
                    ModificationDossierPatient = chmodifDossierPatient.IsChecked,
                    SuppressionDossierPatient  = chsuppDossierPatient.IsChecked,
                    ImpressionDossierPatient   = chimprDossierPatient.IsChecked,
                    AccèsToutLesDossierPatient = chimprAccèsToutLesDossierPatient.IsChecked,

                    ModuleSalleAttente       = chaDossierSalleAttente.IsChecked,
                    CréationSalleAttente     = chcreerSalleAttente.IsChecked,
                    ModificationSalleAttente = chmodifSalleAttente.IsChecked,
                    SupressionSalleAttente   = chsuppSalleAttente.IsChecked,
                    ImpressionSalleAttente   = chimprSalleAttente.IsChecked,

                    ModuleCaisse       = chaCaisse.IsChecked,
                    CréationCaisse     = chcreerCaisse.IsChecked,
                    ModificationCaisse = chmodifCaisse.IsChecked,
                    SuppréssionCaisse  = chsuppCaisse.IsChecked,
                    ImressionCaisse    = chimprCaisse.IsChecked,


                    ModuleChat         = chaModuleChat.IsChecked,
                    DiscussionPrivé    = chsuppDiscussionPrivé.IsChecked,
                    EnvoiReceptMessage = chcreerEnvoiReceptMessage.IsChecked,
                    EnvoiRécéptFichier = chmodifEnvoiRécéptFichier.IsChecked,
                };
                if (SelectMembershiListe == null)
                {
                    try
                    {
                        using (var ts = new TransactionScope(TransactionScopeOption.RequiresNew))
                        {
                            proxy.InsertMembership(NewMembership);
                            btnValider.IsEnabled = false;
                            ts.Complete();
                            MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(Medicus.Properties.Resources.OperationSuccées, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Information);
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
                    }
                }
                else
                {
                    try
                    {
                        using (var ts = new TransactionScope(TransactionScopeOption.RequiresNew))
                        {
                            proxy.UpdateMembership(SelectMembershiListe);
                            ts.Complete();
                            MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(Medicus.Properties.Resources.OperationSuccées, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Information);
                        }

                        //       this.WindowTitleBrush = Brushes.Green;
                    }
                    catch (Exception ex)
                    {
                        MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
        public AjouterProduitOrdonnance(SVC.ServiceCliniqueClient proxyrecu, SVC.ProduitOrdonnance spécialtiérecu, SVC.Membership membershirecu, ICallback callbackrecu)
        {
            try
            {
                InitializeComponent();

                proxy      = proxyrecu;
                special    = spécialtiérecu;
                membership = membershirecu;
                callback   = callbackrecu;


                if (special != null)
                {
                    FournVousGrid.DataContext = special;
                    List <SVC.Dci> testmedecin = proxy.GetAllDci();
                    ListeDciCombo.ItemsSource = testmedecin;
                    List <SVC.Dci> tte = testmedecin.Where(n => n.Id == special.IdDci).OrderBy(n => n.Id).ToList();
                    ListeDciCombo.SelectedItem           = tte.First();
                    créationOrdonnace                    = 0;
                    callbackrecu.InsertDciCallbackevent += new ICallback.CallbackEventHandler33(callbackDci_Refresh);
                }
                else
                {
                    special = new SVC.ProduitOrdonnance();
                    FournVousGrid.DataContext            = special;
                    ListeDciCombo.ItemsSource            = proxy.GetAllDci().OrderBy(n => n.Id);
                    btnCreer.IsEnabled                   = false;
                    créationOrdonnace                    = 1;
                    callbackrecu.InsertDciCallbackevent += new ICallback.CallbackEventHandler33(callbackDci_Refresh);
                }
                proxy.InnerDuplexChannel.Closed  += new EventHandler(InnerDuplexChannel_Closed);
                proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);
            }
            catch (Exception ex)
            {
                MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
        public NewPatient(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership memberrecu, SVC.Patient patientrecu)
        {
            try
            {
                InitializeComponent();
                proxy = proxyrecu;
                proxy.InnerDuplexChannel.Opened += new EventHandler(InnerDuplexChannel_Opened);
                proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
                member = memberrecu;
                if (patientrecu == null)
                {
                    Création                 = true;
                    btnCreer.IsEnabled       = false;
                    txtMedecin.ItemsSource   = proxy.GetAllMedecin();
                    txtMedecin.SelectedIndex = 0;
                }
                else
                {
                    patient = patientrecu;
                    PatientGrid.DataContext = patient;



                    List <SVC.Medecin> testmedecin = proxy.GetAllMedecin();
                    txtMedecin.ItemsSource = testmedecin;
                    if (patientrecu.SuiviParCode != null /* && patientrecu.SuiviParPrénom != ""*/)
                    {
                        List <SVC.Medecin> tte = testmedecin.Where(n => n.Id == patientrecu.SuiviParCode).ToList();
                        txtMedecin.SelectedItem = tte.First();
                    }



                    if (patientrecu.CheminPhoto.ToString() != "")
                    {
                        if (proxy.DownloadDocumentIsHere(patientrecu.CheminPhoto.ToString()) == true)
                        {
                            imgPhoto.Source    = LoadImage(proxy.DownloadDocument(patientrecu.CheminPhoto.ToString()));
                            Création           = false;
                            patient            = patientrecu;
                            op.FileName        = patientrecu.CheminPhoto;
                            btnCreer.IsEnabled = true;
                            btnCreer.Content   = "Modifier";
                        }
                        else
                        {
                            MessageBoxResult results = Xceed.Wpf.Toolkit.MessageBox.Show("Attention la photo du patient n'existe plus dans le serveur", "Medicus", MessageBoxButton.OK, MessageBoxImage.Error);
                            op.FileName        = "";
                            Création           = false;
                            patient            = patientrecu;
                            btnCreer.IsEnabled = true;
                            btnCreer.Content   = "Modifier";
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Exemple #10
0
        public PrendreRendezVous(SVC.RendezVou rendezvous, SVC.ServiceCliniqueClient proxyrecu, SVC.Membership membershiprecu, ICallback callbackrecu, int Interface, SVC.Patient patientrecu)
        {
            try
            {
                InitializeComponent();

                /*   txtDate.DisplayDate =Convert.ToDateTime(rendezvous.Date);
                 * txtHoraire.ItemsSource = rendezvous.RendezVousD.ToString() + rendezvous.RendezVousF.ToString();*/
                proxy           = proxyrecu;
                MemberUser      = membershiprecu;
                RendezInterface = Interface;
                callbackrecu.InsertPatientCallbackEvent     += new ICallback.CallbackEventHandler7(callbackrecu_Refresh);
                callbackrecu.InsertMotifVisiteCallbackEvent += new ICallback.CallbackEventHandler10(callbackrecuMotif_Refresh);
                proxy.InnerDuplexChannel.Closed             += new EventHandler(InnerDuplexChannel_Closed);
                if (rendezvous != null)
                {
                    rendezVousP = rendezvous;
                    RendezVousGrid.DataContext = rendezVousP;



                    if (rendezvous.Nom == null && rendezvous.Prénom == null && Interface == 1)
                    {
                        txtFonction.ItemsSource = proxy.GetAllMotifVisite().OrderBy(n => n.Motif);

                        txtPatient.Visibility = Visibility.Collapsed;
                        auto = true;
                        List <SVC.Medecin> testmedecin = proxy.GetAllMedecin();
                        txtMedecin.ItemsSource = testmedecin;
                        List <SVC.Medecin> tte = testmedecin.Where(n => n.Nom == rendezVousP.MedecinNom && n.Prénom == rendezVousP.MedecinPrénom).ToList();
                        txtMedecin.SelectedItem = tte.First();
                        btnCreer.IsEnabled      = true;
                        List <SVC.Patient> pp = new List <SVC.Patient>();
                        accbStates.ItemsSource = pp;
                        txtHoraire.Text        = rendezvous.RendezVousD.ToString();
                        txtHoraire.Enabled     = false;
                    }
                    else
                    {
                        if (Interface == 2)
                        {
                            /******************fdans datagrid exist in interface rendez vous**************/
                            if (rendezvous.Nom != null && rendezvous.Prénom != null)
                            {
                                NomPrenoRendezVousnull   = false;
                                btnCreer.IsEnabled       = true;
                                btnCreer.Content         = "Modifier";
                                txtFonction.ItemsSource  = proxy.GetAllMotifVisite().OrderBy(n => n.Motif);
                                txtFonction.SelectedItem = rendezVousP.Motif;
                                txtHoraire.Text          = (rendezvous.RendezVousD).ToString();



                                List <SVC.Patient> testmedecin1 = proxy.GetAllPatientBYID(rendezvous.CodePatient.Value).OrderBy(n => n.Nom).ToList();
                                txtPatient.ItemsSource = testmedecin1;
                                List <SVC.Patient> tte1 = testmedecin1.Where(n => n.Id == rendezvous.CodePatient).OrderBy(n => n.Nom).ToList();
                                txtPatient.SelectedItem = tte1.First();
                                txtPatient.IsEnabled    = false;
                                auto = false;
                                accbStates.Visibility = Visibility.Collapsed;
                                List <SVC.Medecin> testmedecin = proxy.GetAllMedecin();
                                txtMedecin.ItemsSource = testmedecin;
                                List <SVC.Medecin> tte = testmedecin.Where(n => n.Nom == rendezVousP.MedecinNom && n.Prénom == rendezVousP.MedecinPrénom).ToList();
                                txtMedecin.SelectedItem = tte.First();
                            }
                            else
                            {
                                /*************dans datagrid exist in rendez vous interface********************/
                                if (rendezvous.Nom == null && rendezvous.Prénom == null)
                                {
                                    NomPrenoRendezVousnull = true;
                                    btnCreer.IsEnabled     = true;
                                    //    btnCreer.Content = "Créer";
                                    txtFonction.ItemsSource  = proxy.GetAllMotifVisite().OrderBy(n => n.Motif);
                                    txtFonction.SelectedItem = rendezVousP.Motif;
                                    txtHoraire.Text          = (rendezvous.RendezVousD).ToString();



                                    List <SVC.Patient> pp = new List <SVC.Patient>();
                                    accbStates.ItemsSource = pp;
                                    txtPatient.Visibility  = Visibility.Collapsed;
                                    auto = true;
                                    List <SVC.Medecin> testmedecin = proxy.GetAllMedecin();
                                    txtMedecin.ItemsSource = testmedecin;

                                    List <SVC.Medecin> tte = testmedecin.Where(n => n.Nom == rendezVousP.MedecinNom && n.Prénom == rendezVousP.MedecinPrénom).ToList();
                                    txtMedecin.SelectedItem = tte.First();
                                }
                            }
                        }
                        else
                        {/***********       Prise de rendez vous dans mainwindow.xaml c-a-d  *************************/
                            if (Interface == 3)
                            {
                                rendezVousP = rendezvous;
                                RendezVousGrid.DataContext = rendezVousP;

                                txtFonction.ItemsSource = proxy.GetAllMotifVisite().OrderBy(n => n.Motif);
                                // txtPatient.ItemsSource = proxy.GetAllPatient();

                                txtMedecin.ItemsSource   = proxy.GetAllMedecin();
                                txtMedecin.SelectedIndex = 0;
                                List <SVC.Patient> pp = new List <SVC.Patient>();
                                accbStates.ItemsSource = pp;
                                txtPatient.Visibility  = Visibility.Collapsed;
                                auto = true;
                            }
                            else
                            {
                                if (Interface == 4)
                                {
                                    List <SVC.Patient> testmedecin1 = proxy.GetAllPatientBYID(patientrecu.Id).OrderBy(n => n.Nom).ToList();
                                    txtPatient.ItemsSource = testmedecin1;
                                    List <SVC.Patient> tte11 = testmedecin1.Where(n => n.Id == rendezvous.CodePatient).OrderBy(n => n.Nom).ToList();
                                    txtPatient.SelectedItem = tte11.First();
                                    txtPatient.IsEnabled    = false;

                                    List <SVC.Medecin> test = proxy.GetAllMedecin();
                                    txtMedecin.ItemsSource = test;

                                    List <SVC.Medecin> tte1 = test.Where(n => n.Nom == patientrecu.SuiviParNom && n.Prénom == patientrecu.SuiviParPrénom).ToList();
                                    txtMedecin.SelectedItem = tte1.First();


                                    rendezVousP = rendezvous;
                                    RendezVousGrid.DataContext = rendezVousP;
                                    txtFonction.ItemsSource    = proxy.GetAllMotifVisite().OrderBy(n => n.Motif);
                                    accbStates.Visibility      = Visibility.Collapsed;
                                    auto = false;
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
        public CertificatRapport(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership memberrecu, ICallback callbackrecu)
        {
            try
            {
                InitializeComponent();
                Membership = memberrecu;
                proxy      = proxyrecu;
                var disponible = (proxy.GetAllMedecin()).Where(list1 => list1.UserName == Membership.UserName).FirstOrDefault();
                if (disponible == null)
                {
                    MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show("Vous devez avoir une session de medecin pour pouvoir faire cette opération", Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Stop);
                }
                else
                {
                    medecin = disponible;
                    List <SVC.Medecin> listmededcin = new List <SVC.Medecin>();
                    listmededcin.Add(medecin);
                    /**********************certificat***********************/
                    List <RapportCertificat> listdetail = new List <RapportCertificat>();
                    RapportCertificat        detail     = new RapportCertificat
                    {
                        Asignature             = "Constantine",
                        DateExam               = DateTime.Now,
                        DateNaissancePatient   = DateTime.Now,
                        LieudeNaissancePatient = "Constantine Algerie",
                        Faitle           = DateTime.Now,
                        NomPrenomPatient = "Nom et Prénom du patient",
                        Pratique         = "La pratique en compétition du Triathlon et des disciplines enchaînées"
                    };
                    listdetail.Add(detail);
                    RapportCertificat detail1 = new RapportCertificat
                    {
                        Asignature             = "Constantine",
                        DateExam               = DateTime.Now,
                        DateNaissancePatient   = DateTime.Now,
                        LieudeNaissancePatient = "Constantine Algerie",
                        Faitle           = DateTime.Now,
                        NomPrenomPatient = "Nom et Prénom du patient",
                        Pratique         = "La pratique à l'entraînement uniquement du Triathlon et des disciplines enchaînées",
                    };
                    listdetail.Add(detail1);

                    GridMedecin.DataContext = detail;
                    RecapGrid.DataContext   = listdetail;
                    RecapGrid.ItemsSource   = listdetail;


                    MemoryStream MyRptStream = new MemoryStream((Medicus.Properties.Resources.CertificationMedical), false);
                    reportViewerCertificatMedical.LocalReport.LoadReportDefinition(MyRptStream);



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

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

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

                    List <SVC.ArretDetravail> listdetailArretDetravail = new List <SVC.ArretDetravail>();
                    detailArretDetravail = new SVC.ArretDetravail
                    {
                        Asignature             = "Constantine",
                        DateDebutArret         = DateTime.Now,
                        DateNaissancePatient   = DateTime.Now,
                        LieudeNaissancePatient = "Constantine Algerie",
                        Faitle           = DateTime.Now,
                        NomPrenomPatient = "Nom et Prénom du patient",
                        autorisées       = true,
                        nonautorisées    = false,
                        compteurarret    = "000001",
                        Nbjour           = "7 jours",
                    };
                    listdetailArretDetravail.Add(detailArretDetravail);

                    SimpleButton.IsEnabled       = true;
                    GridMedecinArret.DataContext = detailArretDetravail;



                    MemoryStream MyRptStream1 = new MemoryStream((Medicus.Properties.Resources.ArretDeTravail), false);
                    reportViewerCertificatArret.LocalReport.LoadReportDefinition(MyRptStream1);
                    DateSaisieDébut.SelectedDate = DateTime.Now;
                    DateSaisieFin.SelectedDate   = DateTime.Now;


                    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;


                    reportViewerCertificatArret.LocalReport.SetParameters(paramLogo);
                    reportViewerCertificatArret.RefreshReport();
                    ArretDataGrid.ItemsSource         = proxy.GetAllArretDetravail();//.OrderBy(n=>n.)
                    proxy.InnerDuplexChannel.Faulted += new EventHandler(InnerDuplexChannel_Faulted);

                    proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);

                    callbackrecu.InsertArretDetravailCallbackevent += new ICallback.CallbackEventHandler57(callbackrecu_Refresh);



                    /*************************************************************************/
                }
            }
            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);
            }
        }
        public ImpressionOneMedecin(SVC.ServiceCliniqueClient proxy1, SVC.Medecin SelectMedecin, SVC.Membership selectsession, List <ExclusionDay> selectexclusion)
        {
            try
            {
                InitializeComponent();

                proxy = proxy1;
                var people = new List <Medecin>();
                people.Add(SelectMedecin);
                var selmede = new List <Membership>();
                selmede.Add(selectsession);


                var selpara = new List <SVC.Param>();
                selpara.Add((proxy.GetAllParamétre()));
                //    var selexc = new List<ExclusionDay>();
                //   selexc.Add(selectexclusion);
                //Add datasets
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", people));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSetOneMembership", selmede));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("ExclusionDayDataset", selectexclusion));
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", selpara));



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

                reportViewer1.LocalReport.LoadReportDefinition(MyRptStream);
                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);
            }
        }
        /*******************************************/


        public Arrivée(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership memberrecu, ICallback callbackrecu, SVC.RendezVou rendezvousrecu, SVC.Medecin medecinrecu, DateTime DateRecu, int interfacerecu, SVC.Patient patientrecu, SVC.SalleDattente salleattenterecu)
        {
            try
            {
                InitializeComponent();
                proxy                     = proxyrecu;
                UserMembership            = memberrecu;
                callback                  = callbackrecu;
                rendezvous                = rendezvousrecu;
                DateSalleAttente          = DateRecu;
                MedecinForSalleAttente    = medecinrecu;
                interf                    = interfacerecu;
                txtdateRendezVous.Content = DateRecu.ToLongDateString();

                /************ne pas oublié dans tout les interfaces*****************/

                callbackrecu.InsertPatientCallbackEvent += new ICallback.CallbackEventHandler7(callbackrecu_Refresh);
                proxy.InnerDuplexChannel.Faulted        += new EventHandler(InnerDuplexChannel_Faulted);

                proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
                /*dans la salle d'attente button in datagrid rendez vous        */
                if (interf == 1)
                {
                    List <SVC.Medecin> testmedecin = proxy.GetAllMedecin().OrderBy(n => n.Nom).ToList();
                    txtMedecin.ItemsSource = testmedecin;
                    List <SVC.Medecin> tte = testmedecin.Where(n => n.Id == MedecinForSalleAttente.Id).OrderBy(n => n.Nom).ToList();
                    txtMedecin.SelectedItem = tte.First();

                    List <SVC.Patient> testmedecin1 = proxy.GetAllPatientBYID(rendezvous.CodePatient.Value).OrderBy(n => n.Nom).ToList();
                    txtPatient.ItemsSource = testmedecin1;
                    List <SVC.Patient> tte1 = testmedecin1.Where(n => n.Id == rendezvous.CodePatient).OrderBy(n => n.Nom).ToList();
                    txtPatient.SelectedItem = tte1.First();
                    txtPatient.IsEnabled    = false;

                    txtArrivée.Text = Convert.ToString(DateTime.Now.TimeOfDay);

                    txtFonction.ItemsSource    = proxy.GetAllMotifVisite().OrderBy(n => n.Motif);
                    RendezVousGrid.DataContext = rendezvousrecu;
                    //  txtFonction.SelectedValue = rendezvousrecu.Motif.ToString();

                    PatientSalleDattente = tte1.First();
                    txtPatient.IsEnabled = false;
                    //  txtMedecin.IsEnabled = false;
                    btnPatient.IsEnabled  = false;
                    txtPatient.Visibility = Visibility.Visible;
                    accbStates.Visibility = Visibility.Collapsed;
                    auto = false;
                }
                else
                {/* 1-Arrivage dans liste home.xaml c-a-d patient connu
                  * 2-Arrivée sans rendez vous dans la salle d'attente patient non connu
                  */
                    if (interf == 2)
                    {
                        if (patientrecu != null)
                        {
                            PatientSalleDattente = patientrecu;
                            List <SVC.Medecin> testmedecin = proxy.GetAllMedecin().OrderBy(n => n.Nom).ToList();
                            txtMedecin.ItemsSource = testmedecin;
                            List <SVC.Medecin> tte = testmedecin.Where(n => n.Nom == PatientSalleDattente.SuiviParNom && n.Prénom == PatientSalleDattente.SuiviParPrénom).OrderBy(n => n.Nom).ToList();
                            txtMedecin.SelectedItem = tte.First();

                            List <SVC.Patient> testmedecin1 = proxy.GetAllPatientBYID(PatientSalleDattente.Id).OrderBy(n => n.Nom).ToList();
                            txtPatient.ItemsSource = testmedecin1;

                            List <SVC.Patient> tte1 = testmedecin1.Where(n => n.Id == PatientSalleDattente.Id).OrderBy(n => n.Nom).ToList();
                            txtPatient.SelectedItem = tte1.First();
                            txtPatient.IsEnabled    = false;
                            txtArrivée.Text         = Convert.ToString(DateTime.Now.TimeOfDay);

                            txtFonction.ItemsSource = proxy.GetAllMotifVisite().OrderBy(n => n.Motif);
                            txtPatient.IsEnabled    = false;
                            txtPatient.Visibility   = Visibility.Visible;
                            accbStates.Visibility   = Visibility.Collapsed;
                            auto = false;
                        }
                        else
                        {
                            List <SVC.Medecin> testmedecin = proxy.GetAllMedecin().OrderBy(n => n.Nom).ToList();
                            txtMedecin.ItemsSource   = testmedecin;
                            txtMedecin.SelectedIndex = 0;

                            txtArrivée.Text         = Convert.ToString(DateTime.Now.TimeOfDay);
                            txtFonction.ItemsSource = proxy.GetAllMotifVisite().OrderBy(n => n.Motif);
                            List <SVC.Patient> pp = new List <SVC.Patient>();
                            accbStates.ItemsSource = pp;
                            txtPatient.Visibility  = Visibility.Collapsed;

                            auto = true;
                        }
                    }
                    else
                    {
                        if (interf == 3)
                        {
                            SalleAttenteP = salleattenterecu;
                            List <SVC.Medecin> testmedecin = proxy.GetAllMedecin().OrderBy(n => n.Nom).ToList();
                            txtMedecin.ItemsSource = testmedecin;
                            List <SVC.Medecin> tte = testmedecin.Where(n => n.Id == MedecinForSalleAttente.Id).OrderBy(n => n.Nom).ToList();
                            txtMedecin.SelectedItem = tte.First();

                            List <SVC.Patient> testmedecin1 = proxy.GetAllPatientBYID(patientrecu.Id).OrderBy(n => n.Nom).ToList();
                            txtPatient.ItemsSource = testmedecin1;
                            List <SVC.Patient> tte1 = testmedecin1.Where(n => n.Id == patientrecu.Id).OrderBy(n => n.Nom).ToList();
                            txtPatient.SelectedItem = tte1.First();
                            txtPatient.IsEnabled    = false;
                            List <SVC.MotifVisite> testmotif = proxy.GetAllMotifVisite().OrderBy(n => n.Motif).ToList();
                            txtFonction.ItemsSource = testmotif;
                            //List<SVC.MotifVisite> ttemitif = testmotif.Where(n => n.Motif == salleattenterecu.Motif).ToList();
                            txtFonction.SelectedItem   = salleattenterecu.Motif;
                            txtArrivée.Text            = salleattenterecu.Arrivée.ToString();
                            RendezVousGrid.DataContext = SalleAttenteP;
                            txtPatient.Visibility      = Visibility.Visible;
                            accbStates.Visibility      = Visibility.Collapsed;
                            auto = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxResult resultc10 = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Exemple #15
0
        public ReglementPatient(SVC.ServiceCliniqueClient proxyrecu, SVC.Membership memberrecu, ICallback callbackrecu)
        {
            try
            {
                InitializeComponent();
                proxy      = proxyrecu;
                callback   = callbackrecu;
                MemberUser = memberrecu;
                var disponible = (proxy.GetAllMedecin()).Where(list1 => list1.UserName == MemberUser.UserName).FirstOrDefault();
                if (disponible == null)
                {
                    medecinsession = false;
                    DateVisiteDébut.SelectedDate = DateTime.Now;
                    DateVisiteFin.SelectedDate   = DateTime.Now;
                    PatientDataGrid.ItemsSource  = proxy.GetAllVisite(DateVisiteDébut.SelectedDate.Value, DateVisiteFin.SelectedDate.Value);
                    MedecinCombo.ItemsSource     = proxy.GetAllMedecin().OrderBy(x => x.Nom);
                    PatientCombo.ItemsSource     = proxy.GetAllPatient().OrderBy(x => x.Nom);


                    txtAchat.Text       = Convert.ToString((proxy.GetAllVisite(DateVisiteDébut.SelectedDate.Value, DateVisiteFin.SelectedDate.Value)).AsEnumerable().Sum(o => o.Montant));
                    TxtVersement.Text   = Convert.ToString((proxy.GetAllVisite(DateVisiteDébut.SelectedDate.Value, DateVisiteFin.SelectedDate.Value)).AsEnumerable().Sum(o => o.Versement));
                    txtFournisseur.Text = Convert.ToString(((proxy.GetAllVisite(DateVisiteDébut.SelectedDate.Value, DateVisiteFin.SelectedDate.Value)).AsEnumerable().Sum(o => o.Reste)));

                    callbackrecu.InsertVisiteCallbackEvent  += new ICallback.CallbackEventHandler13(callbackrecu_Refresh);
                    callbackrecu.InsertPatientCallbackEvent += new ICallback.CallbackEventHandler7(callbackrecufourn_Refresh);
                    callbackrecu.InsertMedecinCallbackEvent += new ICallback.CallbackEventHandler6(callbackrecuMedecin_Refresh);


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

                    proxy.InnerDuplexChannel.Closed += new EventHandler(InnerDuplexChannel_Closed);
                }
                else
                {
                    SELECTEDMEDECIN = disponible;
                    medecinsession  = true;
                    DateVisiteDébut.SelectedDate = DateTime.Now;
                    DateVisiteFin.SelectedDate   = DateTime.Now;
                    PatientDataGrid.ItemsSource  = proxy.GetAllVisiteByVisiteMedecin(SELECTEDMEDECIN.Id).Where(n => n.Date >= DateVisiteDébut.SelectedDate && n.Date <= DateVisiteFin.SelectedDate);
                    List <SVC.Medecin> testmedecin = proxy.GetAllMedecin().OrderBy(n => n.Nom).ToList();
                    MedecinCombo.ItemsSource = testmedecin;
                    List <SVC.Medecin> tte = testmedecin.Where(n => n.UserName == MemberUser.UserName).ToList();
                    MedecinCombo.SelectedItem = tte.First();
                    PatientCombo.ItemsSource  = proxy.GetAllPatient().Where(n => n.SuiviParCode == SELECTEDMEDECIN.Id).OrderBy(x => x.Nom);

                    txtAchat.Text       = Convert.ToString((proxy.GetAllVisiteByVisiteMedecin(SELECTEDMEDECIN.Id).Where(n => n.Date >= DateVisiteDébut.SelectedDate && n.Date <= DateVisiteFin.SelectedDate)).AsEnumerable().Sum(o => o.Montant));
                    TxtVersement.Text   = Convert.ToString((proxy.GetAllVisiteByVisiteMedecin(SELECTEDMEDECIN.Id).Where(n => n.Date >= DateVisiteDébut.SelectedDate && n.Date <= DateVisiteFin.SelectedDate)).AsEnumerable().Sum(o => o.Versement));
                    txtFournisseur.Text = Convert.ToString(((proxy.GetAllVisiteByVisiteMedecin(SELECTEDMEDECIN.Id).Where(n => n.Date >= DateVisiteDébut.SelectedDate && n.Date <= DateVisiteFin.SelectedDate)).AsEnumerable().Sum(o => o.Reste)));

                    callbackrecu.InsertVisiteCallbackEvent  += new ICallback.CallbackEventHandler13(callbackrecu_Refresh);
                    callbackrecu.InsertPatientCallbackEvent += new ICallback.CallbackEventHandler7(callbackrecufourn_Refresh);
                    callbackrecu.InsertMedecinCallbackEvent += new ICallback.CallbackEventHandler6(callbackrecuMedecin_Refresh);
                    MedecinCombo.IsEnabled = false;

                    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 DétailTerminologie(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;
                ActeGrid.DataContext              = spécialtiérecu;
                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);
            }
        }