private void Agregar(object sender, RoutedEventArgs ev) { try { wndAddConsole newConsole = new wndAddConsole(); newConsole.consoleAdmin = admin; newConsole.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Console", MessageBoxButton.OK, MessageBoxImage.Information); } }
private void Edit(object sender, RoutedEventArgs ev) { try { wndAddConsole newConsole = new wndAddConsole(); console selectedConsole = (console)dgConsoles.SelectedItem; newConsole.Console = admin.GetConsole(selectedConsole.ID); newConsole.consoleAdmin = admin; newConsole.isEdit = true; newConsole.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Console", MessageBoxButton.OK, MessageBoxImage.Information); } }