Made the Check in function
All checks were successful
Potlatch Loggers Organization/ComputerKeeper/pipeline/head This commit looks good
All checks were successful
Potlatch Loggers Organization/ComputerKeeper/pipeline/head This commit looks good
This commit is contained in:
parent
4b5e3eb1f0
commit
bff2bc8a03
2
db.json
2
db.json
@ -1 +1 @@
|
|||||||
{"_default": {"1": {"Serial Number": "1", "Brand": "3", "Grade": "8", "Name": "9"}}}
|
{"_default": {"1": {"Serial Number": "1", "Brand": "3", "Grade": "", "Name": ""}}}
|
13
main.py
13
main.py
@ -134,7 +134,6 @@ def main():
|
|||||||
G = window["Grade"].get()
|
G = window["Grade"].get()
|
||||||
N = window["Name"].get()
|
N = window["Name"].get()
|
||||||
Table = window["table"].get()
|
Table = window["table"].get()
|
||||||
print(Table)
|
|
||||||
for row in Table:
|
for row in Table:
|
||||||
if SN == row[0]:
|
if SN == row[0]:
|
||||||
row[2] = G
|
row[2] = G
|
||||||
@ -143,6 +142,18 @@ def main():
|
|||||||
query=Query()
|
query=Query()
|
||||||
db.update({"Grade": G, "Name": N}, query["Serial Number"] == SN)
|
db.update({"Grade": G, "Name": N}, query["Serial Number"] == SN)
|
||||||
|
|
||||||
|
elif event == "Check In":
|
||||||
|
SN = window["Serial Number"].get()
|
||||||
|
Table = window["table"].get()
|
||||||
|
for row in Table:
|
||||||
|
if SN == row[0]:
|
||||||
|
row[2] = ""
|
||||||
|
row[3] = ""
|
||||||
|
window["table"].update(Table)
|
||||||
|
window["Grade"].update("")
|
||||||
|
window["Name"].update("")
|
||||||
|
query=Query()
|
||||||
|
db.update({"Grade": "", "Name": ""}, query["Serial Number"] == SN)
|
||||||
|
|
||||||
# Finish up by removing from the screen
|
# Finish up by removing from the screen
|
||||||
window.close()
|
window.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user