السلام عليكم
PHP كود :
procedure TAccueil.sButton2Click(Sender: TObject);
var DB1, DB2: Variant;
begin
if Table6N_Facture.IsNull then begin
DB1 := DBLookupCombobox3.KeyValue;
DB2 := DBLookupCombobox4.KeyValue;
DbLookupCombobox1.ReadOnly := False;
DbLookupCombobox2.ReadOnly := False;
DbLookupCombobox3.ReadOnly := False;
DbLookupCombobox4.ReadOnly := False;
DateTimePicker1.DateTime := now;
sButton2.Enabled := False; // Nouveau Produit
sButton3.Enabled := true; // Ajouter
sButton4.Enabled := False; // Imprimer
sButton5.Enabled := False; // Suprimer
sButton6.Enabled := False; // Modifier
sButton7.Enabled := False; // Valider
sButton8.Enabled := true; // Anuler
// FactureEtStatistique1.Enabled := false; // Fiche facture et Statistique
Vente1.Enabled := false; // Fiche Vente
if (Vente.Showing=True) or (Facture_Statistique.Showing=True) then
begin Vente.Close; Facture_Statistique.Close; end;
Table2.first;
table2.Insert;
DBLookupCombobox3.KeyValue := DB1;
DBLookupCombobox4.KeyValue := DB2;
end else
showmessage('Priciser une Facture ou bien Nouveau Facture D''abord');
end;

