AddCustomer, AddContact finished
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user