示例#1
0
        public static string ConvertDisplayCostToOMS(string activityID, string criteria)
        {
            string simulationID     = GetSimulationIDFromActivityID(activityID);
            string assetName        = SelectScenario.GetAssetType(simulationID);
            string displayAttribute = SimulationComponents.FindAttribute(criteria, 0);

            if (displayAttribute != null)
            {
                List <AttributeStore> attributes = OMS.GetAssetAttributes(assetName);
                AttributeStore        attribute  = attributes.Find(delegate(AttributeStore a) { return(a.OmsHierarchy == displayAttribute); });
                criteria = criteria.Replace("[" + displayAttribute + "]", "[" + attribute.OmsObjectUserIDHierarchy + "]");
            }
            return(criteria);
        }
示例#2
0
        public static bool UpdateActivityConditionIndex(string activityID, string conditionIndex, string property, string value)
        {
            string simulationID = GetSimulationIDFromActivityID(activityID);
            string assetType    = SelectScenario.GetAssetType(simulationID);
            bool   isSuccessful = true;

            if (property == "Impact")
            {
                UpdateImpact(assetType, activityID, conditionIndex, value);
            }
            //WE NEED TO HAVE INTERFACE RETURN ENTIRE CRITERIA.
            //else if (property == "MinimumIndex")
            //{
            //    string existingCriteria = SelectScenario.GetActivityFeasibility(activityID);
            //}
            //else if (property == "MaximumIndex")
            //{

            //}
            return(isSuccessful);
        }