Double-confirmation for database delete.
This commit is contained in:
@ -181,6 +181,8 @@ class Toplevel1:
|
||||
# Next two lines commented out in Windows version - the connection commands work on macOS
|
||||
#conn = sqlite3.connect('checkouts.db') # Re-establish connection to the database
|
||||
#conn.close # Close out the current database
|
||||
self.ConfirmClear = tk.messagebox.askquestion ('PECOS - Confim','Final answer: Are you sure you wish to clear the database?')
|
||||
if self.ConfirmClear == 'yes':
|
||||
os.remove("checkouts.db") # Delete the current database
|
||||
shutil.copy("emptybase.db", "checkouts.db") # Copy over an empty database
|
||||
shutil.rmtree('item')
|
||||
|
@ -1,9 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
PECOS Export - 06:14:31 on Wednesday, November 11, 2020
|
||||
PECOS Export - 06:37:11 on Monday, November 30, 2020
|
||||
</title>
|
||||
<h2>PECOS Export File – 06:14:31 on Wednesday, November 11, 2020</h2>
|
||||
<h2>PECOS Export File – 06:37:11 on Monday, November 30, 2020</h2>
|
||||
<hr>
|
||||
<style type="text/css">
|
||||
.tg {border-collapse:collapse;border-spacing:0;}
|
||||
@ -25,12 +25,3 @@ PECOS Export - 06:14:31 on Wednesday, November 11, 2020
|
||||
<tr>
|
||||
<th class="tg-cly1"><img src="patron/1230004231819.svg" width=200></th><th class="tg-cly1"><strong>Batch: </strong>2</th><th class="tg-cly1"><img src="item/1234567892.svg" width=200>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tg-cly1"><img src="patron/1230004233141.svg" width=200></th><th class="tg-cly1"><strong>Batch: </strong>3</th><th class="tg-cly1"><img src="item/1234567893.svg" width=200>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tg-cly1"><img src="patron/1230004233141.svg" width=200></th><th class="tg-cly1"><strong>Batch: </strong>3</th><th class="tg-cly1"><img src="item/1234567894.svg" width=200>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tg-cly1"><img src="patron/1230004233141.svg" width=200></th><th class="tg-cly1"><strong>Batch: </strong>3</th><th class="tg-cly1"><img src="item/1234567895.svg" width=200>
|
||||
</tr>
|
||||
|
@ -1 +0,0 @@
|
||||
Item data will go here.
|
@ -1 +0,0 @@
|
||||
Patron data will go here.
|
@ -181,6 +181,8 @@ class Toplevel1:
|
||||
# Next two lines commented out in Windows version - the connection commands work on macOS
|
||||
#conn = sqlite3.connect('checkouts.db') # Re-establish connection to the database
|
||||
#conn.close # Close out the current database
|
||||
self.ConfirmClear = tk.messagebox.askquestion ('PECOS - Confim','Final answer: Are you sure you wish to clear the database?')
|
||||
if self.ConfirmClear == 'yes':
|
||||
os.remove("checkouts.db") # Delete the current database
|
||||
shutil.copy("emptybase.db", "checkouts.db") # Copy over an empty database
|
||||
shutil.rmtree('item')
|
||||
|
@ -181,6 +181,8 @@ class Toplevel1:
|
||||
# Next two lines commented out in Windows version - the connection commands work on macOS
|
||||
#conn = sqlite3.connect('checkouts.db') # Re-establish connection to the database
|
||||
#conn.close # Close out the current database
|
||||
self.ConfirmClear = tk.messagebox.askquestion ('PECOS - Confim','Final answer: Are you sure you wish to clear the database?')
|
||||
if self.ConfirmClear == 'yes':
|
||||
os.remove("checkouts.db") # Delete the current database
|
||||
shutil.copy("emptybase.db", "checkouts.db") # Copy over an empty database
|
||||
shutil.rmtree('item')
|
||||
|
Reference in New Issue
Block a user