Beispiel #1
0
    def populate_event_label(self):
        semester_tag = MIS_Database_Functions.get_most_recent_semester_tag()
        if semester_tag is None:  # Failure State
            self.current_label.config(style="ErrorLabel.TLabel")
            self.current_label['text'] = 'No semester created yet!\n' \
                                         'Create one first, then\n' \
                                         'restart this system. :)'
            return

        event_id = MIS_Database_Functions.get_most_recent_event_id()
        if event_id is not None:
            event_data = MIS_Database_Functions.get_event_data(event_id)
            self.current_label['text'] = 'Newest Event:\n%s' % (event_data['company'])
        else:
            self.feedback_label.config(style="ErrorLabel.TLabel")
            self.current_label['text'] = 'No event yet.\nCreate one here.'
Beispiel #2
0
    def set_focus(self):
        # Populate information in the currency labels
        event_id = MIS_Database_Functions.get_most_recent_event_id()
        if event_id is not None:
            data = MIS_Database_Functions.get_event_data(event_id)
            self.currency_label['text'] = "Current Check In:\n%s" % data['company']
        else:
            self.currency_label['text'] = "Not ready to check in yet.\nPlease create an event."
            self.currency_label.config(style='ErrorLabel.TLabel')

        # Set the tab indexes
        tab_order_tuple = (self.net_id_entry, self.get_data_button, self.submit_data_button, self.clear_all_button,
                           self.verify_button)
        for widget in tab_order_tuple:
            widget.lift()
        tab_order_tuple[0].focus()