Ejemplo n.º 1
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            OutputInvoiceAddEdit addEditForm = new OutputInvoiceAddEdit(CurrentOutputInvoice);

            addEditForm.OutputInvoiceCreatedUpdated += new OutputInvoiceHandler((OutputInvoiceViewModel) => {
                Thread displayThread       = new Thread(() => PopulateData());
                displayThread.IsBackground = true;
                displayThread.Start();
            });
            FlyoutHelper.OpenFlyout(this, "Podaci o izlaznim računima", 70, addEditForm);
        }
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            OutputInvoiceViewModel outputInvoice = new OutputInvoiceViewModel();

            outputInvoice.Identifier  = Guid.NewGuid();
            outputInvoice.InvoiceDate = DateTime.Now;

            OutputInvoiceAddEdit addEditForm = new OutputInvoiceAddEdit(outputInvoice, true, false);

            addEditForm.OutputInvoiceCreatedUpdated += new OutputInvoiceHandler(SyncData);
            FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_izlaznim_fakturama")), 95, addEditForm);
        }
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            if (CurrentOutputInvoice == null)
            {
                MainWindow.WarningMessage = ((string)Application.Current.FindResource("Morate_odabrati_fakturu_za_izmenuUzvičnik"));
                return;
            }

            OutputInvoiceAddEdit addEditForm = new OutputInvoiceAddEdit(CurrentOutputInvoice, false);

            addEditForm.OutputInvoiceCreatedUpdated += new OutputInvoiceHandler(SyncData);
            FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_izlaznim_fakturama")), 95, addEditForm);
        }