Aider moi pour faire un logiciel de gestion de stock

domi_66 Messages postés 23 Date d'inscription lundi 10 octobre 2005 Statut Membre Dernière intervention 1 juin 2007 - 31 mai 2007 à 19:36
 ali08833 - 3 oct. 2012 à 17:05
Bonjour,
je débute avec le logiciel delphi donc un peu d'indulgence.
<?xml:namespace prefix o ns "urn:schemas-microsoft-com:office:office" /??>

Mon projet est de faire un pt prog sur la gestion d'un stock mais très simple et spécifique.
explication:Je veux 4 'MaskEdit' ( Description, Référence, Quantité, Produit. ) Jusqu’ici tout va bien. Et je sais même stocker ces infos dans une base.  <?xml:namespace prefix v ns "urn:schemas-microsoft-com:vml" /??><v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype>Enfin je crois.

exemple, j'ai 3 articles:
article1 :
Description => resistance
Référence   => 10k
Quantité     => 100
Produit       => toto
article2 :
Description => condansateur
Référence   = > 22µ
Quantité     => 50
Produit       => toto
article3 :
Description => resistance
Référence   => 2.2
Quantité     => 200
Produit       => mickey

Premièrement :
Je veux que,  si je rajoute un article qui est déjà dans la liste, il faut que la Qté s'ajoute, au lier que cela me crée un 4eme article. Et cela je ne c'est pas comment faire.<v:shapetype id ="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype>
Deuxièment:
Si je fais 5 produits toto, je veux que la Qté de article1 et la Qté de article2 diminue de 5.

Merci de m'aider et avant de me répondre penser que je débute.

3 réponses

Progilic Messages postés 3 Date d'inscription mardi 22 janvier 2008 Statut Membre Dernière intervention 18 septembre 2009 1
27 avril 2008 à 20:13
Salut Domi 66, a mon avis c'est la methode d'un  programmeur.


mais, je t'aide


crée la table produit qui contienne,


Ref            N       *


desig         A   70


Qte           N


l'etoile c'est l'index d'une table il est important


bon, apré ça  sur le bouton ( Ajouter ) ecrit ce code


if table1.FindKey([EDIT1.TEXT]) then


  begin


         Table1.Edit;


        Table1.field[].AsInteger:=Table1.field[].AsInteger+StrToInt(EDIT3.TEXT);
      Table1.poste;


 end
else
    begin
            Table1.Insert;
            Table1.Field[0].AsString:=Edit1.Text;
            Table1.Field[1].AsString:=Edit1.Text;
            Table1.Field[2].AsString:=Edit1.Text;
            Table1.Post;
   end;
DataSource1.DataSet.Refresh;
----------------------------------------------------------------------
En Fin le programme et termine Bon courage Baby
1