• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Need to generate it quickly? Taking a lot of time.

Joined
5/12/17
Messages
2
Points
11
Class1 CLS = new Class1();

DataTable dt = CLS.ShowalldataSerial(textBox4.Text);


for (int i = 0; i <= Convert.ToInt32(textBox1.Text); i++)

{

Serial = SRL.Rnd().ToString();

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;


dm.DM(txt, Color.FromName(comboBox1.SelectedItem.ToString()), Color.White).Save(root + "\\" + Serial + ".emf", System.Drawing.Imaging.ImageFormat.Emf);


}

MessageBox.Show("Records generated success ");




The problem that I am having with the above mentioned code is that it is taking a lot of time. Using this code, it took a minute to generate 10000 files matrix bar code. The point is that when I am using this code for 200000 in respective textcode it almost takes half an hour or more. Thereby I am looking for something that would help me generate code for 200000 and that too quickly. Can anyone help me with it?
 
Class1 CLS = new Class1();

DataTable dt = CLS.ShowalldataSerial(textBox4.Text);


for (int i = 0; i <= Convert.ToInt32(textBox1.Text); i++)

{

Serial = SRL.Rnd().ToString();

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;


dm.DM(txt, Color.FromName(comboBox1.SelectedItem.ToString()), Color.White).Save(root + "\\" + Serial + ".emf", System.Drawing.Imaging.ImageFormat.Emf);


}

MessageBox.Show("Records generated success ");




The problem that I am having with the above mentioned code is that it is taking a lot of time. Using this code, it took a minute to generate 10000 files matrix bar code. The point is that when I am using this code for 200000 in respective textcode it almost takes half an hour or more. Thereby I am looking for something that would help me generate code for 200000 and that too quickly. Can anyone help me with it?
Where is this code from?
You might want to post in another category in the forum for that:
https://www.quantnet.com/forum/computing.24/
 
is this C#? Managed C++?

This System.Drawing.Imaging.ImageFormat.Emf and MessageBox.Show, look really suspicious
 
Back
Top