Exemplo n.º 1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            ShipmentViewModel Shipment = new ShipmentViewModel();

            Shipment.Identifier   = Guid.NewGuid();
            Shipment.ShipmentDate = DateTime.Now;

            Shipment_AddEdit addEditForm = new Shipment_AddEdit(Shipment, true, false);

            addEditForm.ShipmentCreatedUpdated += new ShipmentHandler(SyncData);
            FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Pošiljke")), 95, addEditForm);
        }
Exemplo n.º 2
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            if (CurrentShipment == null)
            {
                MainWindow.WarningMessage = ((string)Application.Current.FindResource("Morate_odabrati_posiljku_za_izmenuUzvičnik"));
                return;
            }

            Shipment_AddEdit ShipmentAddEditForm = new Shipment_AddEdit(CurrentShipment, false);

            ShipmentAddEditForm.ShipmentCreatedUpdated += new ShipmentHandler(SyncData);
            FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Pošiljke")), 95, ShipmentAddEditForm);
        }