Пример #1
0
        public IQQDataService SwitchQQDataService()
        {
            IQQDataService cs = null;

            switch (SystemConfig.MainDBType)
            {
            case DBType.MySQL:
                break;

            case DBType.SQLite:
                cs = new SQLiteQQDataService("TecentDASQLite");
                break;

            case DBType.SQLServer:
                cs = new  QQDataService(new ConfigurationItems().TecentDA_Read);
                break;
            }
            return(cs);
        }
Пример #2
0
        public void SaveQQData(List <FindQQ> datas)
        {
            IQQDataService cs = SwitchQQDataService();

            //当前数据库
            switch (SystemConfig.MainDBType)
            {
            case DBType.MySQL:
                break;

            case DBType.SQLite:
                //cs = new SQLiteQQDataService("TecentDASQLite");
                List <FindQQDataTable> tables = datas.Select(s => s.ConvertMapModel <FindQQ, FindQQDataTable>(true)).ToList();
                cs.SaveQQ(tables);
                break;

            case DBType.SQLServer:
                // cs = new  QQDataService(new ConfigurationItems().TecentDA);
                List <FindQQDataTable> fins = datas.Select(s => s.ConvertMapModel <FindQQ, FindQQDataTable>(true)).ToList();
                cs.SaveQQ(fins);
                break;
            }
        }
Пример #3
0
        public PickUpStatic TodayStatic()
        {
            IQQDataService ds = SwitchQQDataService();

            return(ds.TodayStaticData());
        }