示例#1
0
        private void ChangeButton_Click(object sender, RoutedEventArgs e)
        {
            Notification newNotification = new Notification(notificationTextBox.Text, GetTimeFromComboBoxes(), (DateTime)startDatePicker.SelectedDate, (DateTime)endDatePicker.SelectedDate, (bool)notificationCheckBox.IsChecked);

            NotificationController.GetInstance().ChangeNotification((Notification)notificationComboBox.SelectedItem, newNotification);
            PatientMainWindow.GetInstance(_loggedInPatient).Notify();
        }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     ResetNumberOfFinishedAppointments();
     _loggedInPatient.Activity.HospitalReviewTime = DateTime.Now;
     this.Close();
     PatientMainWindow.GetInstance(_loggedInPatient).Show();
 }
示例#3
0
        private void CreateNotification()
        {
            Notification newNotification = FormNotification();

            NotificationController.GetInstance().AddNotification(newNotification);
            LoadNotificationComboBox();
            PatientMainWindow.GetInstance(_loggedInPatient).Notify();
        }
 public static PatientMainWindow GetInstance(Patient patient)
 {
     if (_instance == null)
     {
         _instance = new PatientMainWindow(patient);
     }
     return(_instance);
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     DoctorController.getInstance().SaveInFlie();
     AppointmentController.getInstance().SaveAppointmentsInFile();
     PatientController.getInstance().SaveInFile();
     NotificationController.GetInstance().SaveInFile();
     _instance = null;
 }
示例#6
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (PrescriptionIsNotSelected())
     {
         Notification prescriptionNotification = CreateNotification();
         AddCreatedNotification(prescriptionNotification);
         PatientMainWindow.GetInstance(_loggedInPatient).Notify();
     }
     else
     {
         MessageBox.Show("Niste selektovali terapiju.", "Notifikacija", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
示例#7
0
 private void DeleteNotificationButton_Click(object sender, RoutedEventArgs e)
 {
     NotificationController.GetInstance().RemoveNotification((Notification)notificationComboBox.SelectedItem);
     PatientMainWindow.GetInstance(_loggedInPatient).Notify();
 }
示例#8
0
 private void HomeButton_Click(object sender, RoutedEventArgs e)
 {
     this.Close();
     PatientMainWindow.GetInstance(_loggedInPatient).Show();
 }
示例#9
0
 private void HomeButton_Click(object sender, RoutedEventArgs e)
 {
     this.Close();
     PatientMainWindow.GetInstance(appointmentForEditing.Patient).Show();
 }