Esempio n. 1
0
        internal List <notes> GetNotes()
        {
            // Note - at one point, notes were linked to calls and not claims
            // There might be some old architecture to reflect this
            // Aaron J December 2010
            List <notes> toReturn   = new List <notes>();
            List <call>  claimCalls = GetPastCalls(false);

            foreach (call call in claimCalls)
            {
                List <notes> callNotes = call.GetNotes();
                foreach (notes note in callNotes)
                {
                    if (note.claim_id == 0)
                    {
                        toReturn.Add(note);
                    }
                }
            }

            DataTable linkedNotes = Search("SELECT * FROM notes WHERE claim_id = " + id
                                           + " ORDER BY created_on asc");

            foreach (DataRow aNote in linkedNotes.Rows)
            {
                notes n = new notes();
                n.Load(aNote);
                toReturn.Insert(0, n);
            }

            return(toReturn);
        }
        /// <summary>
        /// Returns a list of all questions that were answered on this call (use only on calls that have been saved)
        /// </summary>
        public List <notes> GetNotes()
        {
            List <notes> toReturn    = new List <notes>();
            DataTable    linkedNotes = Search("SELECT * FROM notes WHERE call_id = " + id
                                              + " ORDER BY created_on desc");

            foreach (DataRow aNote in linkedNotes.Rows)
            {
                notes n = new notes();
                n.Load(aNote);
                toReturn.Add(n);
            }

            // toReturn.Sort();

            return(toReturn);
        }