Пример #1
0
        private void LoadCommentAllocations(XmlNode inputNode)
        {
            Note note = null;

            var commentId = inputNode.GetXmlNodeValue("@A");

            if (!string.IsNullOrEmpty(commentId))
            {
                note = LoadCodedComment(inputNode, commentId);
            }
            else
            {
                note = new Note {
                    Description = inputNode.GetXmlNodeValue("@C")
                }
            };

            if (note == null)
            {
                return;
            }

            var noteTimeStamp = AllocationTimestampLoader.Load(inputNode);

            note.TimeStamps.Add(noteTimeStamp);
            if (noteTimeStamp != null && noteTimeStamp.Location1 != null)
            {
                note.SpatialContext = noteTimeStamp.Location1.Position;
            }

            _allocations.Add(note);
        }
Пример #2
0
        private GuidanceAllocation LoadGuidanceAllocations(XmlNode inputNode)
        {
            var groupId = inputNode.GetXmlNodeValue("@A");

            if (string.IsNullOrEmpty(groupId))
            {
                return(null);
            }

            var group = FindGuidanceGroup(groupId);
            var gsts  = inputNode.SelectNodes("GST");

            var allocation = new GuidanceAllocation
            {
                GuidanceGroupId = group.Group.Id.ReferenceId,
                GuidanceShift   = GuidanceShiftLoader.Load(gsts, _taskDocument),
                TimeScopes      = new List <TimeScope> {
                    AllocationTimestampLoader.Load(inputNode) ?? AllocationTimestampLoader.Load(inputNode)
                }
            };

            return(allocation);
        }