Monday, July 29, 2013

adding a Convert.ToInt32 Method

I have my code that's part of a BDC Model I'm creating...



{
ABCDataContext context = GetDBContext();
var item = (from e in context.TPFStatus.AsEnumerable()

where e.Document_Number == id

select e).Single();
return item;

}

This would be fine if "Document_Number" was a int as well but its a string. I need to convert from a string to an int. How would I go about adding this to my script...



public static int ToInt32(
long value
)

I can't get anything I try to work.


No comments:

Post a Comment