1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| begin
table1.insert;
table1.Edit;
Emp:=DBEdit1.text;
table1.first;
for i:=1 to table1.recordcount do
if table1.fieldValues['Matricule_Employé']=Emp then
begin
messagedlg('Ce numéro est déjà attribué,veuillez introduire un autre numéro',mtinformation,[mbok],0);
// DBEdit1.Text:='';
exit;
end;
table1.fieldbyname('Matricule_Employé').asstring:=DBEdit1.text;
table1.fieldbyname('Nom_Employé').asstring:=edit2.text;
table1.fieldbyname('Prenom_Employé').asstring:=edit3.text;
table1.fieldbyname('Adresse_Employé').asstring:=edit4.text;
table1.fieldbyname('Telephone_Employé').asstring:=(MaskEdit1.text);
table1.fieldbyname('Fonction_Employé').asstring:=edit5.text;
table1.Edit;
table1.post;
showmessage ('Opération d''Enregistrement effectuée avec succés!!'); |
Partager