public ActionManagementViewModel(IDialogManager dialogManager, IAssessmentViewModelFactory assessmentViewModelFactory, IDangerRepository repository, ICompanyContext companyContext)
 {
     m_Repository     = repository;
     m_CompanyContext = companyContext;
     m_VMFactory      = new ViewModelFactory();
     m_Status         = Enum.GetValues(typeof(Status));
     m_CompanyContext.CompanyChanged += (s, e) => UpdateSelectedCompanyViewModel();
     SelectedCompanyViewModel         = m_CompanyContext.companyViewModel;
     m_AssessmentViewModelFactory     = assessmentViewModelFactory;
     vmFactory        = new ViewModelFactory();
     m_SelectedAction = new Action()
     {
         DueDate = DateTime.Now
     };
     Dialogs = dialogManager;
 }
 public void AddActionToThreat()
 {
     if (m_SelectedThreat == null)
     {
         Dialogs.ShowMessageBox("Bitte wählen Sie eine Gefährdung aus.", "Fehler");
     }
     else
     {
         m_SelectedThreat.Actions.Add(m_SelectedAction);
         m_SelectedAction = new Action()
         {
             DueDate = DateTime.Now
         };
         NotifyOfPropertyChange(() => ActionsFromThreat);
         NotifyOfPropertyChange(() => Person);
         NotifyOfPropertyChange(() => Action);
         NotifyOfPropertyChange(() => Execution);
         NotifyOfPropertyChange(() => DueDate);
     }
 }
Beispiel #3
0
 public ActionViewModel(Action model)
 {
     m_Model = model;
 }