Exemplo n.º 1
0
        private void BtnAdd_Click(object sender, RoutedEventArgs e)
        {
            DiscountViewModel Discount = new DiscountViewModel();

            Discount.Identifier = Guid.NewGuid();

            Discount_AddEdit addEditForm = new Discount_AddEdit(Discount, true);

            addEditForm.DiscountCreatedUpdated += new DiscountHandler(SyncData);
            FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_popustu")), 95, addEditForm);
        }
Exemplo n.º 2
0
        private void BtnEdit_Click(object sender, RoutedEventArgs e)
        {
            if (CurrentDiscount == null)
            {
                MainWindow.WarningMessage = ((string)Application.Current.FindResource("Morate_odabrati_popust_za_izmenuUzvičnik"));
                return;
            }

            Discount_AddEdit addEditForm = new Discount_AddEdit(CurrentDiscount, false);

            addEditForm.DiscountCreatedUpdated += new DiscountHandler(SyncData);
            FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_popustu")), 95, addEditForm);
        }