Esempio n. 1
0
 public static RiskMapData create(
     string name,
     IList<Risk> risks,
     Guid? ownerOrg) {
   string riskIds = String.Join("|", risks.Select(r => r.Id.ToString()));
   var riskMap = new RiskMapData();
   riskMap.Id = Guid.NewGuid();
   riskMap.Name = name;
   riskMap.OwningOrganisation = ownerOrg;
   riskMap.RiskIds = riskIds;
   return riskMap;
 } // create
Esempio n. 2
0
    } // riskMapData

    public RiskMap CreateRiskMap(RiskMapUpdate riskMap) {
      var newRiskMap = new RiskMapData();
      newRiskMap.Id = Guid.NewGuid();
      newRiskMap.Name = riskMap.Name;
      newRiskMap.OwningOrganisation = orgId_;
      newRiskMap.RiskIds = riskMap.RiskIds;

      context.RiskMaps.Add(newRiskMap);
      Commit();

      riskMaps_ = null;
      return RiskMap(newRiskMap.Id);
    } // CreateRiskMap