C# Class Zombie.Safe

The Safe class provide static methods to read items from a QBFC object.
Afficher le fichier Open project: pkpjpm/Zombie Class Usage Examples

Méthodes publiques

Méthode Description
Cents ( float f ) : double
CleanApostrophes ( string s ) : string
DecimalAsCents ( decimal d ) : double
DecimalAsMils ( decimal d ) : double
FullName ( IQBBaseRef obj ) : string

Returns a name reference (Full Name) in a way that will not explode. Returns a zero length string in the event of failure

GetNullDateTimeValue ( ) : System.DateTime

The beginning of the COM Epoch is used to represent no date

LimitedString ( string val, int maxLength ) : string

Silent truncation function when data loss is acceptable

LimitedString ( string val, int maxLength, string reference ) : string

SDK updates treat truncation as an error. So it is important to trim values that are found to be too long

ListID ( IQBBaseRef obj ) : string

Returns an ID reference (ListID) in a way that will not explode. Returns a zero length string in the event of failure

SafeString ( object obj ) : string
Value ( IQBDateTimeType dt ) : System.DateTime
Value ( IQBDateType dt ) : System.DateTime
Value ( IQBBoolType bl ) : bool
Value ( IQBAmountType amt ) : decimal
Value ( IQBFloatType val ) : decimal
Value ( IQBPercentType pct ) : decimal
Value ( IQBPriceType prc ) : decimal
Value ( IQBQuanType quan ) : decimal
Value ( IQBIntType i ) : int
Value ( IQBIDType ID ) : string
Value ( IQBStringType obj ) : string

Returns a valid non-exploding string from an IQBStringType object

Method Details

Cents() public static méthode

public static Cents ( float f ) : double
f float
Résultat double

CleanApostrophes() public static méthode

public static CleanApostrophes ( string s ) : string
s string
Résultat string

DecimalAsCents() public static méthode

public static DecimalAsCents ( decimal d ) : double
d decimal
Résultat double

DecimalAsMils() public static méthode

public static DecimalAsMils ( decimal d ) : double
d decimal
Résultat double

FullName() public static méthode

Returns a name reference (Full Name) in a way that will not explode. Returns a zero length string in the event of failure
public static FullName ( IQBBaseRef obj ) : string
obj IQBBaseRef the reference to read
Résultat string

GetNullDateTimeValue() public static méthode

The beginning of the COM Epoch is used to represent no date
public static GetNullDateTimeValue ( ) : System.DateTime
Résultat System.DateTime

LimitedString() public static méthode

Silent truncation function when data loss is acceptable
public static LimitedString ( string val, int maxLength ) : string
val string Original string value
maxLength int maximum allowed lenght
Résultat string

LimitedString() public static méthode

SDK updates treat truncation as an error. So it is important to trim values that are found to be too long
public static LimitedString ( string val, int maxLength, string reference ) : string
val string
maxLength int
reference string
Résultat string

ListID() public static méthode

Returns an ID reference (ListID) in a way that will not explode. Returns a zero length string in the event of failure
public static ListID ( IQBBaseRef obj ) : string
obj IQBBaseRef The reference to read
Résultat string

SafeString() public static méthode

public static SafeString ( object obj ) : string
obj object
Résultat string

Value() public static méthode

public static Value ( IQBDateTimeType dt ) : System.DateTime
dt IQBDateTimeType
Résultat System.DateTime

Value() public static méthode

public static Value ( IQBDateType dt ) : System.DateTime
dt IQBDateType
Résultat System.DateTime

Value() public static méthode

public static Value ( IQBBoolType bl ) : bool
bl IQBBoolType
Résultat bool

Value() public static méthode

public static Value ( IQBAmountType amt ) : decimal
amt IQBAmountType
Résultat decimal

Value() public static méthode

public static Value ( IQBFloatType val ) : decimal
val IQBFloatType
Résultat decimal

Value() public static méthode

public static Value ( IQBPercentType pct ) : decimal
pct IQBPercentType
Résultat decimal

Value() public static méthode

public static Value ( IQBPriceType prc ) : decimal
prc IQBPriceType
Résultat decimal

Value() public static méthode

public static Value ( IQBQuanType quan ) : decimal
quan IQBQuanType
Résultat decimal

Value() public static méthode

public static Value ( IQBIntType i ) : int
i IQBIntType
Résultat int

Value() public static méthode

public static Value ( IQBIDType ID ) : string
ID IQBIDType
Résultat string

Value() public static méthode

Returns a valid non-exploding string from an IQBStringType object
public static Value ( IQBStringType obj ) : string
obj IQBStringType The object to be translated
Résultat string