Ejemplo n.º 1
0
        /// <summary>
        /// Deletes the selected goal.
        /// </summary>
        public void DeleteGoal()
        {
            GoalViewModel selectedGoalVM = AllGoals.FirstOrDefault(g => g.IsSelected == true);

            if (selectedGoalVM != null && WPFMessageBox.Show(Properties.Resources.Delete_Confirm, Properties.Resources.Goals_Delete_Confirm, WPFMessageBoxButtons.YesNo, WPFMessageBoxImage.Question) == WPFMessageBoxResult.Yes)
            {
                _goalData.DeleteGoal(_goalData.GetGoalByGoalId(selectedGoalVM.GoalId), _projectData, _taskData);
                selectedGoalVM.Dispose();
            }
        }