Beispiel #1
0
        private void btnEditStreet_Click(object sender, RoutedEventArgs e)
        {
            StreetsView      view   = new StreetsView();
            StreetsViewModel street = (StreetsViewModel)((Button)sender).DataContext;

            street.OperationType = OperationType.Update;
            view.DataContext     = street;
            view.ShowDialog();
        }
Beispiel #2
0
        private void btnAddStreet_Click(object sender, RoutedEventArgs e)
        {
            StreetsView      view   = new StreetsView();
            StreetsViewModel street = new StreetsViewModel();

            street.Cities        = (CitiesViewModel)DataContext;
            street.OperationType = OperationType.Insert;
            view.DataContext     = street;
            view.ShowDialog();
        }