Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
Error : Index was outside the bounds of the array.
Bharathi Raja
Jul 26 2017 9:18 AM
168
Reply
connection.Open();
MySqlCommand cmd_tax = new MySqlCommand("select tax_cat from item_master where cat='1' limit 0,3",connection);
MySqlDataReader dread_tax = cmd_tax.ExecuteReader();
int x = 0;
sub_tot = Convert.ToDouble(textBox5.Text);
while (dread_tax.Read())
{
if (x == 0)
{
x = 1;
ser_tax = ((Convert.ToDouble(dread_tax.GetValue(1).ToString()) / 100) * sub_tot);
textBox10.Text = ser_tax.ToString();
}
else if (x == 1)
{
x = 2;
vat = ((Convert.ToDouble(dread_tax.GetValue(1).ToString()) / 100) * sub_tot);
textBox11.Text = vat.ToString();
}
else
{
sc = ((Convert.ToDouble(dread_tax.GetValue(1).ToString()) / 100) * sub_tot);
textBox15.Text = sc.ToString();
}
}
dread_tax.Close();
connection.Close();
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
how to block previous dates from datetime picker in windows
combobox select with taxand without ta