Exemplo n.º 1
0
        private void btn_addPrice_Click(object sender, EventArgs e)
        {
            ClsPrice newPrice = new ClsPrice();

            if (AddPrice(newPrice))
            {
                _product.Prices.Add(newPrice.UID, newPrice);
                UpdateDisplay();
            }
        }
Exemplo n.º 2
0
 private bool AddPrice(ClsPrice price)
 {
     if (SaveDetails() && ValidateTxtBoxLength(txt_priceType, 2, "Price Type"))
     {
         price.priceType = txt_priceType.Text;
     }
     else
     {
         return(false);
     }
     if (!Double.TryParse(txt_priceAmount.Text, out price.priceAmount))
     {
         return(false);
     }
     return(true);
 }