Esempio n. 1
0
        private static bool FilterByDay(TimeEntryViewModel item, string arg)
        {
            DateTime target;

            if (!string.IsNullOrWhiteSpace(arg) && DateTime.TryParse(arg, out target))
            {
            }
            else
            {
                target = DateTime.Now.Date;
            }
            return(item.Model.Started.Date.Equals(target));
        }
Esempio n. 2
0
        private static bool FilterByWeek(TimeEntryViewModel item, string arg)
        {
            DateTime target;

            if (!string.IsNullOrWhiteSpace(arg) && DateTime.TryParse(arg, out target))
            {
            }
            else
            {
                target = DateTime.Now.Date;
            }
            return(true);
        }
Esempio n. 3
0
        private void AddItem()
        {
            TimeEntry item = new TimeEntry().Default(Start);

            item.Task = new TagIdentifier()
            {
                Display = SelectedTask.Display,
                Id      = SelectedTask.Model.Id,
                Token   = SelectedTask.Status.Display
            };
            item.Activity = new TagIdentifier()
            {
                Display = SelectedActivity.Display,
                Id      = SelectedActivity.Id,
                Token   = SelectedActivity.Token
            };
            item.Minutes = Minutes;
            item.Comment = Comment;
            TimeEntryViewModel vm = new TimeEntryViewModel(item);

            TimeEntries.Add(vm);
            RefreshItem();
            Message = item.ToDisplay();
        }
Esempio n. 4
0
 private static bool FilterByActor(TimeEntryViewModel item, string arg)
 {
     return(!string.IsNullOrWhiteSpace(arg) ? item.Model.Actor.Token.Equals(arg, StringComparison.OrdinalIgnoreCase) : true);
 }
Esempio n. 5
0
 private static bool FilterByNone(TimeEntryViewModel item, string arg)
 {
     return(item != null);
 }
Esempio n. 6
0
 private static bool FilterSystem(TimeEntryViewModel item, string arg)
 {
     return(true);
 }
Esempio n. 7
0
 private static bool FilterByProject(TimeEntryViewModel item, string arg)
 {
     return(false);
 }