I'm getting an error when I try to call the following procedure:
ApplyVoucherNumberToBillingCharges(practiceID,
Convert.ToInt32(rdoVoucherNumberAppliesTo.SelectedValue),
VoucherNumber,
VoucherNumberID,
Convert.ToInt32(hdRoundingRecordId.Value),
ChargeID,
hdGenerateVoucherNumberChargeList.Value,
Convert.ToDateTime(txtFromDate.Text),
Convert.ToDateTime(txtToDate.Text),
Convert.ToDateTime(txtPostingDate.Text),
Convert.ToInt32(ddlVisitType.SelectedValue),
SelectVisitProvider.SelectedID,
SelectVisitLocation.SelectedID,
chkOverwriteVoucherNumber.Checked);
I'm getting the following error:
input string was not in a correct format c#
I know this has something to do with the convert class because I was getting the same error when calling a different method previously. The difference is there was only one parameters using the Convert class then and there are several now.
The error message isn't as descriptive as I would like and doesn't give many clues as to where in particular this is happening.
Besides commenting out and hard coding a value for each of the parameters that do this and seeing which one is causing the issue, is there a better way to identify what the issue is?
I would really like to know because my project takes several minutes to build sometimes (I know, it's ridiculous, I've tried everything to fix this but nothing works) and so debugging this little issue could take forever.
Thanks for any help you can provide.