private void modifyElButton_Click(object sender, RoutedEventArgs e)
        {
            if (listBox.SelectedItem == null)
            {
                MessageBox.Show("Please select a subject from the list");
                return;
            }

            ListEl listEl = listOfListEls[listBox.SelectedIndex];

            CreateUpdateWindow window = new CreateUpdateWindow();

            window.Title = "Modify";
            window.subjectTextBlock.Text            = listEl.SubjectName;
            window.deadlineDatePicker.SelectedDate  = listEl.Deadline;
            window.amountOfTopicsTextBlock.Text     = listEl.AmountOfTopics.ToString();
            window.numberOfDoneTopicsTextBlock.Text = listEl.NumberOfDoneTopics.ToString();
            window.ShowDialog();

            window.Owner = this;
            if (window.DialogResult == true)
            {
                string oldData = JsonConvert.SerializeObject(listEl.Data);

                listEl.SubjectName        = window.subjectTextBlock.Text;
                listEl.Deadline           = window.deadlineDatePicker.SelectedDate ?? DateTime.Now;
                listEl.AmountOfTopics     = Convert.ToInt32(window.amountOfTopicsTextBlock.Text);
                listEl.NumberOfDoneTopics = Convert.ToInt32(window.numberOfDoneTopicsTextBlock.Text);

                DBExecutor.ModifyDBEntry(oldData, JsonConvert.SerializeObject(listEl.Data));
            }
        }
        private void addNewElButton_Click(object sender, RoutedEventArgs e)
        {
            CreateUpdateWindow window = new CreateUpdateWindow();

            window.Title = "Create";
            window.ShowDialog();
            window.Owner = this;
            if (window.DialogResult == true)
            {
                AddListElement(amountOfTopics: Convert.ToInt32(window.amountOfTopicsTextBlock.Text),
                               deadline: window.deadlineDatePicker.SelectedDate ?? DateTime.Now, subjectName: window.subjectTextBlock.Text,
                               Convert.ToInt32(window.numberOfDoneTopicsTextBlock.Text));
            }
        }