private void MoveFromSlot(Employee employee, string attachmentId) { var slot = employee.AttachmentsBySlot.Where(x => x.SlotId == SlotId && x.Attachment != null && x.Attachment.Id == attachmentId).First(); var note = new NoteWithAttachment() { Note = DownNoteText, Attachment = slot.Attachment, RealDate = slot.Date, RegisterDate = slot.Date }; if (employee.Notes == null) { employee.Notes = new List<NoteWithAttachment>(); } employee.Notes.Add(note); employee.AttachmentsBySlot.Remove(slot); }
public void AddNote(NoteWithAttachment note) { this.Notes.Add(note); }
public void AddNote(NoteWithAttachment note) { this.Notes.Add(note); }