Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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