public CommunicationItemNoteViewModel Note2NoteCommunicationViewModel(Note note)
        {
            CommunicationItemNoteViewModel retVal = new CommunicationItemNoteViewModel
            {
                AuthorName   = note.AuthorName,
                Body         = note.Body,
                Title        = note.Title,
                Id           = note.NoteId,
                ModifierName = note.ModifierName,
                LastModified = note.LastModified
            };

            return(retVal);
        }
        public Note NoteCommunicationViewModel2Note(CommunicationItemNoteViewModel viewModel)
        {
            Note retVal = new Note
            {
                AuthorName = viewModel.AuthorName,
                Body       = viewModel.Body,
                Title      = viewModel.Title,
            };

            if (viewModel.Id != null)
            {
                retVal.NoteId = viewModel.Id;
            }

            return(retVal);
        }
Ejemplo n.º 3
0
        public static MockCommunicationItemNoteBuilder Build()
        {
            CommunicationItemNoteViewModel communocationItem = new CommunicationItemNoteViewModel();

            return(new MockCommunicationItemNoteBuilder(communocationItem));
        }