示例#1
0
        private QueryFilterControl CreateFilterControl(string lang = "en")
        {
            DbManagerFactory.SetSqlFactory(Config.GetSetting("EidssConnectionString"));
            ConnectionManager.DefaultInstance.SetCredentials(Config.GetSetting("EidssConnectionString"));
            EidssUserContext.Init();
            context  = ModelUserContext.Instance as EidssUserContext;
            Security = new EidssSecurityManager();
            int result = Security.LogIn(Organizaton, Admin, AdminPassword);

            Assert.AreEqual(0, result);
            EIDSS_LookupCacheHelper.Init();
            EidssUserContext.CurrentLanguage = lang;
            var     queryDb             = new Query_DB();
            var     querySearchObjectDb = new QuerySearchObject_DB();
            var     queryDs             = queryDb.LoadDetailData(QueryId);
            DataRow row             = queryDs.Tables[Query_DB.TasQueryObjectTree].Rows[0];
            var     searchObjectsDs = querySearchObjectDb.LoadDetailData(row["idfQuerySearchObject"]);

            var form   = new Form();
            var filter = new QueryFilterControl {
                Parent = form, Dock = DockStyle.Fill
            };

            filter.Init();
            filter.Bind((long)queryDs.Tables[1].Rows[0]["idfQuerySearchObject"], searchObjectsDs);
            return(filter);
        }
示例#2
0
        private QueryFilterControl CreateFilterControl(string lang = "en")
        {
            var     queryDb             = new Query_DB();
            var     querySearchObjectDb = new QuerySearchObject_DB();
            DataSet queryDs             = queryDb.LoadDetailData(QueryId);
            DataRow row             = queryDs.Tables[Query_DB.TasQueryObjectTree].Rows[0];
            DataSet searchObjectsDs = querySearchObjectDb.LoadDetailData(row["idfQuerySearchObject"]);

            var form   = new Form();
            var filter = new QueryFilterControl {
                Parent = form, Dock = DockStyle.Fill
            };

            filter.Init();
            filter.Bind((long)queryDs.Tables[1].Rows[0]["idfQuerySearchObject"], searchObjectsDs);
            return(filter);
        }