def open_adding_new_record_window(master, events, callback):
    next_record = RecordOfDrawLots.create_new_record_by_last_one(
        DrawLotsModel.select_last_record(), _get_current_date_time_str())
    popup = AddingRecordWindow(
        master, next_record, events, lambda added_record:
        (DrawLotsModel.insert_record_into_db(added_record),
         callback(added_record)))
    master.wait_window(popup)
 def _post_submitting(self):
     self.callback(self.record)
     self._init_context(RecordOfDrawLots.create_new_record_by_last_one(self.record, _get_current_date_time_str()))
def open_adding_new_record_window(master, events, callback):
    next_record = RecordOfDrawLots.create_new_record_by_last_one(
        DrawLotsModel.select_last_record(), _get_current_date_time_str())
    popup = AddingRecordWindow(master, next_record, events, lambda added_record: (
        DrawLotsModel.insert_record_into_db(added_record), callback(added_record)))
    master.wait_window(popup)
 def _post_submitting(self):
     self.callback(self.record)
     self._init_context(
         RecordOfDrawLots.create_new_record_by_last_one(
             self.record, _get_current_date_time_str()))
Example #5
0
def _convert_selected_columns_to_record(columns):
    return RecordOfDrawLots([columns[0], columns[3], columns[4]], select_specific_event(columns[1]),
                            select_character_by_specific_column('ID', columns[2]))