/span> < span align = "justify">. ADOQuery1.SQL.add ('FROM hardtype INNER JOIN (roomlist INNER JOIN (Polzovateli INNER JOIN hardlist ON Polzovateli.id = hardlist.FIO) ON roomlist.id = hardlist.room) ON hardtype.id = hardlist.tupe; '); mВІ . ADOQuery1. Active: = true; mВІ . DBGrid1. DataSource: = for mВІ . DataSource1;. Hide; ВІ . Show;
end;
// вирівнювання форми по центру екрана
procedure TForm5. FormShow (Sender: TObject);: = (screen. Width-Width) div 2;: = (Screen. Height-Height) div 2;; TForm5. Button1Click (Sender: TObject); id, id2, id3: string;
// додавання записів у hardlist
if (Edit2. Text ='') or (Edit3. Text ='') then ShowMessage ('Заповніть всі поля!'); exit;
end; m² . ADOQuery1.SQL. Clear; m² . ADOQuery1.SQL. Text: = 'select * from roomlist where number =' + # 39 + ComboBox1. Items [ComboBox1. ItemIndex] + # 39; m² . ADOQuery1. Active: = true;: = For m² . ADOQuery1. Fields [0]. Value; m² . ADOQuery1. ExecSQL; m² . ADOQuery2.SQL. Text: = 'select * from hardtype where name =' + # 39 + ComboBox2. Items [ComboBox2. ItemIndex] + # 39; m² . ADOQuery2. Active: = true;: = For m² . ADOQuery2. Fields [0]. Value; m² . ADOQuery3.SQL. Text: = 'select * from Polzovateli where FIO =' + # 39 + ComboBox3. Items [ComboBox3. ItemIndex] + # 39; m² . ADOQuery3. Active: = true;: = For m² . ADOQuery3. Fields [0]. Value; m² . ADOQuery1.SQL. Clear; m² . ADOQuery1.SQL. Text: = 'insert into hardlist (tupe, serial, invent, room, FIO) values ​​(' + # 39 + id2 + # 39 + ',' + # 39 + Edit2. Text + # 39 + ',' + # 39 + Edit3. Text + # 39 + ',' + # 39 + id + # 39 + ',' + # 39 + id3 + # 39 + ');'; m² ....