/// <summary> /// Posts the note with the specified post-time. /// </summary> /// <param name="postTime"></param> /// <param name="staffRecipients"></param> /// <param name="groupRecipients"></param> private void Post(DateTime postTime, IEnumerable <Staff> staffRecipients, IEnumerable <StaffGroup> groupRecipients) { // create postings for any recipients foreach (var recipient in staffRecipients) { NotePosting posting = new StaffNotePosting(postTime, this, false, null, recipient); _postings.Add(posting); } foreach (var recipient in groupRecipients) { NotePosting posting = new GroupNotePosting(postTime, this, false, null, recipient); _postings.Add(posting); } if (_postings.Count > 0) { _hasPostings = true; } // give subclass a chance to do some processing BeforePost(); // set the post time _postTime = postTime; }
/// <summary> /// Posts the note with the specified post-time. /// </summary> /// <param name="postTime"></param> /// <param name="staffRecipients"></param> /// <param name="groupRecipients"></param> private void Post(DateTime postTime, IEnumerable<Staff> staffRecipients, IEnumerable<StaffGroup> groupRecipients) { // create postings for any recipients foreach (var recipient in staffRecipients) { NotePosting posting = new StaffNotePosting(postTime, this, false, null, recipient); _postings.Add(posting); } foreach (var recipient in groupRecipients) { NotePosting posting = new GroupNotePosting(postTime, this, false, null, recipient); _postings.Add(posting); } if (_postings.Count > 0) _hasPostings = true; // give subclass a chance to do some processing BeforePost(); // set the post time _postTime = postTime; }