예제 #1
0
        public TestorTreeItem[] GetTestRequirements(int testId)
        {
            Provider.TestRoles(TestorUserRole.Anonymous, TestorUserRole.Student, TestorUserRole.Administrator, TestorUserRole.Teacher, TestorUserRole.Laboratorian);

            using (DataClassesTestorCoreDataContext dataContext = new DataClassesTestorCoreDataContext(TestorSecurityProvider.ConnectionString))
            {
                var req = dataContext.GetTestRequirements(testId);
                List <TestorTreeItem> retValue = new List <TestorTreeItem>();
                foreach (var current in req)
                {
                    TestorTreeItem item = new TestorTreeItem(
                        current.NodeId, current.Requirement, current.TestName, TestorItemType.Test, null);
                    retValue.Add(item);
                }
                return(retValue.ToArray());
            }
        }
예제 #2
0
 public TestorItemSelectedEventArgs(TestorTreeItem item)
 {
     _item = item;
 }