public static string ExtractAlarmConfirmStatusCategoryFromDynamicDataItem(DynamicDataItem dataItem) { int?id; if (!dataItem.TryGetPropertyValue("AlarmConfirmStatusCategory_ID", out id) || !id.HasValue) { return(null); } Dict_Alarms_ConfirmStatus dacs; if (EnumClientServiceDictionary.DictConfirmStatuses != null && EnumClientServiceDictionary.DictConfirmStatuses.TryGetValue(id.Value, out dacs) && dacs != null) { return(dacs.AlarmConfirmStatusCategoryName); } return(null); }
public static IFreeHierarchyObject ExtractParentObjectFromDynamicDataItem(DynamicDataItem dataItem) { string un; if (!dataItem.TryGetPropertyValue("ParentId", out un)) { return(null); } byte b; if (!dataItem.TryGetPropertyValue("ParentTypeHierarchy", out b)) { return(null); } var typeHierarchy = (enumTypeHierarchy)b; return(HierarchyObjectHelper.ToHierarchyObject(un, (enumTypeHierarchy)typeHierarchy)); }