예제 #1
0
 private void ShowDetail(RiskViewModel risk)
 {
     riskDetail.Show(risk.Risk);
 }
예제 #2
0
        private void AddRisk()
        {
            Risk newRisk = new Risk();
            newRisk.RiskUId = Guid.NewGuid().ToString();
            newRisk.ProjectUId = project.ProjectUId;
            newRisk.CreateDate = DateTime.Now;
            newRisk.UpdatedAt = DateTime.Now;
            newRisk.IsPrivate = false;
            newRisk.RiskDescription = NewRiskDescription;
            newRisk.Impact = (short)RiskImpacts.LOW_IMPACT_RISK;
            newRisk.Probability = (short)RiskProbabilities.LOW_PROBABILITY_RISK;

            executor.StartBackgroundTask(
                () => { projectsService.AddRisk(newRisk.ProjectUId, newRisk);  },
                () => {
                    risks.Add(newRisk);
                    RiskViewModel riskVM = new RiskViewModel(executor, projectsService, newRisk);
                    FilteredRisks.Add(riskVM);
                    riskVM.NotifyAdded();
                    NewRiskDescription = null;
                });
        }