예제 #1
0
        // wybor nowego eventu z comboboxa
        private void eventComboBox_SelectedValueChanged(object sender, EventArgs e)
        {
            if (eventComboBox.SelectedItem != null)
            {
                EventManagement em = new EventManagement();

                ei = em.GetEventDetails(eventComboBox.SelectedItem.ToString());

                eventDate.Text     = "Termin wydarzenia: \n" + ei.date.ToString();
                agendaTextBox.Text = ei.agenda;
            }
        }
예제 #2
0
        // pobieranie eventow z bazy
        private void updateEventComboBox()
        {
            EventManagement em = new EventManagement();

            eventComboBox.BeginUpdate();
            eventComboBox.Items.Clear();
            foreach (string item in em.GetEventsList())
            {
                eventComboBox.Items.Add(item);
            }
            eventComboBox.EndUpdate();
        }
예제 #3
0
 // zapisz wydarzenie
 private void saveEvent_Click(object sender, EventArgs e)
 {
     // jezeli podane zostaly wszystkie dane, to przypisz uzytkownikowi wydarzenie
     if (eventComboBox.SelectedItem != null &&
         PreferredFood.SelectedItem != null &&
         EventUserType.SelectedItem != null)
     {
         EventManagement em = new EventManagement();
         em.AddUserEvent(account.id, PreferredFood.SelectedItem.ToString(),
                         ei.id, EventUserType.SelectedItem.ToString());
     }
     else
     {
         Console.WriteLine("Nie wybrano wszystkich pól");
     }
 }