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)); }
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); }
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(); }
private static bool FilterByActor(TimeEntryViewModel item, string arg) { return(!string.IsNullOrWhiteSpace(arg) ? item.Model.Actor.Token.Equals(arg, StringComparison.OrdinalIgnoreCase) : true); }
private static bool FilterByNone(TimeEntryViewModel item, string arg) { return(item != null); }
private static bool FilterSystem(TimeEntryViewModel item, string arg) { return(true); }
private static bool FilterByProject(TimeEntryViewModel item, string arg) { return(false); }