private void AddGuestButton_Click(object sender, EventArgs e)
        {
            var AddG = new AddGuest();

            AddG.ShowDialog();

            if (AddGuest.GuestAdded)
            {
                ShowGuests();
            }
        }
示例#2
0
        private void addButton_Click(object sender, EventArgs e)
        {
            AddGuest addguest = new AddGuest();

            addguest.ShowDialog();

            string surname = addguest.GetSurname();
            string room    = addguest.GetRoom();
            string dish    = addguest.GetDish();

            if (surname != "")
            {
                registration.AddGuest(surname, room, dish);

                registration.WriteGuests();
                UpdateListBox();
            }
        }