예제 #1
0
        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)
            {
            }
        }
예제 #2
0
        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());

            }
        }