Changeset 21 for trunk/Forms/UMainForm.pas
- Timestamp:
- Jun 16, 2011, 10:32:01 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UMainForm.pas
r20 r21 445 445 446 446 ObjectGroupId := AddObject('Object groups', 'ObjectGroup', Core.System.Database.Database, GroupId); 447 AddPropertyString(ObjectGroupId, 'Name', 'Name'); 448 ObjectGroupParentId := AddPropertyRelationOne(ObjectGroupId, 'Parent', 'Parent', ObjectGroupId); 447 AddPropertyNumber(ObjectGroupId, 'Id', 'Id', False); 448 AddPropertyString(ObjectGroupId, 'Name', 'Name', True); 449 ObjectGroupParentId := AddPropertyRelationOne(ObjectGroupId, 'Parent', 'Parent', True, ObjectGroupId); 449 450 450 451 ObjectId := AddObject('Objects', 'Object', Core.System.Database.Database, GroupId); 451 AddPropertyString(ObjectId, 'Name', 'Name'); 452 ObjectIdGroupId := AddPropertyRelationOne(ObjectId, 'Group', 'Group', ObjectGroupId); 453 AddPropertyString(ObjectId, 'Schema', 'Schema'); 454 AddPropertyString(ObjectId, 'Table', 'Table'); 455 AddPropertyString(ObjectId, 'Primary key', 'PrimaryKey'); 456 AddPropertyNumber(ObjectId, 'Sequence', 'Sequence'); 452 AddPropertyNumber(ObjectId, 'Id', 'Id', False); 453 AddPropertyString(ObjectId, 'Name', 'Name', True); 454 ObjectIdGroupId := AddPropertyRelationOne(ObjectId, 'Group', 'Group', True, ObjectGroupId); 455 AddPropertyString(ObjectId, 'Schema', 'Schema', True); 456 AddPropertyString(ObjectId, 'Table', 'Table', True); 457 AddPropertyString(ObjectId, 'Primary key', 'PrimaryKey', True); 458 AddPropertyNumber(ObjectId, 'Sequence', 'Sequence', True); 457 459 458 460 PropertyTypeId := AddObject('Property types', 'Type', Core.System.Database.Database, GroupId); 459 AddPropertyString(PropertyTypeId, 'Name', 'Name'); 460 AddPropertyString(PropertyTypeId, 'Type', 'DbType'); 461 AddPropertyNumber(PropertyTypeId, 'Id', 'Id', False); 462 AddPropertyString(PropertyTypeId, 'Name', 'Name', True); 463 AddPropertyString(PropertyTypeId, 'Type', 'DbType', True); 461 464 //AddPropertyNumber(ObjectId, 'Parent', 'Parent'); 462 465 463 466 CustomTypeId := AddObject('Custom types', 'TypeCustom', Core.System.Database.Database, GroupId); 464 CustomTypeIdType := AddPropertyRelationOne(CustomTypeId, 'Type', 'Type', PropertyTypeId); 467 AddPropertyNumber(CustomTypeId, 'Id', 'Id', False); 468 CustomTypeIdType := AddPropertyRelationOne(CustomTypeId, 'Type', 'Type', True, PropertyTypeId); 465 469 466 470 ObjectPropertyGroupId := AddObject('Property groups', 'PropertyGroup', Core.System.Database.Database, GroupId); 471 AddPropertyNumber(ObjectPropertyGroupId, 'Id', 'Id', False); 467 472 468 473 ObjectPropertyId := AddObject('Properties', 'Property', Core.System.Database.Database, GroupId); 469 AddPropertyString(ObjectPropertyId, 'Name', 'Name'); 470 PropertyParentId := AddPropertyRelationOne(ObjectPropertyId, 'Object', 'Object', ObjectId); 471 ObjectPropertyIdGroup := AddPropertyRelationOne(ObjectPropertyId, 'Property group', 'PropertyGroup', ObjectPropertyGroupId); 472 AddPropertyNumber(ObjectPropertyId, 'Custom type', 'CustomType'); 473 AddProperty(ObjectPropertyId, 'Editable', 'Editable', TypeBoolean); 474 AddPropertyString(ObjectPropertyId, 'Column name', 'ColumnName'); 475 476 AddPropertyRelationMany(ObjectGroupId, 'Childs', 'Childs', PropertyParentId); 477 AddPropertyRelationMany(ObjectGroupId, 'Objects', 'Objects', ObjectIdGroupId); 478 AddPropertyRelationMany(ObjectId, 'Properties', 'Properties', PropertyParentId); 479 AddPropertyRelationMany(ObjectPropertyGroupId, 'Properties', 'Properties', ObjectPropertyIdGroup); 480 AddPropertyRelationMany(PropertyTypeId, 'Custom types', 'CustomTypes', CustomTypeIdType); 474 AddPropertyNumber(ObjectPropertyId, 'Id', 'Id', False); 475 AddPropertyString(ObjectPropertyId, 'Name', 'Name', True); 476 PropertyParentId := AddPropertyRelationOne(ObjectPropertyId, 'Object', 'Object', True, ObjectId); 477 ObjectPropertyIdGroup := AddPropertyRelationOne(ObjectPropertyId, 'Property group', 'PropertyGroup', True, ObjectPropertyGroupId); 478 AddPropertyNumber(ObjectPropertyId, 'Custom type', 'CustomType', True); 479 AddProperty(ObjectPropertyId, 'Editable', 'Editable', TypeBoolean, True); 480 AddPropertyString(ObjectPropertyId, 'Column name', 'ColumnName', True); 481 482 AddPropertyRelationMany(ObjectGroupId, 'Childs', 'Childs', True, PropertyParentId); 483 AddPropertyRelationMany(ObjectGroupId, 'Objects', 'Objects', True, ObjectIdGroupId); 484 AddPropertyRelationMany(ObjectId, 'Properties', 'Properties', True, PropertyParentId); 485 AddPropertyRelationMany(ObjectPropertyGroupId, 'Properties', 'Properties', True, ObjectPropertyIdGroup); 486 AddPropertyRelationMany(PropertyTypeId, 'Custom types', 'CustomTypes', True, CustomTypeIdType); 481 487 end; 482 488 end; … … 739 745 Report.Load(SelectedObject); 740 746 741 Columns.Clear; 742 for I := 0 to Report.Columns.Count - 1 do 743 if not TReportColumn(Report.Columns[I]).VirtualItem then begin 744 NewColumn := Columns.Add; 745 NewColumn.Caption := TReportColumn(Report.Columns[I]).Caption; 746 end; 747 Report.FillListColumns(Columns); 747 748 Items.Count := Report.Count; 748 749 Refresh;
Note:
See TracChangeset
for help on using the changeset viewer.