Exemplo n.º 1
0
def delete_selected():
    backend.delete_book(selected_book[0])
    titleE.delete(0, END)
    authorE.delete(0, END)
    yearE.delete(0, END)
    isbnE.delete(0, END)
    messagebox.showinfo("Success", "Book Deleted.")
    view_all()
Exemplo n.º 2
0
    def delete(round):
        sno.grid_forget()
        entry_box_sno.grid_forget()
        name_book.grid_forget()
        entry_box_book.grid_forget()
        next_button.grid_forget()

        val = backend.delete_book(entry_box_sno.get(), entry_box_book.get())

        label_1 = Label(myFrame)

        if val == 1:

            label_1.config(text="\n\nSerial no. : " + entry_box_sno.get() +
                           "\nBook Name : " + entry_box_book.get() +
                           "\nis successfully deleted from the record.",
                           relief=RAISED,
                           fg="white",
                           bg="#3b404e",
                           bd=0,
                           font=("Calibri", 12),
                           width=35,
                           anchor="center")

        else:
            error = Label(
                myFrame,
                text="Unsuccessful!!",
                fg="white",
                relief=RAISED,
                bg="#3b404e",
                bd=0,
                font=("Calibri", 12),
                width=35,
                anchor="center",
            )
            error.config(highlightbackground="red", highlightthickness=1)
            label_1.config(text="\n\nSerial no. : " + entry_box_sno.get() +
                           "\nBook Name : " + entry_box_book.get() +
                           "\ndoes not exists.",
                           relief=RAISED,
                           fg="white",
                           bg="#3b404e",
                           bd=0,
                           font=("Calibri", 12),
                           width=35,
                           anchor="center")
            error.grid(row=0, column=0, padx=60, pady=5)
        label_1.grid(row=1, column=0, padx=60, pady=5)

        #next button for going to the next step
        next_button_1 = Button(myFrame,
                               image=rounded_button,
                               borderwidth=0,
                               command=lambda: home_window(round))
        next_button_1.grid(row=2, column=0, pady=30)
        next_button_1.config(highlightthickness=0)
Exemplo n.º 3
0
def delete():
    sno.grid_forget()
    entry_box_sno.grid_forget()
    name_book.grid_forget()
    entry_box_book.grid_forget()
    next_button.grid_forget()
    
    backend.delete_book(entry_box_sno.get(),entry_box_book.get())

    label_1= Label(frame_1, text ="\n\nSerial no. : "+entry_box_sno.get()+"\nBook Name : "+entry_box_book.get()+"\nis successfully deleted from the record.", relief = RAISED, fg = "white", bg = "#3b404e", bd=0 , font = ("Calibri",12), width=35, anchor="center")
    label_1.grid(row = 0, column = 0, padx=60, pady=5)
    
    

    #next button for going to the next step
    next_button_1=Button(frame_1, image=rounded_button, borderwidth=0)
    next_button_1.grid(row = 1, column = 0, pady=30)
    next_button_1.config(highlightthickness=0)
Exemplo n.º 4
0
 def book_lost():
     name = entry_box_name.get()
     sr = entry_serial.get()
     val = backend.delete_book(sr)
     add_window(round)
Exemplo n.º 5
0
def delete_button():
    global selected_tuple
    index = l1.curselection()[0]
    selected_tuple = l1.get(index)
    backend.delete_book(str(selected_tuple[0]))
    view_button()
Exemplo n.º 6
0
def delete_book():
    backend.delete_book(db_name, selected_book[0])

    # Refresh output listbox and clean entries
    clean_entries()
    view_function()