private void btnEditDatabase_Click(object sender, RoutedEventArgs e) { DatabaseConfigPopup popup = new DatabaseConfigPopup(); popup.DataContext = new DatabasePopupViewModel() { CurrentDatabase = vm.SelectedDatabase }; popup.ShowDialog(); }
private void btnEdit_Click(object sender, RoutedEventArgs e) { DatabaseConfigPopup popup = new DatabaseConfigPopup(); popup.DataContext = new DatabasePopupViewModel() { CurrentDatabase = (Model.DatabasesRow)((System.Data.DataRowView)DatabaseGrid.SelectedValue).Row }; popup.ShowDialog(); }
private void btnAddNewDatabase_Click(object sender, RoutedEventArgs e) { DatabaseConfigPopup popup = new DatabaseConfigPopup(); Model.DatabasesRow NewRow = vm.ActiveModel.Databases.NewDatabasesRow(); NewRow.Name = "New Database"; vm.ActiveModel.Databases.AddDatabasesRow(NewRow); popup.DataContext = new DatabasePopupViewModel() { CurrentDatabase = NewRow, }; popup.ShowDialog(); }