Пример #1
0
 private void refreshTaskData()
 {
     tasks.UnionWith(taskDTO.getAllTasks(lastId.ToString()));
     foreach (TaskNote task in tasks)
     {
         if (String.IsNullOrEmpty(task.document))
         {
             task.document = NoteDTOImplementation.getInstance().getNoteDocument(task.noteId).getDocumentContent();
         }
         if (int.Parse(task.id) > lastId)
         {
             lastId = int.Parse(task.id);
         }
     }
     ++lastId;
     taskData.DataSource = tasks.ToList();
 }
Пример #2
0
 private void refreshData()
 {
     priorityCount = new int[4];
     statusCount   = new int[4];
     monuthCount   = new int[13];
     tasks.UnionWith(taskDTO.getAllTasks(lastTaskId.ToString()));
     foreach (TaskNote task in tasks)
     {
         ++statusCount[(int)task.status];
         ++priorityCount[(int)task.priority];
         ++monuthCount[task.dueDate.Month];
         if (int.Parse(task.id) > lastTaskId)
         {
             lastTaskId = int.Parse(task.id);
         }
     }
 }