chaitanya_u Posted April 23, 2008 Report Share Posted April 23, 2008 Hi, I have created an application which reads data from barcode. However Iam getting an error: "Input stringwas not in a correct format" private void UpdateDB() { if (lblBilledItemTotal.Text == "") { lblBilledItemTotal.Text ="0"; } double billedTotal = Convert.ToDouble(lblBilledItemTotal.Text); double billDisc = Convert.ToDouble(txtBillDiscCash.Text); double netPayable = Convert.ToDouble(lblNetPayableAmount.Text); po.AddBillData(billedTotal, billDisc, netPayable, DateTime.Now.ToShortDateString()); ClearDS(); ds = po.GetLatestBillNo(); int billNo = Convert.ToInt32(ds.Tables[0].Rows[0].ItemArray.GetValue(0)); foreach (DataGridViewRow dgR in dgItems.Rows) { if (dgR.Cells["dgColProdCode"].Value != null) { itemCode = dgR.Cells["dgColProdCode"].Value.ToString(); itemName = dgR.Cells["dgColItemDescription"].Value.ToString(); itemPrice = Convert.ToDouble(dgR.Cells["dgColPrice"].Value); itemQty = Convert.ToInt32(dgR.Cells["dgColQuantity"].Value); itemDiscCash = Convert.ToDouble(dgR.Cells["dgColItemDiscCash"].Value); itemDiscPercent = Convert.ToDouble(dgR.Cells["dgColItemDiscPercent"].Value); itemTotal = Convert.ToDouble(dgR.Cells["dgColTotal"].Value); po.AddSalesData(billNo, itemCode, itemName, itemQty, itemDiscCash, itemDiscPercent, itemPrice, billedTotal, DateTime.Now); } } Quote Link to comment Share on other sites More sharing options...
PDyer Posted April 24, 2008 Report Share Posted April 24, 2008 Sorry Chart FX does not have any Bar Code component. Is your error regarding Chart FX? "Input stringwas not in a correct format" seems more like an issue with C# syntax since it is not for sure a Chart FX proprietary error message...<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.