Rewriting "Add records" dialog. Added relations records view.
This commit is contained in:
parent
a0cf5e5d10
commit
0c5a9641e9
4
dm.py
4
dm.py
|
@ -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
13
gui.py
|
@ -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)
|
||||
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user