Exemplo n.º 1
0
        private void GetSavedActivities()
        {
            var currentEntries = SelectedUserProject.GetTimeEntries(Period);

            foreach (var entry in currentEntries)
            {
                var day = Days.FirstOrDefault(d => entry.SpentOn != null && d.Day.Date == entry.SpentOn.Value.Date);
                day?.TimeEntries.Add(new RedmineTimeEntry(TimeEntryOrigin.RedmineService)
                {
                    TimeEntryInfo = entry
                });
            }
            RefreshPeriodTotalHours();
        }
Exemplo n.º 2
0
        private async void SaveEntries()
        {
            var entries =
                Days.SelectMany(d => d.TimeEntries)
                .Where(t => t.Origin == TimeEntryOrigin.NewInLogger || t.Origin == TimeEntryOrigin.Outlook)
                .ToArray();

            SavingProgress = 0;
            for (var i = 0; i < entries.Length; i++)
            {
                await SelectedUserProject.LogTime(entries[i]);

                SavingProgress = i * 100 / entries.Length;
            }
            SavingProgress = 0;
            InitializeDays();
        }