Esempio n. 1
0
        public void ShowTimelineForCurrentWeek(DateTime date, params string[] tags)
        {
            DateTime start = date.AddDays((int)DayOfWeek.Sunday - (int)date.DayOfWeek);
            DateTime end   = date.AddDays((int)DayOfWeek.Saturday - (int)date.DayOfWeek);

            List <Timeline> timelines = TimelineService.GetTimelines(this.UserId, start, end, tags.ToList()).OrderBy(timeline => timeline.TimeStamp).ToList();

            SendTimelinesWeek(timelines);
        }
Esempio n. 2
0
        public void ShowTimelineForCurrentWeek()
        {
            DateTime currentDate = DateTime.Now;

            DateTime start = currentDate.AddDays((int)DayOfWeek.Sunday - (int)currentDate.DayOfWeek);
            DateTime end   = currentDate.AddDays((int)DayOfWeek.Saturday - (int)currentDate.DayOfWeek);


            List <Timeline> timelines = TimelineService.GetTimelines(this.UserId, start, end).OrderBy(timeline => timeline.TimeStamp).ToList();

            SendTimelinesWeek(timelines);
        }
Esempio n. 3
0
 public void ExportSince(DateTime date)
 {
     try
     {
         var timelines = TimelineService.GetTimelines(this.UserId, date, DateTime.Now);
         this.ExportTimelines(this.UserName, timelines, string.Format("ExportSince{0}.csv", date.ToString("MM-dd-yy")));
         SendUpdate("Sent, should be in your inbox soon!");
     }
     catch (Exception ex)
     {
         SendUpdate("Sorry, I was unable to send the email.");
         WriteLog(ex, "EmailError");
     }
 }
Esempio n. 4
0
 public void Export(DateTime start, DateTime end)
 {
     try
     {
         var timelines = TimelineService.GetTimelines(this.UserId, start, end);
         this.ExportTimelines(this.UserName, timelines, string.Format("ExportFrom{0}To{1}.csv", start.ToString("MM-dd-yy"), end.ToString("MM-dd-yy")));
         SendUpdate("Sent, should be in your inbox soon!");
     }
     catch (Exception ex)
     {
         SendUpdate("Sorry, I was unable to send the email.");
         WriteLog(ex, "EmailError");
     }
 }
Esempio n. 5
0
 public void ExportAll()
 {
     try
     {
         var timelines = TimelineService.GetTimelines(this.UserId);
         this.ExportTimelines(this.UserName, timelines, "AllTimelines.csv");
         SendUpdate("Sent, should be in your inbox soon!");
     }
     catch (Exception ex)
     {
         SendUpdate("Sorry, I was unable to send the email.");
         WriteLog(ex, "EmailError");
     }
 }
Esempio n. 6
0
        public void Export(DateTime date)
        {
            try
            {
                DateTime start = date.AddDays((int)DayOfWeek.Sunday - (int)date.DayOfWeek);
                DateTime end   = date.AddDays((int)DayOfWeek.Saturday - (int)date.DayOfWeek);

                List <Timeline> timelines = TimelineService.GetTimelines(this.UserId, start, end).OrderBy(timeline => timeline.TimeStamp).ToList();
                this.ExportTimelines(this.UserName, timelines, string.Format("ExportWeek{0}.csv", date.ToString("MM-dd-yy")));
                SendUpdate("Sent, should be in your inbox soon!");
            }
            catch (Exception ex)
            {
                SendUpdate("Sorry, I was unable to send the email.");
                WriteLog(ex, "EmailError");
            }
        }
Esempio n. 7
0
        public void ShowTimelines(DateTime start, DateTime end, params string[] tags)
        {
            List <Timeline> timelines = TimelineService.GetTimelines(this.UserId, start, end, tags.ToList()).OrderBy(timeline => timeline.TimeStamp).ToList();

            SendTimelinesLong(timelines);
        }