Example #1
0
        /// <summary>
        /// Deletes all work items.
        /// </summary>
        public void DeleteAllWorkItems()
        {
            if (_id <= 0)
            {
                throw new ArgumentException("Cannot remove work items for a job without id. Please save the job first.");
            }

            WorkItemData dataUtil = GetWorker <WorkItemData>();

            dataUtil.WorkItemDeleteAllForJob(_id);

            // Remove any workitems from memory
            _workItems = null;

            // Counters are no longer valid
            ResetStatusCounters();
        }