public void SaveRatings(IEnumerable <Rating> data)
        {
            IEARepository repository = EAMain.Repository;

            foreach (Rating rating in data)
            {
                IEAElement decision = repository.GetElementByGUID(rating.DecisionGUID);
                if (decision == null)
                {
                    continue;
                }
                string forcesTaggedValue = Rating.ConstructForcesTaggedValue(rating.ForceGUID, rating.ConcernGUID);
                if (decision.GetTaggedValueByName(forcesTaggedValue) != null)
                {
                    decision.UpdateTaggedValue(forcesTaggedValue, rating.Value);
                }
                else
                {
                    decision.AddTaggedValue(forcesTaggedValue, rating.Value);
                }
            }
        }
        public bool SaveChanges()
        {
            IEARepository repository = EAMain.Repository;

            //should not happen, need to know where the evaluation result should be saved.
            if (null == _decisionGUID)
            {
                throw new Exception();
            }

            //detect if it is a new rating entry
            if ("".Equals(TaggedValueGUID))
            {
                IEAElement element = repository.GetElementByGUID(_decisionGUID);
                element.AddTaggedValue(SerializeName(), Result);
            }
            else
            {
                //only update
                IEAElement element = repository.GetElementByGUID(_decisionGUID);
                return(element.UpdateTaggedValue(TaggedValueGUID, SerializeName(), Result));
            }
            return(true);
        }
        public bool SaveChanges()
        {
            IEARepository repository = EAMain.Repository;

            //should not happen, need to know where the History Entry should be saved.
            if (null == Decision)
            {
                throw new Exception();
            }

            //detect if it is a new history entry
            if ("".Equals(TaggedValueGUID))
            {
                IEAElement element = repository.GetElementByGUID(Decision.GUID);
                element.AddTaggedValue(EATaggedValueKeys.DecisionStateChange, Serialize());
            }
            else
            {
                //only update
                IEAElement element = repository.GetElementByGUID(Decision.GUID);
                return(element.UpdateTaggedValue(TaggedValueGUID, EATaggedValueKeys.DecisionStateChange, Serialize()));
            }
            return(true);
        }