Пример #1
0
 // functie ce evalueaza afisarea descrierii produselor
 public bool EvaluateProduct()
 {
     if (_product.descriere() != null)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
 public ProductLabel(int x, int y, Produs product, Control control)
 {
     _product              = product;
     _prodName             = new Label();
     _description          = new Label();
     _pret                 = new Label();
     _prodName.Location    = new System.Drawing.Point(x * 10, y * 75);
     _prodName.AutoSize    = true;
     _description.Location = new System.Drawing.Point(x * 10 + 5, y * 75 + 25);
     _description.AutoSize = true;
     _pret.Location        = new System.Drawing.Point(x * 10, y * 75 + 50);
     _pret.AutoSize        = true;
     _prodName.Text        = _product.Nume;
     _description.Text     = _product.descriere();
     _pret.Text            = _product.Pret.ToString() + " lei";
     control.Controls.Add(_prodName);
     control.Controls.Add(_description);
     control.Controls.Add(_pret);
 }