예제 #1
0
        public DocumentViewModel(COBieLiteUK.Document document)
        {
            _document = document;
            DocumentName = _document.Name;
            DocumentDescription = _document.Description;

            if (_document.Attributes == null) 
                return;
            var attCode = _document.Attributes.FirstOrDefault(att => att.Name == "DocumentCode");
            if (attCode != null)
            {
                var asString = attCode.Value as StringAttributeValue;
                if (asString != null)
                    DocumentCode = asString.Value;
            }
        }
예제 #2
0
        public DocumentViewModel(COBieLiteUK.Document document)
        {
            _document           = document;
            DocumentName        = _document.Name;
            DocumentDescription = _document.Description;

            if (_document.Attributes == null)
            {
                return;
            }
            var attCode = _document.Attributes.FirstOrDefault(att => att.Name == "DocumentCode");

            if (attCode != null)
            {
                var asString = attCode.Value as StringAttributeValue;
                if (asString != null)
                {
                    DocumentCode = asString.Value;
                }
            }
        }