ahmed salah

ahmed salah

  • NA
  • 530
  • 148.9k

when generate 10000 2d matrix bar code take too much time

May 7 2017 8:58 AM

Problem

When generating matrix 2d bar code it take per 10000 files matrix bar code generating it take 1 minute

so that how to generating matrix bar code 2d in less time as seconds .

my code as below under button generating :
 
  1. Class1 CLS = new Class1();  
  2.                 DataTable dt = CLS.ShowalldataSerial(textBox4.Text);  
  3.   
  4.                 for (int i = 0; i <= Convert.ToInt32(textBox1.Text); i++)  
  5.                 {  
  6.                     Serial = SRL.Rnd().ToString();  
  7.                     txt = "UserID" + dt.Rows[0][0] + "FirmName" + dt.Rows[0][1] + "OrderNo" + dt.Rows[0][2] + "BtachNo" + dt.Rows[0][3] + "Quantity" + dt.Rows[0][4] + "ProductName" + dt.Rows[0][5] + "SerialNo" + Serial;  
  8.   
  9.                     dm.DM(txt, Color.FromName(comboBox1.SelectedItem.ToString()), Color.White).Save(root + "\\" + Serial + ".emf", System.Drawing.Imaging.ImageFormat.Emf);  
  10.   
  11.                 }  

  12.                 MessageBox.Show("Records generated success ");  

Answers (11)