예제 #1
0
 private void btnPatient_Click(object sender, RoutedEventArgs e)
 {
     if (UserMembership.CréationPatient == true)
     {
         NewPatient CLNewPatient = new NewPatient(proxy, UserMembership, null);
         CLNewPatient.Show();
     }
     else
     {
         if (UserMembership.CréationPatient != true)
         {
             MessageBoxResult resultc1 = Xceed.Wpf.Toolkit.MessageBox.Show(GestionClinique.Properties.Resources.MessageBoxPrivilége, GestionClinique.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
 }
예제 #2
0
 private void btnNew_Click(object sender, RoutedEventArgs e)
 {
     try {
         if (memberuser.CréationPatient == true)
         {
             NewPatient CLMedecin = new NewPatient(proxy, memberuser, null);
             CLMedecin.Show();
         }
         else
         {
             MessageBoxResult resul03 = Xceed.Wpf.Toolkit.MessageBox.Show(Medicus.Properties.Resources.Opérationéchouée, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
     catch (Exception ex)
     {
         HandleProxy();
     }
 }
예제 #3
0
 private void MenuItem_Click_8(object sender, RoutedEventArgs e)
 {
     try {
         if (MemBerShip.CréationPatient == true)
         {
             NewPatient cl = new NewPatient(proxy, MemBerShip, null);
             cl.Show();
         }
         else
         {
             MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show("vous devez avoir une autorisation pour effectuer cette action", GestionClinique.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Stop);
         }
     }
     catch (Exception ex)
     {
         MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, GestionClinique.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Stop);
     }
 }
예제 #4
0
 private void ClientsDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         if (memberuser.ModificationPatient == true && PatientDataGrid.SelectedItem != null)
         {
             SVC.Patient SelectMedecin = PatientDataGrid.SelectedItem as SVC.Patient;
             NewPatient  CLMedecin     = new NewPatient(proxy, memberuser, SelectMedecin);
             CLMedecin.Show();
         }
         else
         {
             MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(Medicus.Properties.Resources.Opérationéchouée, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Stop);
         }
     }
     catch (Exception ex)
     {
         HandleProxy();
     }
 }
예제 #5
0
 private void btnPatient_Click(object sender, RoutedEventArgs e)
 {
     try {
         if (MemberUser.CréationPatient == true)
         {
             NewPatient CLNewPatient = new NewPatient(proxy, MemberUser, null);
             CLNewPatient.Show();
         }
         else
         {
             if (MemberUser.CréationPatient != true)
             {
                 MessageBoxResult resultc1 = Xceed.Wpf.Toolkit.MessageBox.Show(Medicus.Properties.Resources.MessageBoxPrivilége, 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.Stop);
     }
 }
예제 #6
0
        /// <summary>
        /// Opens the Register Patient Form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void registerPatientToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (UserSecurityController.AdminLoggedIn != null)
            {
                MessageBox.Show("You are not authorized to access this. ", "Access denied");
            }
            else
            {

            if (np == null)
            {
                np = new NewPatient();
                np.MdiParent = this;
                np.FormClosed += new FormClosedEventHandler(np_FormClosed);
                np.Show();
            }
            else
            {
                np.Activate();
            }
            }
        }
예제 #7
0
        private void Regestration_Button_Click(object sender, RoutedEventArgs e)
        {
            var s = new NewPatient();

            s.Show();
        }
예제 #8
0
        private void TxtCodePatient_KeyUp(object sender, KeyEventArgs e)
        {
            try
            {
                if (TxtCodePatient.Text != "")
                {
                    if (e.Key != System.Windows.Input.Key.Enter)
                    {
                        return;
                    }

                    // your event handler here
                    e.Handled = true;
                    List <SVC.Patient> tte = (proxy.GetAllPatient()).Where(n => n.Id == Convert.ToInt16(TxtCodePatient.Text)).ToList();

                    if (tte.Count() != 0)
                    {
                        if (memberuser.ModulePatient == true)
                        {
                            ListePatientHome ch = new ListePatientHome(proxy, memberuser, callback, tte, localclient);
                            ch.Show();
                        }
                        else
                        {
                            MessageBoxResult results = Xceed.Wpf.Toolkit.MessageBox.Show("vous devez avoir une autorisation pour effectuer cette action", "Medicus", MessageBoxButton.OK, MessageBoxImage.Stop);
                            if (results == MessageBoxResult.OK)
                            {
                                TxtCodePatient.Text = "";
                            }
                        }
                    }
                    else
                    {
                        MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show("Patient n'existe pas" + "\n" + "voulez vous créer un patient ? ", Medicus.Properties.Resources.SiteWeb, MessageBoxButton.YesNo, MessageBoxImage.Question);

                        if (result == MessageBoxResult.Yes)
                        {
                            if (memberuser.CréationPatient == true)
                            {
                                NewPatient CLMedecin = new NewPatient(proxy, memberuser, null);
                                CLMedecin.Show();
                            }
                            else
                            {
                                MessageBoxResult results = Xceed.Wpf.Toolkit.MessageBox.Show("vous devez avoir une autorisation pour effectuer cette action", Medicus.Properties.Resources.SiteWeb
                                                                                             , MessageBoxButton.OK, MessageBoxImage.Stop);
                                if (results == MessageBoxResult.OK)
                                {
                                    TxtCodePatient.Text = "";
                                }
                            }
                        }
                        else
                        {
                            TxtCodePatient.Text = "";
                        }
                    }
                }
            }catch (Exception ex)
            {
                MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(ex.Message, Medicus.Properties.Resources.SiteWeb, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }