Changeset 7 for trunk/Forms/UItemAdd.pas
- Timestamp:
- Dec 25, 2010, 9:53:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UItemAdd.pas
r5 r7 77 77 LastTop := 8; 78 78 Column := 0; 79 ObjectInfo := MainForm.Database.Query('SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject)); 79 try 80 ObjectInfo := TDbRows.Create; 81 MainForm.Database.Query(ObjectInfo, 'SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject)); 80 82 if ObjectInfo.Count = 1 then begin 81 83 82 84 for I := Panel1.ControlCount - 1 downto 0 do 83 Panel1.Controls[I]. Destroy;85 Panel1.Controls[I].Free; 84 86 85 87 // Load column names 86 Properties := MainForm.Database.Query('SELECT * FROM `Property` WHERE `Object`=' + 88 try 89 Properties := TDbRows.Create; 90 MainForm.Database.Query(Properties, 'SELECT * FROM `Property` WHERE `Object`=' + 87 91 IntToStr(MainForm.SelectedObject)); 88 92 for I := 0 to Properties.Count - 1 do begin … … 145 149 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 146 150 end; 147 Properties.Destroy; 148 end else ShowMessage('Objekt nenalezen'); 149 ObjectInfo.Destroy; 151 152 finally 153 Properties.Free; 154 end; 155 end else ShowMessage(SObjectNotFound); 156 finally 157 ObjectInfo.Free; 158 end; 150 159 end; 151 160
Note:
See TracChangeset
for help on using the changeset viewer.