Ejemplo n.º 1
0
        private void TS_Btn_Pr_Click(object sender, EventArgs e)
        {
            FListe_Prod fc = new FListe_Prod();

            fc.MdiParent = this;
            fc.Show();
        }
Ejemplo n.º 2
0
 private void Nouv_Lig_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(Txt_NumCde.Text))
     {
         Commande cmd = CommandeADO.Recherche_Commande_Num_Cde(int.Parse(Txt_NumCde.Text));
         if (cmd != null)
         {
             if (!string.IsNullOrEmpty(Txt_Qte.Text))
             {
                 FListe_Prod fc = new FListe_Prod();
                 fc.ShowDialog();
                 if (FListe_Prod.produit != null)
                 {
                     prSelected = FListe_Prod.produit;
                     if (prSelected != null)
                     {
                         LigneCommande lc = new LigneCommande
                         {
                             NumCde  = cmd.Num_Cde,
                             RefProd = prSelected.Ref_Prod,
                             Qte     = int.Parse(Txt_Qte.Text)
                         };
                         LigneCommandeADO.Inserer(lc);
                         Affiche_Ligne_Commande();
                         Vider_Clt_Click(sender, e);
                         Vider_Cde_Click(sender, e);
                         lcSelected  = null;
                         prSelected  = null;
                         cmdSelected = null;
                         clSelected  = null;
                         MessageBox.Show("Ligne Commande inserer");
                     }
                     else
                     {
                         MessageBox.Show("Sélectionner un produit");
                     }
                 }
                 else
                 {
                     MessageBox.Show("Sélectionner un produit");
                 }
             }
             else
             {
                 MessageBox.Show("Inserer une qunatité");
             }
         }
         else
         {
             MessageBox.Show("Inserer une commande");
         }
     }
     else
     {
         MessageBox.Show("Inserer une commande");
     }
 }
Ejemplo n.º 3
0
 private void Nouv_lig_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(Qte.Text))
     {
         MessageBox.Show("qte empty");
     }
     else
     {
         FListe_Prod f = new FListe_Prod();
         f.ShowDialog();
         Dg_Prod.Rows.Add(f.p.Ref_Prod, f.p.Desig_Prod, f.p.PrixV_Prod, Qte.Text, f.p.PrixV_Prod * Convert.ToInt32(Qte.Text));
         LigneCommande lc = new LigneCommande(Convert.ToInt32(Txt_NumCde.Text), Convert.ToInt32(f.p.Ref_Prod), Convert.ToInt32(Qte.Text));
         list_commande.Add(lc);
         totalCde         += f.p.PrixV_Prod * Convert.ToInt32(Qte.Text);
         Txt_TotalCde.Text = totalCde.ToString();
     }
 }
Ejemplo n.º 4
0
 public FProduit(FListe_Prod form)
 {
     InitializeComponent();
     this.form = form;
 }
Ejemplo n.º 5
0
        private void TS_Btn_Pr_Click(object sender, EventArgs e)
        {
            FListe_Prod f = new FListe_Prod();

            f.ShowDialog();
        }