Ejemplo n.º 1
0
        /// <summary>
        /// Gives the physical description comment stored for the customer
        /// </summary>
        /// <returns></returns>
        public CustomerNotesVO getPhysicalDescNote()
        {
            CustomerNotesVO physicalNote = (from note in this.notes
                                            where note.Code == CustomerNoteTypes.PHYSICALDESCNOTES
                                            select note).FirstOrDefault();

            return(physicalNote);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Add the notes to the customer
 /// </summary>
 /// <param name="vo"></param>
 public void addNotes(CustomerNotesVO vo)
 {
     if (this.notes.Contains(vo))
     {
         return;
     }
     this.notes.Add(vo);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Gives the latest comment entered for the customer
        /// </summary>
        /// <returns></returns>
        public CustomerNotesVO getLatestNote()
        {
            CustomerNotesVO custNotes = (from note in this.notes
                                         where note.Code != CustomerNoteTypes.PHYSICALDESCNOTES
                                         orderby note.UpdatedDate descending
                                         select note).FirstOrDefault();

            return(custNotes);
        }
Ejemplo n.º 4
0
        private void removePhysicalNote()
        {
            CustomerNotesVO custNote = this.getPhysicalDescNote();

            if (custNote.ContactNote != null)
            {
                int physicalNoteIdx = this.notes.IndexOf(custNote);
                this.notes.RemoveAt(physicalNoteIdx);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Deletes the physical description note and creates a new one since there can only be one
        /// physical description comment for a customer
        /// </summary>
        /// <param name="comment"></param>
        /// <param name="store"></param>
        /// <param name="noteDate"></param>
        /// <param name="userId"></param>
        /// <param name="contactProdNoteId"> </param>
        public void updatePhysicalDescNote(string comment, string store, DateTime noteDate, string userId, string contactProdNoteId)
        {
            removePhysicalNote();
            var physicalNote = new CustomerNotesVO
            {
                ContactNote           = comment,
                CustomerProductNoteId = contactProdNoteId,
                StoreNumber           = store,
                CreationDate          = noteDate,
                CreatedBy             = userId,
                Code        = CustomerNoteTypes.PHYSICALDESCNOTES,
                UpdatedDate = noteDate
            };

            this.addNotes(physicalNote);
        }