Adding customer done..still the GUI needs retouches

This commit is contained in:
2024-12-11 18:50:18 +01:00
parent e2fe0c89c0
commit 9ea0c94674
5 changed files with 10 additions and 13 deletions

View File

@@ -15,7 +15,6 @@ class BusinessDAO:
def addBusiness(self, data, contact_id):
try:
print(data)
self.__cur.callproc("addBusiness", (json.dumps(data), contact_id))
self.__con.commit()

View File

@@ -1,5 +1,5 @@
# This Python file uses the following encoding: utf-8
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot, Signal
from .BusinessDAO import BusinessDAO
# USERS TABLE
@@ -109,8 +109,7 @@ class BusinessModel(QAbstractTableModel):
@Slot(dict, int)
def addBusiness(self, business, contact_id):
BusinessDAO().addBusiness(business, contact_id)
#BusinessDAO().addPlz()
self.__data = self.__getData()
@Slot(dict)
def setContact(self, contact):

View File

@@ -18,7 +18,6 @@ class ContactDAO:
self.__con.commit()
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))