Ejemplo n.º 1
0
        private void addEventButton_Click(object sender, EventArgs e)
        {
            EventForm    form   = new EventForm(eM);
            DialogResult result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                Event temp = eM.getLastEvent();
                eventBindingSource.Add(temp);
            }
        }
Ejemplo n.º 2
0
 private void editEventButton_Click(object sender, EventArgs e)
 {
     if (eventListView.SelectedIndex != -1)
     {
         Event        ev     = (Event)eventListView.SelectedObject;
         EventForm    form   = new EventForm(eM, ev);
         DialogResult result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             eventBindingSource.Remove(ev);
             Event temp = eM.getLastEvent();
             eventBindingSource.Add(temp);
         }
     }
 }