示例#1
0
        public ResultData ResultData_ = new ResultData();   // 크롤링 결과

        public void InitCrawler()
        {
            ChannelInfo_ = null;
            CrawlerInfo_ = null;
            Crawler_     = null;
            GoodsInfoList_.Clear();
        }
示例#2
0
        // 그리드 뷰 갱신하가ㅣ
        public void UpdateDataGridView()
        {
            foreach (DataGridViewRow pData in dataGridView_Crawler.Rows)
            {
                Int32 nIndex = Convert.ToInt32(pData.Cells[0].Value);
                if (pData.Cells[0].Value == null)
                {
                    continue;
                }

                LQChannelInfo pInfo = AppManager.Instance.GetChannelInfo(nIndex);

                // 0: 인덱스 1: 파트너 인덱스 2: 파트너 이름 3: 채널 인덱스 4: 채널 이름 5: 채널 아이피 6: 동작 상태 7: 스타터 연결 8: 버튼

                if (pInfo != null)
                {
                    pData.Cells[0].Value = pInfo.nIdx_.ToString();
                    pData.Cells[1].Value = pInfo.PartnerSeq_.ToString();
                    pData.Cells[2].Value = pInfo.PartnerName_;
                    pData.Cells[3].Value = pInfo.Channel_Idx_.ToString();
                    pData.Cells[4].Value = pInfo.Channel_Name_;
                    pData.Cells[5].Value = pInfo.connected_ip_;
                    pData.Cells[6].Value = pInfo.crawler_status_;
                    pData.Cells[7].Value = pInfo.checker_status_;
                }
                else
                {
                    pData.Cells[2].Value = "not in operation";
                    pData.Cells[3].Value = "not in operation";
                }
            }
        }
示例#3
0
        public void SelectChannelInfos()
        {
            ChannelInfo_List_.Clear();
            SqlHelper pMySqlDB = new SqlHelper();

            pMySqlDB.Connect(InfoManager.Instance.method_, InfoManager.Instance.dbip_, InfoManager.Instance.dbport_, InfoManager.Instance.dbname_
                             , InfoManager.Instance.dbaccount_, InfoManager.Instance.dbpw_, InfoManager.Instance.sshhostname_, InfoManager.Instance.sshuser_
                             , InfoManager.Instance.sshpw_);

            MySqlDataReader datareader = pMySqlDB.call_proc("sp_select_All_Crawler_Info", null);

            while (datareader.Read())
            {
                LQChannelInfo pChannelInfo = new LQChannelInfo();
                pChannelInfo.nIdx_         = Convert.ToInt32(datareader["idx"]);
                pChannelInfo.PartnerSeq_   = Convert.ToInt32(datareader["PartnerSeq"]);
                pChannelInfo.PartnerName_  = Convert.ToString(datareader["PartnerName"]);
                pChannelInfo.Channel_Idx_  = Convert.ToInt32(datareader["Channel_Idx"]);
                pChannelInfo.Channel_Name_ = Convert.ToString(datareader["Channel_Name"]);
                ChannelInfo_List_.Add(pChannelInfo.nIdx_, pChannelInfo);
            }
        }
示例#4
0
 public void SetChannelInfo(LQStructures.LQChannelInfo pInfo)
 {
     ChannelInfo_ = pInfo;
 }