主题:如何将两个事件写到EDIT.TEXT 回车事件中
procedure tlskklr.Edit4KeyPress(Sender: TObject; var Key: Char);
begin
with link.jkdc do
begin
close;
sql.clear;
sql.add('select * from sljbzlb where zlsjbkpe like ''%' + Edit4.Text + '%'' and zlsjzt=3');
open;
end;
end;
procedure tlskklr.DBGridEh1CellClick(Column: TColumnEh);
begin
edit1.Text := link.jkdc.Fields[0].asstring;
Edit2.Text := link.jkdc.Fields[1].asstring;
Edit4.Text := link.jkdc.Fields[27].asstring;
Edit7.Text :='';
Edit8.Text :='';
Edit7.Text :='';
Edit12.Text :='';
Edit7.SetFocus;
end;
注将下边这个程序放在上面的事件中
begin
with link.jkdc do
begin
close;
sql.clear;
sql.add('select * from sljbzlb where zlsjbkpe like ''%' + Edit4.Text + '%'' and zlsjzt=3');
open;
end;
end;
procedure tlskklr.DBGridEh1CellClick(Column: TColumnEh);
begin
edit1.Text := link.jkdc.Fields[0].asstring;
Edit2.Text := link.jkdc.Fields[1].asstring;
Edit4.Text := link.jkdc.Fields[27].asstring;
Edit7.Text :='';
Edit8.Text :='';
Edit7.Text :='';
Edit12.Text :='';
Edit7.SetFocus;
end;
注将下边这个程序放在上面的事件中