Beispiel #1
0
        public static List <PersonProductivity> GetProductivity()
        {
            var productivity = new List <PersonProductivity>();
            var months       = new List <string> {
                "JAN", "FEB", "MAR", "APR", "MAY", "JUN",
                "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"
            };

            var value = 50.0;

            for (var i = 0; i < months.Count; i++)
            {
                value += DataGenerator.GetNumber(-5, 10);
                var prod = new PersonProductivity
                {
                    Value = value,
                    Month = months[i]
                };
                productivity.Add(prod);
            }
            ;

            return(productivity);
        }
Beispiel #2
0
        public static PersonLocation GetRandom(List <PersonLocation> array)
        {
            var index = (int)Math.Round(DataGenerator.GetNumber(0, array.Count - 1));

            return(array[index]);
        }