Ejemplo n.º 1
0
        private void btnEditDatabase_Click(object sender, RoutedEventArgs e)
        {
            DatabaseConfigPopup popup = new DatabaseConfigPopup();

            popup.DataContext = new DatabasePopupViewModel()
            {
                CurrentDatabase = vm.SelectedDatabase
            };
            popup.ShowDialog();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
        }