Example #1
0
        ///<Summary>Returns an ordered list for just one chart view</Summary>
        public static List <DisplayField> GetForChartView(long ChartViewNum)
        {
            //No need to check RemotingRole; no call to db.
            List <DisplayField> retVal = new List <DisplayField>();

            for (int i = 0; i < DisplayFieldC.Listt.Count; i++)
            {
                if (DisplayFieldC.Listt[i].ChartViewNum == ChartViewNum && DisplayFieldC.Listt[i].Category == DisplayFieldCategory.None)
                {
                    retVal.Add(DisplayFieldC.Listt[i].Copy());
                }
            }
            if (retVal.Count == 0)           //default
            {
                return(DisplayFields.GetDefaultList(DisplayFieldCategory.None));
            }
            return(retVal);
        }
Example #2
0
        ///<Summary>Returns an ordered list for just one category.  These are display fields that the user has entered, which are stored in the db, and then are pulled into the cache.</Summary>
        public static List <DisplayField> GetForCategory(DisplayFieldCategory category)
        {
            //No need to check RemotingRole; no call to db.
            List <DisplayField> retVal = new List <DisplayField>();

            for (int i = 0; i < DisplayFieldC.Listt.Count; i++)
            {
                if (DisplayFieldC.Listt[i].Category == category)
                {
                    retVal.Add(DisplayFieldC.Listt[i].Copy());
                }
            }
            if (retVal.Count == 0)           //default
            {
                return(DisplayFields.GetDefaultList(category));
            }
            return(retVal);
        }