Exemplo n.º 1
0
        public override void Execute()
        {
            var repository = new ResourceRepository();
            var absences = repository.GetAbsencesForComingDays(_amtDays);

            foreach (var a in absences)
            {
                var builder = new StringBuilder();

                builder.Append(string.Format("{0}: {1}", a.Person.DisplayName, a.Period.ToString()));
                builder.Append("\n");

                var item = new CueItem("Absent: " + a.Person.DisplayName, a.StartDate, "9:00", builder.ToString());
                _creator.CreateVisualCue(item);
                // add notification to history table
                repository.AddNotificationToHistory(a.Id, "AwesomeNote");
            }
        }