コード例 #1
0
        private void buttonViewProfile_Click(object sender, RoutedEventArgs e)
        {
            ProfileWindow profileWindow = new ProfileWindow();

            profileWindow.Show();
            this.Close();
        }
コード例 #2
0
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.M)
     {
         ProfileWindow profileWindow = new ProfileWindow();
         profileWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.H)
     {
         HomePageWindow homePageWindow = new HomePageWindow();
         homePageWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.Escape)
     {
         MainWindow mainWindow = new MainWindow();
         mainWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.U)
     {
         ReviewWeeklyTherapyWindow reviewWeeklyTherapyWindow = new ReviewWeeklyTherapyWindow();
         reviewWeeklyTherapyWindow.Show();
         this.Close();
     }
 }
コード例 #3
0
 private void Window_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.M)
     {
         ProfileWindow profileWindow = new ProfileWindow();
         profileWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.H)
     {
         HomePageWindow homePageWindow = new HomePageWindow();
         homePageWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.Escape)
     {
         MainWindow mainWindow = new MainWindow();
         mainWindow.Show();
         this.Close();
     }
 }
コード例 #4
0
        private void buttonConfrim_Click(object sender, RoutedEventArgs e)
        {
            if (firstName.Text.Equals("") || lastName.Text.Equals("") || jmbg.Text.Equals("") || dateOfBirthPicker.Text.Equals("") || telephoneNumber.Text.Equals("") || homeAdress.Text.Equals("") || cityAdress.Text.Equals("") || emailAdress.Text.Equals(""))
            {
                ValidationMessageWindow validationWindow = new ValidationMessageWindow();
                validationWindow.Show();
            }
            else
            {
                string name = firstName.Text;

                string surname = lastName.Text;

                GenderType gender;

                if (male.IsChecked == true)
                {
                    gender = GenderType.M;
                }
                else
                {
                    gender = GenderType.Z;
                }

                DateTime dateOfBirth = (DateTime)dateOfBirthPicker.SelectedDate;

                string telephone = telephoneNumber.Text;

                string street = homeAdress.Text;

                City city = (City)cityAdress.SelectedItem;

                string email = emailAdress.Text;

                patient = new Patient(MainWindow.patient.Jmbg, name, surname, dateOfBirth, gender, city, street, telephone, email, MainWindow.patient.Username, MainWindow.patient.Password, MainWindow.patient.DateOfRegistration, MainWindow.patient.IsGuest);

                PatientCard pc = new PatientCard(patient);

                if (userController.EditProfile(patient) != null && patientCardController.EditPatientCard(pc) != null)
                {
                    List <Examination> examinations = examinationController.ViewExaminationsByPatient(patient.Jmbg);

                    foreach (Examination exm in examinations)
                    {
                        exm.patientCard = pc;
                        examinationController.EditExamination(exm);
                    }

                    List <Therapy> therapies = therapyController.ViewAllTherapyByPatient(patient.Jmbg);

                    foreach (Therapy t in therapies)
                    {
                        t.patientCard = pc;
                        therapyController.EditTherapy(t);
                    }

                    List <PlacemetnInARoom> placemetnInARooms = placementInSickRoomController.ViewPatientPlacements(patient.Jmbg);

                    foreach (PlacemetnInARoom p in placemetnInARooms)
                    {
                        p.patientCard = pc;
                        placementInSickRoomController.EditPlacement(p);
                    }

                    ProfileWindow profileWindow = new ProfileWindow();
                    profileWindow.Show();
                    this.Close();
                }
                else
                {
                    ValidationMessageWindow validationMessageWindow = new ValidationMessageWindow();
                    validationMessageWindow.caption.Text = "Neuspešna izmena podataka!";
                    validationMessageWindow.Show();
                }
            }
        }
コード例 #5
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.M)
            {
                ProfileWindow profileWindow = new ProfileWindow();
                profileWindow.Show();
                this.Close();
            }
            else if (e.Key == Key.O)
            {
                ReviewNotificationWindows reviewNotificationWindows = new ReviewNotificationWindows();
                reviewNotificationWindows.Show();
                this.Close();
            }
            else if (e.Key == Key.Escape)
            {
                MainWindow mainWindow = new MainWindow();
                mainWindow.Show();
                this.Close();
            }
            else if (e.Key == Key.S)
            {
                MakeAppointmentWindow makeAppointmentWindow = new MakeAppointmentWindow();
                makeAppointmentWindow.Show();
                this.Close();
            }
            else if (e.Key == Key.P)
            {
                RecommendationAppointmentWindow recommendationAppointmentWindow = new RecommendationAppointmentWindow();
                recommendationAppointmentWindow.Show();
                this.Close();
            }
            else if (e.Key == Key.Z)
            {
                ReviewExaminationsWindow reviewExaminationsWindow = new ReviewExaminationsWindow();
                reviewExaminationsWindow.Show();
                this.Close();
            }
            else if (e.Key == Key.T)
            {
                ReviewTherapyWindow reviewTherapyWindow = new ReviewTherapyWindow();
                reviewTherapyWindow.Show();
                this.Close();
            }
            else if (e.Key == Key.C)
            {
                CancelExaminationWindow cancelExaminationWindow = new CancelExaminationWindow();
                cancelExaminationWindow.Show();
                this.Close();
            }
            else if (e.Key == Key.I)
            {
                ReviewReportWindow reviewReportWindow = new ReviewReportWindow();
                reviewReportWindow.Show();
                this.Close();
            }
            else if (e.Key == Key.A)
            {
                SurveyWindow surveyWindow = new SurveyWindow();
                surveyWindow.Show();
                this.Close();
            }
            else if (e.Key == Key.E)
            {
                string currentUsername = MainWindow.patient.Username;

                GraphicalEditor.MainWindow graphicalEditorMainWindow = new GraphicalEditor.MainWindow("Patient", currentUsername);
                graphicalEditorMainWindow.ShowDialog();
            }
        }