def delete_command(): # lb.delete(END,get_selected_row.selected_tuple) tkinter.messagebox.askyesno( title='Alert', message='''Are you sure you want to delete this record? This action cannot be undone.''') ledger_bk.delete(selected_tuple[0]) view_command() print(now_date + ' ' + now_hour + now_min + ':' + ' ' + 'User deleted a record')
def del_command(): item = tview.item(tview.focus(), 'values') if (item == ""): pass else: res = messagebox.askquestion('Thông báo', 'Bạn có thực sự muốn xóa không?') if res == 'yes': id = item[0] ledger_bk.delete(id) view_command() messagebox.showinfo('Message', 'Delete Success!') else: messagebox.showinfo('Thông báo', 'Cancel')
def delete_command(): ledger_bk.delete(selected_tuple[0]) view_command()