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