예제 #1
0
    } // CreateRisk

    public Risk UpdateRisk(Guid guid, Risk update) {
      Risk risk = Risk(guid);
      if (risk == null)
        return null;

      risk.CopyFrom(update);
      Commit(risk);
      currentRisks_ = null;
      return risk;
    } // UpdateRisk
예제 #2
0
    } // UpdateRisk

    public Risk DeleteRisk(Guid guid) {
      Risk risk = Risk(guid);
      if (risk == null)
        return null;

      risk.Deleted = true;
      Commit(risk);
      currentRisks_ = null;
      return risk;
    } // DeleteRisk
예제 #3
0
    } // Risk

    public Risk CreateRisk(Risk newRisk) {
      Risk r = new Risk();
      r.Id = Guid.NewGuid();
      r.Deleted = false;
      r.CopyFrom(newRisk);
      r.OwningOrganisation = orgId_;

      context.Risks.Add(r);
      Commit();
      currentRisks_ = null;
      return r;
    } // CreateRisk
예제 #4
0
 public void CopyFrom(Risk other) {
   Title = other.Title;
   Score = other.Score;
   Theme = other.Theme;
   Category = other.Category;
   Guidance = other.Guidance;
   Grouping = other.Grouping;
   NIHCEG = other.NIHCEG;
   IOST = other.IOST;
   HCP = other.HCP;
   SJOF = other.SJOF;
   ASCOF = other.ASCOF;
   OwningOrganisation = other.OwningOrganisation;
 } // CopyFrom