Esempio n. 1
0
def view_all():
    # Clear field so you do not get duplicates
    resultList.delete(0, END)
    # Get info from db
    results = backend.view_all()
    for x in results:
        resultList.insert(END, x)
Esempio n. 2
0
def delete_command():
    index_of_listbox = list1.curselection()[
        0]  # Using this to get the number of the selected line of the listbox.
    index_of_database = list1.get(index_of_listbox)[1][
        0]  # Using this to get the the number of line which is registered in the database. (content enumeration: database table different from listbox)
    backend.delete(index_of_database)
    list1.delete(0, END)
    for count, row in enumerate(
            backend.view_all()):  # Updating the listbox after deleting
        list1.insert(END, (count + 1, row))
Esempio n. 3
0
def update_command():
    # list1.delete(0,END)
    index_of_listbox = list1.curselection()[
        0]  # Using this to get the number of the selected line of the listbox.
    index_of_database = list1.get(index_of_listbox)[1][
        0]  # Using this to get the the number of line which is registered in the database. (for content enumeration: database table different from listbox)
    backend.update(index_of_database, title_text_input.get(),
                   author_text_input.get(), year_text_input.get(),
                   isbn_text_input.get())
    list1.delete(0, END)
    for count, row in enumerate(backend.view_all(
    )):  # Updating the listbox after updating the database.
        list1.insert(END, (count + 1, row))
Esempio n. 4
0
def view_all_button():
    list_display.delete(0, END)
    for item in be.view_all():
        list_display.insert(END, item)
Esempio n. 5
0
def view():
    a11.delete(0, END)
    for item in backend.view_all():
        a11.insert(END, item)
Esempio n. 6
0
def view_command():
    list1.delete(0, END)  # Deleting everything from start to end.
    for count, row in enumerate(backend.view_all()):
        list1.insert(
            END, (count + 1, row)
        )  # The first argument sets the position where its going to get settled the incoming string inside the view box, e.g. 0,1,2... END.
def view_command():
    '''View entire database.'''
    listbox1.delete(0, END)
    listbox1.insert(END, ("{}, {}, {}, {}, {}".format("ID", "Title", "Alternate Title", "Length", "Year")))
    for row in backend.view_all():
        listbox1.insert(END, "{}, {}, {}, {}, {}".format(str(row[0]), str(row[1]), str(row[2]), str(row[3]), str(row[4])))
Esempio n. 8
0
def view_command():
    list1.delete(0, END)
    for row in backend.view_all():
        list1.insert(END, row)
Esempio n. 9
0
def view_all_command():
    entries_field.delete(0, END)
    for row in backend.view_all():
        entries_field.insert(END, row)
 def view_command(self):
     """View entries via button."""
     self.l.delete(0, END)
     for row in backend.view_all():
         self.l.insert(END, row)
Esempio n. 11
0
def view():
    lb.delete(0, END)
    for row in backend.view_all():
        lb.insert(END, row)
Esempio n. 12
0
def view_command():
    """Calls the view function from backend.py"""
    list_box.delete(0,END)
    for row in backend.view_all():
        list_box.insert(END,row)
Esempio n. 13
0
def populate_list_view():
    listy.delete(0, END)
    for item in backend.view_all():
        listy.insert(END, item)