0% found this document useful (0 votes)
37 views

Tugas Delphi

This document contains code for procedures used to search, filter, and exit from a database table in Delphi. It includes procedures for searching by code or brand, applying a price range filter, canceling the filter, and closing the form. The code uses functions like FindKey, SetRange, ApplyRange, CancelRange, and Refresh to interact with and filter the Table1 database table.

Uploaded by

Irwan Aminata
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Tugas Delphi

This document contains code for procedures used to search, filter, and exit from a database table in Delphi. It includes procedures for searching by code or brand, applying a price range filter, canceling the filter, and closing the form. The code uses functions like FindKey, SetRange, ApplyRange, CancelRange, and Refresh to interact with and filter the Table1 database table.

Uploaded by

Irwan Aminata
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Nama : Muhamad Muhsiy Danial

Nim : 12093761
Kelas : 12.4F.02 Lab F

procedure TForm1.bkodeClick(Sender: TObject);


begin
if (ekode.Text ='') then
exit;
Table1.IndexName :='';
if not table1.FindKey ([ekode.Text]) then
application.MessageBox ('data tidak ditemukan ',' Informasi',MB_OK or
MB_ICONINFORMATION);
end;

procedure TForm1.bmerkClick(Sender: TObject);


begin
if (emerk.Text ='') then
exit;
Table1.IndexName :='merek';
if not table1.FindKey ([emerk.Text]) then
application.MessageBox ('data tidak ditemukan ',' Informasi',MB_OK or
MB_ICONINFORMATION);
end;

procedure TForm1.bapplyClick(Sender: TObject);


begin
table1.IndexName:='idxhrg';
table1.SetRange([strtofloat(emulai.Text)],[strtofloat(eakhir.Text)]);
Table1.ApplyRange ;
end;

procedure TForm1.bcancleClick(Sender: TObject);


begin
Table1.CancelRange ;
Table1.Refresh ;
emulai.Text:='';
eakhir.Text:='';
end;

procedure TForm1.bkeluarClick(Sender: TObject);


begin
close;
end;

end.

You might also like