예제 #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");
            }
        }
예제 #2
0
        public override void Execute()
        {
            var repository = new MilestoneRepository();
            var milestones = repository.GetMilestonesForComingDays(_amtDays);

            foreach (var ms in milestones)
            {
                var builder = new StringBuilder();
                var deliverables = repository.GetConfiguredDeliverables(ms);
                foreach (var del in deliverables)
                {
                    builder.Append(string.Format("* {0}", del.Title));
                    builder.Append("\n");
                }

                builder.Append("\n\n");

                var item = new CueItem(ms.Release.Title + " - " + ms.Title, ms.Date, ms.Time, builder.ToString());
                _creator.CreateVisualCue(item);
                // add notification to history table
                repository.AddNotificationToHistory(ms.Id, ms.Release.Id, "AwesomeNote");
            }
        }
예제 #3
0
 public void UploadCueItem(CueItem item, string location)
 {
     var itm = AwesomeNoteItem.Create(item.Title, item.Date, item.Time, item.Content, location);
     _evernoteMailer.CreateEvernoteItem(itm.Title, itm.Content, itm.Notebook);
 }
예제 #4
0
 /// <summary>
 /// creates visual cue in Awesomenote "Work" notebook
 /// </summary>
 /// <param name="str"></param>
 /// <returns></returns>
 public static void CreateVisualCue(this RCueItemUploader creator, CueItem itemToCue)
 {
     creator.UploadCueItem(itemToCue, "Work");
 }
 /// <summary>
 /// creates visual cue in Awesomenote "Work" notebook
 /// </summary>
 /// <param name="str"></param>
 /// <returns></returns>
 public static void CreateVisualCue(this RVisualCueCreator creator, CueItem cue)
 {
     creator.UploadItem(cue.Title, cue.Date, cue.Time, cue.Content, "Work");
 }