Exemple #1
0
 public InfoProduct(Produit p)
 {
     InitializeComponent();
     Name_Pro.Text   = p.getName();
     Marque_Pro.Text = p.getMarque();
     ID_Pro.Text     = Convert.ToString(p.getId());
     Prix_Pro.Text   = Convert.ToString(p.getPrix());
     Quantite.Text   = Convert.ToString(p.getQua());
     Last_Date.Text  = Convert.ToString(p.getNext_date());
 }
Exemple #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (TextPrix.BackColor != Color.Red)
     {
         Stock.x[pro.getId() - 1].changePrix(Convert.ToDouble(TextPrix.Text));
     }
     else
     {
         MessageBox.Show("no Price changed !");
     }
 }
Exemple #3
0
 public changePri(Produit p)
 {
     InitializeComponent();
     Name_Pro.Text   = p.getName();
     Marque_Pro.Text = p.getMarque();
     ID_Pro.Text     = Convert.ToString(p.getId());
     Prix_Pro.Text   = Convert.ToString(p.getPrix());
     //   Quantite.Text = Convert.ToString(p.getQua());
     // Last_Date.Text = Convert.ToString(p.getNext_date());
     pro = p;
 }
        public static void remove(Produit pro)
        {
            int    id = pro.getId();
            string s  = getPro(id - 1);

            x.Remove(pro);
            l.removeItems(s);
            sss.chargerItems(s);
            num--;
            for (int i = id - 1; i < x.Count; i++)
            {
                x[i].decalID();
            }
            //  s.chargerItems();
            // l.iniItems();
        }
        public static void Addchr(Produit pro)
        {
            int i = pro.getId() - 1;

            x[i] = pro;
        }