Hi there everyone,
In calculating the "_totalcost" in the last line I'm having problem with casting decimal to currency and getting this error:
"input string was not in correct format."
Any Idea how to cast these two
decimal? _totalweight = 0;
Money _unitprice ;
Money _totalcost ;
_unitprice = _product.sfd_unitprice;
_unitprice =new Money(1);
_totalcost = _opportunityproduct.sfd_totalcost;
if (_totalcost==null)
{
_totalcost = new Money(0);
}
_totalcost = new Money(decimal.Parse(_totalweight.ToString()) * decimal.Parse(_unitprice.ToString()));
*This post is locked for comments
I have the same question (0)