Beispiel #1
0
        public void QueryFilterRefreshTest()
        {
            QueryFilterControl filter = CreateFilterControl();
            GroupOperator      aggrGroup, rootGroup;

            CreateFilterCondition1(filter, out rootGroup, out aggrGroup);
            DataTable searchCriteriaTable = filter.QueryDataset.Tables[QuerySearchObject_DB.TasQueryConditionGroup];

            filter.Flush();

            Assert.AreEqual(6, searchCriteriaTable.Rows.Count);
            var querySearchObjectId =
                (long)filter.QueryDataset.Tables[QuerySearchObject_DB.TasQuerySearchObject].Rows[0]["idfQuerySearchObject"];

            DataRow row = filter.QueryDataset.Tables[QuerySearchObject_DB.TasQuerySearchField].Rows.Find(HumanCaseIdField);

            if (row != null)
            {
                row.Delete();
            }
            filter.RefreshNodes();
            Assert.AreEqual(4, searchCriteriaTable.Rows.Count);
            CheckConditionRow(searchCriteriaTable.Rows[0], -1L, DBNull.Value, querySearchObjectId, 0);
            CheckConditionRow(searchCriteriaTable.Rows[1], -2L, -1L, querySearchObjectId, 0, SubQuerySearchObjectId - 1, DBNull.Value, "Exists");
            CheckConditionRow(searchCriteriaTable.Rows[2], -3L, -2L, SubQuerySearchObjectId - 1, 0);
            CheckConditionRow(searchCriteriaTable.Rows[3], DBNull.Value, -3L, SubQuerySearchObjectId - 1, 0, DBNull.Value, SubQuerySearchFieldIdSeed - 1L, "Binary", 0, TestNameIdValue);
        }
Beispiel #2
0
        public void QueryFilterFlashTest()
        {
            QueryFilterControl filter = CreateFilterControl();
            GroupOperator      aggrGroup, rootGroup;

            CreateFilterCondition1(filter, out rootGroup, out aggrGroup);
            filter.Flush();
            DataTable searchCriteriaTable = filter.QueryDataset.Tables[QuerySearchObject_DB.TasQueryConditionGroup];

            Assert.AreEqual(6, searchCriteriaTable.Rows.Count);
            string filterText = filter.GetFilterText(filter.FilterCriteria, null, " ");

            CheckFilterCondition1(filter);
            var ds = filter.QueryDataset;

            filter = CreateFilterControl();
            filter.Bind((long)ds.Tables[1].Rows[0]["idfQuerySearchObject"], ds);
            filter.Flush();
            CheckFilterCondition1(filter);

            filter = CreateFilterControl();
            CreateFilterCondition2(filter, ref rootGroup, ref aggrGroup);
            filter.Flush();

            searchCriteriaTable = filter.QueryDataset.Tables[QuerySearchObject_DB.TasQueryConditionGroup];
            Assert.AreEqual(7, searchCriteriaTable.Rows.Count);
            CheckFilterCondition2(filter);
            ds     = filter.QueryDataset;
            filter = CreateFilterControl();
            filter.Bind((long)ds.Tables[1].Rows[0]["idfQuerySearchObject"], ds);
            filter.Flush();
            CheckFilterCondition2(filter);

            filter = CreateFilterControl();
            CreateFilterCondition3(filter, out rootGroup);
            filter.Flush();

            searchCriteriaTable = filter.QueryDataset.Tables[QuerySearchObject_DB.TasQueryConditionGroup];
            Assert.AreEqual(3, searchCriteriaTable.Rows.Count);
            CheckFilterCondition3(filter);
            ds     = filter.QueryDataset;
            filter = CreateFilterControl();
            filter.Bind((long)ds.Tables[1].Rows[0]["idfQuerySearchObject"], ds);
            filter.Flush();
            CheckFilterCondition3(filter);
        }
Beispiel #3
0
 private void FlashClick(object sender, EventArgs e)
 {
     m_Filter.Flush();
     m_Filter.Bind((long)m_Filter.QueryDataset.Tables[1].Rows[0]["idfQuerySearchObject"], m_Filter.QueryDataset);
 }