Beispiel #1
0
        // 플레이어 얻어오기
        public void SelectPlayer()
        {
            Crawler.Manager mgr = new Crawler.Manager();
            try
            {
                Util.DataBaseManager dbMgr = new Util.DataBaseManager();
                dbMgr.DataContext.ExecuteCommand("TRUNCATE TABLE PLAYER", new Object[] { });

                var player_Ws = dbMgr.SelectAll <Player_W>();

                List <Player> players = new List <Player>();
                for (Int32 i = 0; i < player_Ws.Count();)
                {
                    foreach (var player_W in player_Ws)
                    {
                        var player = mgr.GetPlayer(player_W);
                        players.Add(player);
                    }
                }
                dbMgr.Save <Player>(players);
            }
            finally
            {
                mgr.Dispose();
            }
        }
Beispiel #2
0
        // PlayerW  작업
        private void RunPlayer(List <Player_W> items)
        {
            List <DbItemBase> player_Ws = new List <DbItemBase>();
            DatabaseManager   dbMgr     = new DatabaseManager();

            using (var crawlerMgr = new Crawler.Manager())
            {
                foreach (var item in items)
                {
                    player_Ws.Add(crawlerMgr.GetPlayer(item));
                }
            }
            dbMgr.Save(player_Ws);
        }
Beispiel #3
0
        // 플레이어 얻어오기
        public void SelectPlayer()
        {
            Crawler.Manager mgr = new Crawler.Manager();
            try
            {
                Util.DataBaseManager dbMgr = new Util.DataBaseManager();
                dbMgr.DataContext.ExecuteCommand("TRUNCATE TABLE PLAYER", new Object[] { });

                var player_Ws = dbMgr.SelectAll<Player_W>();

                List<Player> players = new List<Player>();
                for(Int32 i = 0; i < player_Ws.Count(); )
                foreach (var player_W in player_Ws)
                {
                    var player = mgr.GetPlayer(player_W);
                    players.Add(player);
                }
                dbMgr.Save<Player>(players);
            }
            finally
            {
                mgr.Dispose();
            }
        }