Esempio n. 1
0
        public void SchemaRepositoryReturnTableNamesThatAreBackBoneRelated()
        {
            var result = schemaRepository.GetSchemaBackBoneRelatedTables();

            Assert.AreEqual(4, result.Count);
            Assert.IsTrue(result.Contains("Mortgages"));
        }
Esempio n. 2
0
        public ActionResult Criteria(string queryId, string queryName)
        {
            var tableNames = _schemaRepository.GetSchemaBackBoneRelatedTables();

            IEnumerable <DropDownItem> temptablelist = tableNames.Select(name => new DropDownItem
            {
                DropDownDisplay = name,
                DropDownValue   = name
            }).OrderBy(x => x.DropDownDisplay).ToList();

            var model = new CountsQueryModel
            {
                _tables       = GetSelectListItems(temptablelist),
                QueryId       = queryId,
                QueryName     = queryName,
                CriteriaModel = { _criteria = BuildModelCriteria() }
            };

            ViewBag.temptablelist = temptablelist;
            GetQueryCriteriaIntoModel(queryId, model);
            return(View(model));
        }