public static void SetPeriodTime(DateTime date, Period period, string time) { var day = GetDayObject(date); if (day.Periods[(int)period] == null) { day.Periods[(int)period] = new Day.PeriodInfo(); } day.Periods[(int)period].Time = time; FoodJournalNoSQL.StartSaveDay(date, period); }
public static List <RecentItem> GetRecentCache(Period period) { if (recentCache == null) { recentCache = new List <RecentItem> [PeriodCount + 1]; foreach (Period p in PeriodList.All) { recentCache[(int)p] = new List <RecentItem>(); } FoodJournalNoSQL.LoadRecent(); } return(recentCache[(int)period]); }