示例#1
0
        private void priceTab_Enter(object sender, EventArgs e)
        {
            promoComboBox.Items.Clear();
            productComboBox.Items.Clear();

            promoComboBox.Items.AddRange(PromoPresenter.GetPromotions().ToArray());
            productComboBox.Items.AddRange(ProductPresenter.GetProducts().ToArray());
        }
示例#2
0
 public PriceModel(Ceny price)
 {
     Id            = price.Id;
     RealPrice     = price.Cena;
     Discount      = price.Rabat;
     DiscountPrice = Discount == null ?
                     RealPrice : RealPrice * (1 - (decimal)Discount / 100);
     Promotion = price.CennikId == null ?
                 null : PromoPresenter.GetPromotionById(price.CennikId);
     Product = price.TowarId == null ?
               null : ProductPresenter.GetProductById(price.TowarId);
 }
示例#3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var prodTabView   = new ProductTabUC();
            var prodPresenter = new ProductPresenter(prodTabView);

            var promoTabView   = new PromoTabUC();
            var promoPresenter = new PromoPresenter(promoTabView);

            var priceTabView   = new PriceTabUC();
            var pricePresenter = new PricePresenter(priceTabView);

            Application.Run(new MainForm(prodTabView, promoTabView, priceTabView));
        }
示例#4
0
 private void UpdatePromoDataGridView()
 {
     promoDataGridView.DataSource = PromoPresenter.GetPromotions();
 }