Exemplo n.º 1
0
        // method to get person list
        public void GetPersons()
        {
            // creates connection object to connect to database
            var db = new DB();

            // start with a fresh list
            myPersons.Clear();

            // adds persons from database to list
            try
            {
                foreach (var person in db.GetPersonsFromDB())
                {
                    myPersons.Add(person);
                    // sets counter variable that will decrease for each day
                    person.CountDownTick = person.Counter;
                }
            }
            catch (System.Exception)
            {
                throw;
            }
        }