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

@@ -1,5 +1,6 @@
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot, QObject, Signal
from .ContactDAO import ContactDAO
from ..ConfigLoader import ConfigLoader
import logging
class ContactModel(QObject):
@@ -7,6 +8,7 @@ class ContactModel(QObject):
def __init__(self):
super().__init__()
#self.logger = logging.getLogger()
self.__key = ConfigLoader().getKey()
print(f"*** File: {__file__}, __init__()")
self.__data = self.__getData()
@@ -21,7 +23,9 @@ class ContactModel(QObject):
@Slot(dict)
def addContact(self, contact):
i = ContactDAO().addContact(contact)
print(len(self.__key))
print(self.__key)
i = ContactDAO().addContact(self.__key, contact)
self.contactIdReady.emit(i)