private void ConfirmButton_Click(object sender, RoutedEventArgs e)
        {
            initialNotification.Title        = NotificationTitle;
            initialNotification.Content      = NotificationContent;
            initialNotification.CreationDate = DateTime.Now;

            _notificationController.Update(initialNotification.ID, initialNotification);
            _parent.UpdateTable();
            Close();
        }
 public static StartingPage GetPage(Secretary currentSecretary, SecretaryMain parent)
 {
     if (_instance == null)
     {
         _instance = new StartingPage(currentSecretary, parent);
     }
     else
     {
         _instance.UpdateTable();
     }
     parent.Title.Content = "Početna";
     return(_instance);
 }
Пример #3
0
        private void ConfirmButton_Click(object sender, RoutedEventArgs e)
        {
            if (RecipientsListBox.SelectedItems.Count == 0)
            {
                return;
            }
            int           id = _notificationController.GetAll().Count;
            Notification  newNotification    = new Notification(id, NotificationTitle, NotificationContent, DateTime.Now);
            List <string> selectedRecipients = RecipientsListBox.SelectedItems.Cast <string>().ToList();

            newNotification.FillRecipients(selectedRecipients);
            _notificationController.Create(newNotification);
            _parent.UpdateTable();
            Close();
        }