private void btnDeleteTask_Click(object sender, RoutedEventArgs e)
 {
     if (lstManageTasks.SelectedIndex == -1)
     {
         MessageBox.Show("Please select a task to delete!", "Invalid Input",
             MessageBoxButton.OK, MessageBoxImage.Exclamation);
         return;
     }
     Task t = (Task)lstManageTasks.SelectedItem;
     TasksHelper client = new TasksHelper();
     try
     {
         client.DeleteTask(user, event_.EventID, t.TaskID);
         int currIdx = cboRole.SelectedIndex;
         cboRole.SelectedIndex = -1;
         cboRole.SelectedIndex = currIdx;
         MessageBox.Show("Operation Succeeded");
     }
     catch (Exception ex)
     {
         MessageBox.Show("An Error have occured: " + ex.Message, "Error",
            MessageBoxButton.OK, MessageBoxImage.Error);
     }
     finally
     {
         client.Close();
     }
     LoadTasks();
 }