Finished adding a client, still the GUI need some retouches

This commit is contained in:
2024-12-11 17:16:37 +01:00
parent 9a8be0409a
commit e2fe0c89c0
5 changed files with 27 additions and 25 deletions

View File

@@ -14,12 +14,15 @@ class ContactDAO:
def addContact(self, contact):
try:
contact_id = self.__cur.callproc("addContactPerson", (contact, 0, ))
self.__cur.callproc("addContactPerson", (json.dumps(contact),))
self.__con.commit()
return contact_id[1]
#except mariadb.Error as e:
#print(str (e))
self.__cur.callproc("getLastInsertId")
contact_id = self.__cur.fetchone()
print(contact_id)
return contact_id[0]
except mariadb.Error as e:
print("MDB: " + str(e))
except Exception as e:
print(str (e))
print("PYT: " + str(e))