Sana Assistant (online)
Table of Contents

Extension.Api.ErpCommunication.ValueParser reference

ValueParser provides functionality to parse strings received from ERP responses. String representation of some data types can differ for different cultures and value parser parses values according to current ERP preferences.

Methods

Class diagram

ParseBool(string str)

Parses the specified string value as boolean value. Returns null if the value cannot be parsed.

bool? value = Api.ErpCommunication.ValueParser.ParseBool(stringValue);

ParseDate(string str)

Parses the specified string value as date value. Returns null if the value cannot be parsed.

DateTime? value = Api.ErpCommunication.ValueParser.ParseDate(stringValue);

ParseDateTime(string str)

Parses the specified string value as date and time value. Returns null if the value cannot be parsed.

DateTime? value = Api.ErpCommunication.ValueParser.ParseDateTime(stringValue);

ParseDecimal(string str)

Parses the specified string value as decimal value. Returns null if the value cannot be parsed.

decimal? value = Api.ErpCommunication.ValueParser.ParseDecimal(stringValue);

ParseInt(string str)

Parses the specified string value as integer value. Returns null if the value cannot be parsed.

int? value = Api.ErpCommunication.ValueParser.ParseInt(stringValue);

ParseLong(string str)

Parses the specified string value as long integer value. Returns null if the value cannot be parsed.

long? value = Api.ErpCommunication.ValueParser.ParseLong(stringValue);

See also