This question already has an answer here:
Im stuck in this line. im new to c# and i just converted my code from vb.net to c#. after converting an unhandled error occured.
frmPointofSale pointofsale = new frmPointofSale();
this.btnOK.Enabled = true;
if (Convert.ToInt32(txtquantity.Text) < 1)
{
this.btnOK.Enabled = false;
}
else if (Convert.ToInt32(txtquantity.Text) > Convert.ToInt32(pointofsale.dgvList.CurrentRow.Cells[8].Value.ToString()))
{
btnOK.Enabled = false;
MessageBox.Show("not enough quantity!");
return;
}
TextBox3.Text = Convert.ToString(Convert.ToInt32(pointofsale.dgvList.CurrentRow.Cells[6].Value) * Convert.ToInt32(txtquantity.Text));
the error occurred in 'else if' statement. help me please. ty
Aucun commentaire:
Enregistrer un commentaire