Пример #1
0
def callback():
    """
    update database with boolean values.
    currently partially managed by model.py
    """
    try:
        update = update_checks(vehicle, expiry, informed.get(),
                               inspected.get(), renewed.get())
        if update is not None:
            show_info(update)
            mc.table_data = show_within(entry.get())
    except ValueError:
        show_info("Invalid input, Number only la!!!")
        update.config(state=NORMAL)
        pass
Пример #2
0
def callback():
    """
    update database with boolean values.
    currently partially managed by model.py
    """
    try:
        update = update_checks(
            vehicle, expiry, informed.get(), inspected.get(), renewed.get())
        if update is not None:
            messagebox.showinfo("Update","Some informations have been updated : {}".format(update))
            mc.table_data = show_within(entry.get())
    except ValueError:
        messagebox.showerror("Invalid input","The value you entered in incorrect. It must be a number")
        update.config(state=NORMAL)
        pass
Пример #3
0
def callback():
    """
    update database with boolean values.
    currently partially managed by model.py
    """
    try:
        updated_vehicle = []
        for val in mc.selected_rows:
            update = update_checks(val[0], val[1], val[2], val[3], val[4])
            updated_vehicle.append(update)

        if update is not None:
            messagebox.showinfo(
                "Update", "Some informations have been updated : {}".format(
                    updated_vehicle))
            mc.table_data = show_within(entry.get())
    except ValueError:
        messagebox.showerror(
            "Invalid input",
            "The value you entered in incorrect. It must be a number")
        update.config(state=NORMAL)
        pass