1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
begin
query1.Active:=false;
query1.SQL.Clear;
if (edit1.Text<> '') then begin
query1.SQL.Add(' select nom,fonction,structure from employes where matricule='''+edit1.Text+''' '); // pour récupérer des infos sur ce matricule
query1.Open;
groupbox1.Visible:=true;
edit16.Text:=query1.FieldValues['nom'];
edit17.Text:=query1.FieldValues['structure'];
edit18.Text:=query1.FieldValues['fonction'];
query1.Active:=false;
query1.SQL.Clear;
dbgrid1.DataSource.DataSet:=query1;
query1.SQL.Add(' select * from mouvement where code='''+edit1.Text+''' and (type_mouv='''+edit2.Text +' '+ radiobutton1.Caption+''' or type_mouv='''+edit2.Text +' '+ radiobutton2.Caption+''') ');// pour avoir tout les conges de cet employe
query1.Open;
dbgrid1.Visible:=true;
dbnavigator1.Visible:=true;
query1.First;
while not query1.eof do
begin
query1.Next;
end; |
Partager