procedure TIAIS.Button1Click(Sender: TObject);
var
s,s1,s2,kosul,tarih1,tarih2,kosulall,kosula,top:string;
tarihilk,tarihson:TdateTime;
say,say2:integer;
begin
s := edit1.Text;
s1 := combobox1.Text;
s2 := combobox2.Text;
say:= combobox1.itemindex;
say2:= combobox2.itemindex;
top:='A';
if s='' then
begin
showmessage('Arama Kriterini Girmeyi Unuttunuz!');
end;
if say=0 then
begin
tarihilk:=DateTimePicker1.date;
tarihson:=datetimepicker2.date;
tarih1:=datetostr(tarihilk);
tarih2:=datetostr(tarihson);
kosul:=('Where (lruadi like "'+s+'") and (compno like "'+combobox2.text+'%")and (geltar between "'+tarih1+'" and "'+tarih2+'" )');{edit2 yerine combobox}
kosula:=('Where (lruadi like "'+s+'") and (geltar between "'+tarih1+'" and "'+tarih2+'" ) and NOT (COMPNO LIKE "'+TOP+'%")');{ikinci arama butonu iptali için}
kosulall:=('Where (lruadi like "'+s+'") and (geltar between "'+tarih1+'" and "'+tarih2+'" )');{combobox2 all ise işleyecek}
if say2=0 then
begin
kosul:=kosulall;
end;
if say2=4 then
begin
kosul:=kosula;
end;
//kosul:=('Where (lruadi like "'+Edit1.text+'") and (compno like "'+Edit2.text+'%")and (geltar between "'+tarih1+'" and "'+tarih2+'" )');{tarih arama için}
//kosul:=('Where (lruadi like "'+Edit1.text+'") and (compno like "'+Edit2.text+'%")');{YUKARIDAKİ SATIRI YAPMAK İÇİN YEDEKLEDİM}
Query1.Close;
Query1.Sql.Clear;
Query1.Sql.Add('Select * From lru2223.DBF');
Query1.Sql.Add(kosul);
//Query1.Sql.Add('Where (lruadi like "'+Edit1.text+'") AND (compno ='A148')');
//Query1.Sql.Add('Select * From lru2223.DBF Where compno like "'+Edit1.text+'%"');
Query1.Open;
begin
Query2.Close;
Query2.Sql.Clear;
Query2.Sql.Add('Select COUNT (COMPNO) as sonuc From lru2223.DBF');
Query2.Sql.Add(kosul);
//Query2.Sql.Add('Select COUNT (COMPNO) as sonuc From lru2223.DBF Where lruadi like "'+Edit1.text+'"');
Query2.Open;
end;
end;
if s1 <>'LRU ADI' then
begin
showmessage('Demo Version Works For Only "LRU ADI" CopyRight © 2003 by Mibis');
end;
//ikinci sütun için buraya kopyala
end;
procedure TIAIS.FormCreate(Sender: TObject);
begin
label1.caption:=('Toplam');
label2.caption:=('Adet Kayıt Bulunmuştur.');
//BorderIcons := BorderIcons - [biMaximize];
//edit2.text:='';
edit1.text:='MLPRF';
Edit1.CharCase := ecUpperCase;
combobox1.itemindex:=0;
combobox2.itemindex:=0;
end;