Rewriting "Add records" dialog. Added relations records view.

This commit is contained in:
Sergey Kalinin 2017-03-23 13:59:00 +03:00
parent a0cf5e5d10
commit 0c5a9641e9
2 changed files with 9 additions and 8 deletions

4
dm.py
View File

@ -137,8 +137,8 @@ def createTables(tbl_list):
i = i + 1
tbl_descr_list.append(one_Table_descr)
tbl_struct_list.append(one_Table_struct)
#print(qwery_create)
#c.execute(qwery_create)
print(qwery_create)
c.execute(qwery_create)
return tbl_names_list
def initDBstructure():

13
gui.py
View File

@ -382,13 +382,14 @@ def showRelationsRecords(fieldIndex, fieldValue):
for i in tblList:
if i[1] == tblDescr:
tblName = i[0]
fieldNamesList = dm.getTableStructure(tblName)
fieldName = fieldNamesList[fieldIndex][0]
# print(fieldNamesList)
# print(fieldName)
# print("showRelations")
# print(tblName)
# print(fieldValue)
print(fieldNamesList)
print(fieldName)
print("showRelations")
print(tblName)
print(fieldValue)
data = dm.selectRelationsDataFromDB(tblName, fieldName, fieldValue)
#print(data)
for item in data:
@ -399,7 +400,7 @@ def showRelationsRecords(fieldIndex, fieldValue):
tblRelationsData = MyTable()
tblRelationsData.setParent(tabRelationsData)
tabRelationsData.addTab(tblRelationsData, dm.getTablesDescriptionOfName(tbl))
addDataIntoTable(tblName, tblRelationsData, qweryResult)
addDataIntoTable(tbl, tblRelationsData, qweryResult)
#