private void AddAGuestToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (guestForm == null)
     {
         CreateNewGuestForm();
     }
     if (guestForm.guestFormClosed)
     {
         CreateNewGuestForm();
     }
     guestForm.Display(GuestForm.FormState.Add);
     guestForm.Show();
 }
        private void GuestListView_SelectedIndexChanged(object sender, EventArgs e)
        {
            Guest guest;

            if (mdiParentForm.currentGuestForm == null)
            {
                guestForm = new GuestForm(guestController, accountDB);
                mdiParentForm.currentGuestForm = guestForm;
            }

            else
            {
                if (mdiParentForm.currentGuestForm.guestFormClosed)
                {
                    guestForm = new GuestForm(guestController, accountDB);
                    mdiParentForm.currentGuestForm = guestForm;
                }
                else
                {
                    guestForm = mdiParentForm.currentGuestForm;
                }
            }

            guest = guestController.FindByID(guestListView.FocusedItem.Text);
            guestForm.MdiParent = (GuestMDIParent)this.MdiParent;
            guestForm.Show();
            guestForm.Display(guest, GuestForm.FormState.Edit);
            guestListView.Refresh();
        }
 private void GuestButton_Click(object sender, EventArgs e)
 {
     if (guestForm == null)
     {
         CreateNewGuestForm();
     }
     if (guestForm.guestFormClosed)
     {
         CreateNewGuestForm();
     }
     guestForm.Display(GuestForm.FormState.Add);
     guestForm.Show();
     this.Close();
 }