Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
May 01, 2012 06:04 AM|LINK
What is the value of registerDC.CustomerId in the following line:
registerDC.CustomerId = Convert.ToInt32(registerDC.CustomerId);
Make sure it has a valid value. Because it seems that there is no data against it. You are creating a new object using:
RegisterDC registerDC = new RegisterDC();
So it seems CustomerId will either be 0 or any default value that does not have any data against it.