private void btnAdd_Click(object sender, RoutedEventArgs e) { InvoiceViewModel invoice = new InvoiceViewModel(); invoice.Identifier = Guid.NewGuid(); invoice.InvoiceDate = DateTime.Now; InvoiceAddEdit addEditForm = new InvoiceAddEdit(invoice, true, false); addEditForm.InvoiceCreatedUpdated += new InvoiceHandler(SyncData); FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_fakturama")), 95, addEditForm); }
private void btnEdit_Click(object sender, RoutedEventArgs e) { if (CurrentInvoice == null) { MainWindow.WarningMessage = ((string)Application.Current.FindResource("Morate_odabrati_fakturu_za_izmenuUzvičnik")); return; } InvoiceAddEdit addEditForm = new InvoiceAddEdit(CurrentInvoice, false); addEditForm.InvoiceCreatedUpdated += new InvoiceHandler(SyncData); FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_fakturama")), 95, addEditForm); }