Esempio n. 1
0
        public TestorTreeItem[] GetAppointedTests()
        {
            List <TestorTreeItem> retValue = new List <TestorTreeItem>();

            using (DataClassesTestorCoreDataContext dataContext = new DataClassesTestorCoreDataContext(TestorSecurityProvider.ConnectionString))
            {
                var tests = dataContext.GetAppointedTests(Provider.CurrentUser.UserId);
                foreach (var test in tests.Where(c => c.PassedCount == 0))
                {
                    TestorTreeItem newItem = new TestorTreeItem(test.NodeId, 0, test.TestName, TestorItemType.Test, new TestorTreeItem[] { });
                    retValue.Add(newItem);
                }
            }
            return(retValue.ToArray());
        }