Deleting Checklist and Requested Tasks

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Post Reply
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Deleting Checklist and Requested Tasks

Post by roteague »

Is there any programmatic method for deleting IChecklistTask and IRequestedTask items? If not, will this functionality be implemented in future revisions of SoftPro?

Thanks,
Robert
Phil Barton
Posts: 54
Joined: Wed Sep 24, 2008 2:37 pm
Location: Raleigh, NC
Contact:

Re: Deleting Checklist and Requested Tasks

Post by Phil Barton »

The ChecklistTask and RequestedTask collections on the IOrder interface include a Remove(..) method and a RemoveAt(...) method. The Remove method takes as its parameter the object to remove; the RemoveAt method takes as its parameter the index into the collection of the object to remove. The following code snippets show how to use the Remove(...) method for IRequestedTask objects (IChecklistTask objects will follow the same pattern):

C#

Code: Select all

					IRequestedTask task1 = order.RequestedTask.CreateNew();
					IRequestedTask task2 = order.RequestedTask.CreateNew();

					task1.Task = @"Task1";
					task2.Task = @"Task2";

					order.RequestedTask.Remove(task1);
VB

Code: Select all

		Dim task1 As IRequestedTask
		Dim task2 As IRequestedTask

		task1 = order.RequestedTask().CreateNew()
		task2 = order.RequestedTask().CreateNew()

		task1.Task() = "Task1"
		task2.Task() = "Task2"

		order.RequestedTask.Remove(task1)
Phil Barton
Software Architect
SoftPro
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Deleting Checklist and Requested Tasks

Post by roteague »

Thanks Phil. Sorry, I don't know why I didn't see that method.

Have a great weekend,
Robert
Post Reply