Skip to content

ERPConnect.Linq.ERPExtensions

Namespace: ERPConnect.Linq
Assembly: ERPConnectStandard20.dll

Represents a ERPConnect exception thrown during the execution of LINQ to ERP commands. This class cannot be inherited.

public static class ERPExtensions

Inheritance

objectERPExtensions

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods

InList(string, params string[])

This method extends the String object and checks if the current string is contained in the given list values.

public static bool InList(this string s, params string[] values)

Parameters

s string

The main String object

values string[]

The value list to check against

Returns

bool

Returns True if the current String is in the value list

ToSAPDate(string)

This method extends the String object and checks if the current string is containing a valid SAP date format (YYYYMMDD) and is converting it into an integer. This method is used to support date comparison with LINQ to ERP.

public static int ToSAPDate(this string s)

Parameters

s string

The main String object

Returns

int

Returns the date as integer, otherwise -1