Esempio n. 1
0
 private void btnDelFailRegexPath_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Delete product fail link?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes)
     {
         ProductAdapter productAdapter = new ProductAdapter(new Entities.Data.SqlDb(QT.Entities.Server.ConnectionString));
         int            numberDelete   = productAdapter.DeleteProductFailRegex(txtCompanyID.Text);
         this.richTextBox1.AppendText(string.Format("\r\n Deleleted {0} products!", numberDelete));
         if ((numberDelete > 0) && MessageBox.Show("Do you want to refresh cache in solr?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes)
         {
             long CompanyID = productAdapter.GetCompanyIDFromDomain(txtCompanyID.Text);
             productAdapter.PushQueueIndexCompany(CompanyID);
             MessageBox.Show("Pushed message");
         }
     }
 }