TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bharathi Raja
NA
1.1k
54.5k
Error : Index was outside the bounds of the array.
Jul 26 2017 9:18 AM
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();
Reply
Answers (
5
)
how to block previous dates from datetime picker in windows
combobox select with taxand without ta