Ejemplo n.º 1
0
 private void ClearEventArrays()
 {
     Monday.Clear();
     Tuesday.Clear();
     Wednesday.Clear();
     Thursday.Clear();
     Friday.Clear();
     Saturday.Clear();
     Sunday.Clear();
 }
Ejemplo n.º 2
0
 private void ClearLists()
 {
     Monday.Clear();
     Tuesday.Clear();
     Wednesday.Clear();
     Thursday.Clear();
     Friday.Clear();
     Saturday.Clear();
     Sunday.Clear();
 }
Ejemplo n.º 3
0
        private void FetchTasks()
        {
            Monday.Clear();
            Tuesday.Clear();
            Wednesday.Clear();
            Thursday.Clear();
            Friday.Clear();
            Saturday.Clear();
            Sunday.Clear();
            List <DailyTask> Models = db.DailyTasks
                                      .Where(p => p.UserId == User.Id)
                                      .ToList <DailyTask>();

            foreach (var m in Models)
            {
                if (m.Date.HasValue)
                {
                    Debug.WriteLine("Has value!");
                    if (m.Date.Value.Date == (WeekDates[0].Date))
                    {
                        Monday.Add(m);
                    }
                    else if (m.Date.Value.Date == (WeekDates[1].Date))
                    {
                        Tuesday.Add(m);
                    }
                    else if (m.Date.Value.Date == (WeekDates[2].Date))
                    {
                        Wednesday.Add(m);
                    }
                    else if (m.Date.Value.Date == (WeekDates[3].Date))
                    {
                        Thursday.Add(m);
                    }
                    else if (m.Date.Value.Date == (WeekDates[4].Date))
                    {
                        Friday.Add(m);
                    }
                    else if (m.Date.Value.Date == (WeekDates[5].Date))
                    {
                        Saturday.Add(m);
                    }
                    else if (m.Date.Value.Date == (WeekDates[6].Date))
                    {
                        Sunday.Add(m);
                    }
                }
            }
        }