private void ButtonAgregar_Click(object sender, RoutedEventArgs e) { this.Close(); var _window = new TrainerImput(null); _window.Show(); }
private void Button_Modificar(object sender, RoutedEventArgs e) { TrainerModel _trainer = DataGridTrainer.SelectedItem as TrainerModel; if (_trainer != null) { int?id = _trainer.Id; this.Close(); var _window = new TrainerImput(id); _window.Show(); } else { GRDialogInformation _msg = new GRDialogInformation(); _msg.Message = "Debe Seleccionar un Registro"; _msg.ShowDialog(); } }