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
|
i = i + 1
|
||||||
tbl_descr_list.append(one_Table_descr)
|
tbl_descr_list.append(one_Table_descr)
|
||||||
tbl_struct_list.append(one_Table_struct)
|
tbl_struct_list.append(one_Table_struct)
|
||||||
#print(qwery_create)
|
print(qwery_create)
|
||||||
#c.execute(qwery_create)
|
c.execute(qwery_create)
|
||||||
return tbl_names_list
|
return tbl_names_list
|
||||||
|
|
||||||
def initDBstructure():
|
def initDBstructure():
|
||||||
|
|
13
gui.py
13
gui.py
|
@ -382,13 +382,14 @@ def showRelationsRecords(fieldIndex, fieldValue):
|
||||||
for i in tblList:
|
for i in tblList:
|
||||||
if i[1] == tblDescr:
|
if i[1] == tblDescr:
|
||||||
tblName = i[0]
|
tblName = i[0]
|
||||||
|
|
||||||
fieldNamesList = dm.getTableStructure(tblName)
|
fieldNamesList = dm.getTableStructure(tblName)
|
||||||
fieldName = fieldNamesList[fieldIndex][0]
|
fieldName = fieldNamesList[fieldIndex][0]
|
||||||
# print(fieldNamesList)
|
print(fieldNamesList)
|
||||||
# print(fieldName)
|
print(fieldName)
|
||||||
# print("showRelations")
|
print("showRelations")
|
||||||
# print(tblName)
|
print(tblName)
|
||||||
# print(fieldValue)
|
print(fieldValue)
|
||||||
data = dm.selectRelationsDataFromDB(tblName, fieldName, fieldValue)
|
data = dm.selectRelationsDataFromDB(tblName, fieldName, fieldValue)
|
||||||
#print(data)
|
#print(data)
|
||||||
for item in data:
|
for item in data:
|
||||||
|
@ -399,7 +400,7 @@ def showRelationsRecords(fieldIndex, fieldValue):
|
||||||
tblRelationsData = MyTable()
|
tblRelationsData = MyTable()
|
||||||
tblRelationsData.setParent(tabRelationsData)
|
tblRelationsData.setParent(tabRelationsData)
|
||||||
tabRelationsData.addTab(tblRelationsData, dm.getTablesDescriptionOfName(tbl))
|
tabRelationsData.addTab(tblRelationsData, dm.getTablesDescriptionOfName(tbl))
|
||||||
addDataIntoTable(tblName, tblRelationsData, qweryResult)
|
addDataIntoTable(tbl, tblRelationsData, qweryResult)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue
Block a user