public CustomerCallNotes SaveCustomerNotes(long customerId, long eventId, string notes, long createdByOrgRoleUserId, CustomerRegistrationNotesType notesType, long?reasonId = null)
        {
            var customerRegistrationNotes = new CustomerCallNotes
            {
                CustomerId           = customerId,
                EventId              = eventId > 0 ? eventId : (long?)null,
                Notes                = notes,
                NotesType            = notesType,
                ReasonId             = reasonId,
                DataRecorderMetaData = new DataRecorderMetaData
                {
                    DateCreated         = DateTime.Now,
                    DataRecorderCreator = new OrganizationRoleUser(createdByOrgRoleUserId)
                }
            };


            customerRegistrationNotes = _customerNotesRepository.Save(customerRegistrationNotes);
            return(customerRegistrationNotes);
        }
        public IEnumerable <CustomerCallNotes> GetNotes(IEnumerable <long> customerIds, CustomerRegistrationNotesType notesType)
        {
            using (var adapter = PersistenceLayer.GetDataAccessAdapter())
            {
                var linqMetaData = new LinqMetaData(adapter);

                var notes = (from n in linqMetaData.CustomerRegistrationNotes
                             where n.IsActive && n.NoteType == (int)notesType && customerIds.Contains(n.CustomerId)
                             orderby n.DateCreated descending
                             select n).ToArray();

                return(Mapper.MapMultiple(notes));
            }
        }