What are the actual
data types of
workflowProperties.Item[strACQCost]
and
FACommon.TotalACQCost
?
(
Not what types do they
represent.)
I'm going to
guess that
workflowProperties.Item[strACQCost]
is
object
and
FACommon.TotalACQCost
is a
string
.
If that's the case, then they need to be converted to types consistent with the data they
could contain.
If either could be a real number (
i.e., not restricted to integer values, what I think you mean when you say "decimal"),
then they should be converted to type
decimal
(or
double
) and then round the values for your comparison:
if (Math.Round(Convert.ToDecimal(workflowProperties.Item[strACQCost].ToString())) >= Math.Round(Convert.ToDecimal(FACommon.TotalACQCost)))
or use
Convert.ToDouble()
instead of
Convert.ToDecimal()
[Edit]
If the
FACommon.TotalACQCost
is
guaranteed to
always be the representation of an integer, then it can remain
Convert.ToInt32()
:
if (Math.Round(Convert.ToDecimal(workflowProperties.Item[strACQCost].ToString())) >= Convert.ToInt32(FACommon.TotalACQCost))
[/Edit]