Ejemplo n.º 1
0
 private void PuschClassification()
 {
     while (true)
     {
         try
         {
             IDatabase redisDatabase  = this.connectionMutilexer.GetDatabase(8);
             var       productAdapter = new ProductAdapter(new SqlDb(QT.Entities.Server.ConnectionString));
             DataTable tbl            = productAdapter.GetListCompanySynClassification();
             if (tbl.Rows.Count == 0)
             {
                 return;
             }
             foreach (DataRow row in tbl.Rows)
             {
                 long   companyID = Convert.ToInt64(row["ID"]);
                 string domain    = Convert.ToString(row["Domain"]);
                 this.Invoke(new Action(() =>
                 {
                     lblCompanyClasification.Text = domain;
                 }));
                 PushClassificationForCompany(companyID, productAdapter, redisDatabase);
             }
         }
         catch (ThreadAbortException ex)
         {
             return;
         }
         catch (Exception ex1)
         {
             Thread.Sleep(1000);
         }
     }
 }