public void SetTestTreeItemActivity(int nodeId, bool isActive) { Provider.TestRoles(TestorUserRole.Administrator, TestorUserRole.Teacher, TestorUserRole.Laboratorian); using (DataClassesTestorCoreDataContext dataContext = new DataClassesTestorCoreDataContext(TestorSecurityProvider.ConnectionString)) { dataContext.SetTestTreeItemActivity(nodeId, isActive); dataContext.SubmitChanges(); } }