コード例 #1
0
        public bool InitStatParams(DataStatParamInfo DataStatParam, DataStoreTableInfo DataStoreItem)
        {
            int             res = 0;
            QueryResultBase QueryResultObject = new QueryResultBase();

            dataStatParam = DataStatParam;
            dataStoreItem = DataStoreItem;



            mysqlCnn = new MySqlConnectHelper(Conn);



            if (mysqlCnn.OpenConnect() == false)
            {
                LoggerManager.Log.Info("MySql连接对象创建失败!\n");
                return(false);
            }

            String DbName = $"`[iot]-[{DataStatParam.CompanyCode}]`";

            res = mysqlCnn.SelectDB(DbName);


            //MySqlDataReader companyReader = MySqlHelper.ExecuteReader(Conn, CommandType.Text, "select * from companyinfo", null);

            return(true);
        }
コード例 #2
0
        public void InitQueryParams(DataQueryParamObject DataQueryParam, DataStoreTableInfo DataStoreItem)
        {
            int             res = 0;
            QueryResultBase QueryResultObject = new QueryResultBase();

            dataQueryParam = DataQueryParam;
            dataStoreItem  = DataStoreItem;

            mysqlCnn = MySqlConnectPoolHelper.getPool().getConnection();

            String DbName = $"`[iot]-[{DataQueryParam.CompanyCode}]`";

            res = mysqlCnn.SelectDB(DbName);
        }