I wouldn't have my ado objects interacting directly with my GUI.
you are converting the value to a string and then calling ToString() this is redundant and will not allow you to format the value.
current is a numeric concept. To format a value as currency the value must be a numeric type. int, long, decimal, float, etc.
Code:
var result = cmd.Parameters["@cdnpricesum"].Value;
var currency = (float)result; //or other appropriate type
sumcdnpriceTB.Text = currency.ToString("c");
Error 1 The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?) E:\VisualStudioProjects\EstimatorC\EstimatorC\EstimateReview.cs 63 29 EstimatorC
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.