예제 #1
0
        private void ReadAllPomodoros()
        {
            this.allRegisteredPomodoros.Clear();
            var todaysPomodoros = this.databaseConnection.ExecuteReader("select * from PomodoroRegistrations");

            foreach (DataRow r in todaysPomodoros.Rows)
            {
                var p = new PomodoroRegistration()
                {
                    Start    = Convert.ToDateTime(r["TimeStamp"]),
                    Duration = TimeSpan.FromTicks(Convert.ToInt64(r["Duration"])),
                    Rating   = Convert.ToInt32(r["Evaluation"]),
                };

                this.allRegisteredPomodoros.Add(p);
            }
        }
        private void ReadAllPomodoros()
        {
            this.allRegisteredPomodoros.Clear();
            var todaysPomodoros = this.databaseConnection.ExecuteReader("select * from PomodoroRegistrations");
            foreach (DataRow r in todaysPomodoros.Rows)
            {
                var p = new PomodoroRegistration()
                {
                    Start = Convert.ToDateTime(r["TimeStamp"]),
                    Duration = TimeSpan.FromTicks(Convert.ToInt64(r["Duration"])),
                    Rating = Convert.ToInt32(r["Evaluation"]),
                };

                this.allRegisteredPomodoros.Add(p);
            }
        }