private void LoadData() { if (txtSession.Text != "") { string sesssion = Convert.ToString(txtSession.Text); lstProduct.Clear(); SolrHistoryCrawlerProduct solrHistoryCrawlerProduct = SolrHistoryCrawlerProduct.Instace(); NoSqlHistoryCrawler _noSqlHistoryCrawler = NoSqlHistoryCrawler.Instance(); foreach (HistoryProductSorl historySolr in solrHistoryCrawlerProduct.GetHistoryOfSession(sesssion)) { lstProduct.Add(_noSqlHistoryCrawler.GetProduct(historySolr.Session, historySolr.ProductId, historySolr.CompanyId)); } } else if (txtProductId.Text != "") { long productId = Convert.ToInt64(txtProductId.Text); lstProduct.Clear(); SolrHistoryCrawlerProduct solrHistoryCrawlerProduct = SolrHistoryCrawlerProduct.Instace(); NoSqlHistoryCrawler noSqlHistoryCrawler = NoSqlHistoryCrawler.Instance(); foreach (HistoryProductSorl historySolr in solrHistoryCrawlerProduct.GetHistoryOfProduct(productId)) { lstProduct.Add(noSqlHistoryCrawler.GetProduct(historySolr.Session, historySolr.ProductId, historySolr.CompanyId)); } } }
private void RefreshData() { SolrHistoryCrawlerProduct solrHistoryCrawler = SolrHistoryCrawlerProduct.Instace(); this.gridControl1.DataSource = solrHistoryCrawler.GetHistoryOfSession(this.Session); }