public bool IsDecisionViewPackage()
        {
            IEAElement underlyingElement = EAElement.Wrap(_native.Element);
            string     value             = underlyingElement.GetTaggedValueByName(EATaggedValueKeys.DecisionViewPackage);

            return(value != null && value.Equals("true"));
        }
        public static int CompareByStateDateModified(IEAElement x, IEAElement y)
        {
            string oldestDateString = DateTime.MinValue.ToString(CultureInfo.InvariantCulture);
            string xDateString      = x.GetTaggedValueByName(EATaggedValueKeys.DecisionStateModifiedDate) ?? oldestDateString;
            string yDateString      = y.GetTaggedValueByName(EATaggedValueKeys.DecisionStateModifiedDate) ?? oldestDateString;

            DateTime xModified = Utils.TryParseDateTime(xDateString, DateTime.MinValue);
            DateTime yModified = Utils.TryParseDateTime(yDateString, DateTime.MinValue);

            return(DateTime.Compare(xModified, yModified));
        }
        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);
                }
            }
        }
Exemple #4
0
 public static bool IsHistoryDecision(IEAElement element)
 {
     return(true.ToString().Equals(element.GetTaggedValueByName(EATaggedValueKeys.IsHistoryDecision)));
 }