The requirement is to get task status of some of tasks in Checklist and Requested list.
For this written the below code and gets the task list. Now I have to compare the task description and get its Status.
Code: Select all
IOrder order = os.OpenOrder(search, true);
// Get list of tasks and add all task types to it.
IList tasks = (IList)order.GetProperty("Tasks");
// Cast to dynamic to make TaskList handling easier.
dynamic taskList = (dynamic)tasks;
Dictionary<string, string> CheckAndRequestList = new Dictionary<string, string>();
CheckAndRequestList.Add("210 Seller Figures", "");
CheckAndRequestList.Add("220 Lender Figures", "");
CheckAndRequestList.Add("110 Proceeds", "");
CheckAndRequestList.Add("ALTA Settalment Statement", "");
foreach (dynamic taskItem in taskList)
{
string taskName = CheckAndRequestList.Keys.FirstOrDefault(s => s == taskItem.Description.ToString());
if (CheckAndRequestList.ContainsKey(taskName))
{
// Get the task status here
CheckAndRequestList[taskName] = <<How we can get task status here>>;
}
}