private void button2_Click(object sender, EventArgs e) { QT.Moduls.CrawlerProduct.Cache.RedisCompanyWaitCrawler redisCompanyWaitCrawler = QT.Moduls.CrawlerProduct.Cache.RedisCompanyWaitCrawler.Instance(); var dicNextRL = redisCompanyWaitCrawler.GetAllCompanyAndTimeRL(); var dicNextFN = redisCompanyWaitCrawler.GetAllCompanyAndTimeFN(); DataTable tbl = this.gridControl1.DataSource as DataTable; foreach (DataRow row in tbl.Rows) { long companyID = Convert.ToInt64(row["id"]); row["NextReload"] = dicNextRL.ContainsKey(companyID) ? dicNextRL[companyID] : 0; row["NextFindNew"] = dicNextFN.ContainsKey(companyID) ? dicNextFN[companyID] : 0; } }
private void btnPushNextFN_Click(object sender, EventArgs e) { QT.Moduls.CrawlerProduct.Cache.RedisCompanyWaitCrawler redisCompanyWaitCrawler = QT.Moduls.CrawlerProduct.Cache.RedisCompanyWaitCrawler.Instance(); List <long> companyIDS = new List <long>(); foreach (var rowSelected in this.gridView1.GetSelectedRows()) { DataRowView row = gridView1.GetRow(rowSelected) as DataRowView; companyIDS.Add(Convert.ToInt64(row["id"])); } redisCompanyWaitCrawler.SetNexFindNew(companyIDS, this.dtpTimeRun.Value); MessageBox.Show("Success"); this.btnLoadNext.PerformClick(); }
private void btnPush_Click(object sender, EventArgs e) { QT.Moduls.CrawlerProduct.Cache.RedisCompanyWaitCrawler redisCompanyWaitCrawler = QT.Moduls.CrawlerProduct.Cache.RedisCompanyWaitCrawler.Instance(); List <long> companyIDS = new List <long>(); foreach (var rowSelected in this.richTextBox1.Text.Split(new char[] { ';', ',', '\n', ' ' })) { companyIDS.Add(Convert.ToInt64(rowSelected)); } if (rbFN.Checked) { redisCompanyWaitCrawler.SetNexFindNew(companyIDS, dtpTimeRun.Value); } else { redisCompanyWaitCrawler.SetNexReload(companyIDS, this.dtpTimeRun.Value); } MessageBox.Show("Success"); }