示例#1
0
        private void GetNoteType()
        {
            string noteTypeName = GetAttributeValue("NoteType");

            var service = new NoteTypeService();

            noteType = service.Get(contextEntity.TypeId, noteTypeName);

            // If a note type with the specified name does not exist for the context entity type, create one
            if (noteType == null)
            {
                noteType              = new NoteType();
                noteType.IsSystem     = false;
                noteType.EntityTypeId = contextEntity.TypeId;
                noteType.EntityTypeQualifierColumn = string.Empty;
                noteType.EntityTypeQualifierValue  = string.Empty;
                noteType.Name = noteTypeName;
                service.Add(noteType, CurrentPersonId);
                service.Save(noteType, CurrentPersonId);
            }
        }
示例#2
0
        private void GetNoteType()
        {
            string noteTypeName = GetAttributeValue( "NoteType" );

            var service = new NoteTypeService();
            noteType = service.Get( contextEntity.TypeId, noteTypeName );

            // If a note type with the specified name does not exist for the context entity type, create one
            if ( noteType == null )
            {
                noteType = new NoteType();
                noteType.IsSystem = false;
                noteType.EntityTypeId = contextEntity.TypeId;
                noteType.EntityTypeQualifierColumn = string.Empty;
                noteType.EntityTypeQualifierValue = string.Empty;
                noteType.Name = noteTypeName;
                service.Add( noteType, CurrentPersonId );
                service.Save( noteType, CurrentPersonId );
            }
        }