Beispiel #1
0
        private void addTopicButton_Click(object sender, EventArgs e)
        {
            TopicForm    form   = new TopicForm(tM, (Event)eventListView.SelectedObject);
            DialogResult result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                Topic temp = tM.getLastTopic();
                topicBindingSource.Add(temp);
            }
        }
Beispiel #2
0
 private void editTopicButton_Click(object sender, EventArgs e)
 {
     if (topicDataListView.SelectedIndex != -1)
     {
         Event        ev     = (Event)eventListView.SelectedObject;
         Topic        t      = (Topic)topicDataListView.SelectedObject;
         TopicForm    form   = new TopicForm(tM, t, ev);
         DialogResult result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             topicBindingSource.Remove(t);
             Topic temp = tM.getLastTopic();
             topicBindingSource.Add(temp);
         }
     }
 }