/// <summary> /// Resets the status for all work items to the specified value. /// </summary> /// <param name="newStatus">The new status to give all work items.</param> public void SetStatusForWorkItems(JobWorkStatus newStatus) { // Get worker items for this job if (_id <= 0) { throw new ApplicationException("Cannot change status for work items for a job that has no id. Save the job first to get the id."); } WorkItemData dataUtil = GetWorker <WorkItemData>(); dataUtil.WorkItemChangeStatusForAllWorkerItems(_id, newStatus); // Counters are no longer valid ResetStatusCounters(); }