Esempio n. 1
0
        public void OnSaveProduct(object sender, EventArgs args)
        {
            int        index     = 0;
            DateTime   date      = DateEntry.Date;
            double     price     = double.Parse(PriceEntry.Text);
            DatedPrice datePrice = new DatedPrice(date, price);
            Product    product   = new Product();

            if (selected != null)
            {
                product = selected;
                index   = products.IndexOf(product);
                products.Remove(product);
            }
            product.DisplayName = NameEntry.Text;
            product.Prices.Add(datePrice);

            products.Insert(index, product);

            ResetForm();
        }
Esempio n. 2
0
 public Price()
 {
     this.costPerClickBidPriceField = new OverrideCurrencyAmount();
     this.rental_9Field             = new PriceRental_9();
     this.rental_8Field             = new PriceRental_8();
     this.rental_7Field             = new PriceRental_7();
     this.rental_6Field             = new PriceRental_6();
     this.rental_5Field             = new PriceRental_5();
     this.rental_4Field             = new PriceRental_4();
     this.rental_3Field             = new PriceRental_3();
     this.rental_2Field             = new PriceRental_2();
     this.rental_1Field             = new PriceRental_1();
     this.rental_0Field             = new PriceRental_0();
     this.previousField             = new DatedPrice();
     this.compareAtField            = new DatedCompareAtPrice();
     this.saleField                      = new PriceSale();
     this.depositAmountField             = new CurrencyAmountWithDefault();
     this.mAPField                       = new OverrideCurrencyAmount();
     this.maximumSellerAllowedPriceField = new StringOverrideCurrencyAmount();
     this.minimumSellerAllowedPriceField = new StringOverrideCurrencyAmount();
     this.quantityPriceField             = new PriceQuantityPrice();
     this.standardPriceField             = new OverrideCurrencyAmount();
 }