private void FillAllTasksTable() { var service = new Service1Client(); var listOfTasks = new List<TaskDTO>(); try { listOfTasks = service.GetAllTasks().OrderBy(m => m.IsDone).ThenBy(m => m.Date).ToList(); AllTasks.DataSource = listOfTasks; AllTasks.DataBind(); } catch (Exception) { } }
private void FillComboAllTasks() { var service = new Service1Client(); var listOfAllTasksNotDone = new List<TaskDTO>(); try { listOfAllTasksNotDone = service.GetAllTasks().Where(p => p.IsDone == false).ToList(); } catch (Exception) { } for (int i = 0; i < listOfAllTasksNotDone.Count; i++) { DropDownList1.Items.Add(listOfAllTasksNotDone[i].TaskID.ToString()); } }