diff --git a/db.json b/db.json index 33dcf35..2963a29 100644 --- a/db.json +++ b/db.json @@ -1 +1 @@ -{"_default": {"1": {"Serial Number": "1", "Brand": "3", "Grade": "4", "Name": "5"}}} \ No newline at end of file +{"_default": {"1": {"Serial Number": "1", "Brand": "3", "Grade": "8", "Name": "9"}}} \ No newline at end of file diff --git a/main.py b/main.py index 346328e..f92d1ce 100644 --- a/main.py +++ b/main.py @@ -136,7 +136,12 @@ def main(): Table = window["table"].get() print(Table) for row in Table: - + if SN == row[0]: + row[2] = G + row[3] = N + window["table"].update(Table) + query=Query() + db.update({"Grade": G, "Name": N}, query["Serial Number"] == SN) # Finish up by removing from the screen