public static IEAVolatileDiagram Wrap(EventProperties info) { var volatileDiagram = new EAVolatileDiagram(); dynamic diagramID = EAUtilities.ParseToInt32(info.Get(EAEventPropertyKeys.DiagramId).Value, -1); if (diagramID > 0) { volatileDiagram.DiagramID = diagramID; } return(volatileDiagram); }
public IEADiagram[] GetDiagrams() { string sql = @"Select t_diagramobjects.Diagram_ID FROM t_diagramobjects WHERE t_diagramobjects.Object_ID = " + ID + ";"; IEARepository repository = EARepository.Instance; var document = new XmlDocument(); document.LoadXml(repository.Query(sql)); XmlNodeList diagramIDs = document.GetElementsByTagName(@"Diagram_ID"); return((from XmlNode diagramId in diagramIDs select EAUtilities.ParseToInt32(diagramId.InnerText, -1) into id where id > 0 select repository.GetDiagramByID(id)).ToArray()); }