public static void DeleteJob(int autoID) { JobLM job = JobStorage.Get(autoID); JobStorage.Delete(autoID); if (job != null && job.PlanAutoID > 0) { PlanLM plan = PlanStorage.Get(job.PlanAutoID); plan.ReferenceCount--; PlanStorage.Save(plan); } }