Example #1
0
        public BookingFrm(Login loginForm, BookingDataHandlerClass bookingDataHandlerClass)
        {
            _loginForm = loginForm;
            _bookingDataHandlerClass = bookingDataHandlerClass;

            //if no shows then go back to login because admin must add data
            if (_bookingDataHandlerClass.HasContent == true)
            {
                InitializeComponent();
                var showNames = _bookingDataHandlerClass.GetShowNames();
                combBoxShows.Items.AddRange(showNames);
            }
            else
            {
                //return to login
                MessageBox.Show(Resources.BookingFrm_BookingFrm_Unfortunately_no_shows_have_been_added_to_the_program__The_admin_must_login_to_add_shows_);
                LogOut();
            }
        }
Example #2
0
 public AdminFrm(Login loginForm, BookingDataHandlerClass bookingDataHandlerClass)
 {
     _loginForm = loginForm;
     _bookingDataHandlerClass = bookingDataHandlerClass;
     InitializeComponent();
 }