AddCustomer, AddContact finished

This commit is contained in:
2024-12-15 20:44:44 +01:00
parent 59e5fadd26
commit e28c68f643
5 changed files with 31 additions and 12 deletions

View File

@@ -8,14 +8,14 @@ class BusinessDAO:
self.__con = DbManager().getConnection()
self.__cur = self.__con.cursor()
def getBusiness(self, criterion = "Alle"):
self.__cur.callproc("getCustomerView", (criterion,))
def getBusiness(self, key, criterion = "Alle"):
self.__cur.callproc("getCustomerView", (key, criterion,))
self.__all_cols = [desc[0] for desc in self.__cur.description]
return self.__cur.fetchall(), self.__all_cols
def addBusiness(self, data, contact_id):
def addBusiness(self, key, data, contact_id):
try:
self.__cur.callproc("addBusiness", (json.dumps(data), contact_id))
self.__cur.callproc("addBusiness", (key, json.dumps(data), contact_id))
self.__con.commit()
except mariadb.Error as e: