public void refreshTaskList() { if (cboRole.SelectedIndex == -1) { lstAllTask.IsEnabled = false; return; } //Example of All Task created for the event //Throw in All Task Here List<Task> IndividualTask = new List<Task>(); TasksHelper client = new TasksHelper(); List<Task> AllTask = client.GetTasksByEvent(user.UserID, event_.EventID).ToList<Task>(); lstAllTask.IsEnabled = true; IndividualTask = client.GetTaskByRole(event_.EventID, int.Parse(cboRole.SelectedValue.ToString())).ToList<Task>(); client.Close(); lstAllTask.ItemsSource = clsTaskAllocate.GetTaskNotAssigned(AllTask, IndividualTask); lstAssignedTask.ItemsSource = clsTaskAllocate.GetTaskAssigned(IndividualTask, int.Parse(cboRole.SelectedValue.ToString())); }
private void loadTasks() { TasksHelper client = new TasksHelper(); List<Task> TaskList= client.GetTasksByEvent(user.UserID, event_.EventID).ToList<Task>(); client.Close(); if (TaskList.Count > 0) { lblNoTask.Visibility = Visibility.Collapsed; lstTasks.Visibility = Visibility.Visible; lstTasks.ItemsSource = TaskList; } else { lblNoTask.Visibility = Visibility.Visible; lstTasks.Visibility = Visibility.Collapsed; } }
private void Window_Loaded(object sender, RoutedEventArgs e) { refreshTaskList(); TasksHelper taskClient = new TasksHelper(); lstManageTasks.ItemsSource = lstOverviewAllTask.ItemsSource = taskClient.GetTasksByEvent(user.UserID, event_.EventID).ToList<Task>(); taskClient.Close(); LoadRoles(); }
private void LoadTasks() { TasksHelper client = new TasksHelper(); lstManageTasks.ItemsSource = lstOverviewAllTask.ItemsSource = client.GetTasksByEvent(user.UserID, event_.EventID); client.Close(); ClearAll(); }