C# Класс Zombie.Safe

The Safe class provide static methods to read items from a QBFC object.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

Cents() публичный статический Метод

public static Cents ( float f ) : double
f float
Результат double

CleanApostrophes() публичный статический Метод

public static CleanApostrophes ( string s ) : string
s string
Результат string

DecimalAsCents() публичный статический Метод

public static DecimalAsCents ( decimal d ) : double
d decimal
Результат double

DecimalAsMils() публичный статический Метод

public static DecimalAsMils ( decimal d ) : double
d decimal
Результат double

FullName() публичный статический Метод

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
Результат string

GetNullDateTimeValue() публичный статический Метод

The beginning of the COM Epoch is used to represent no date
public static GetNullDateTimeValue ( ) : System.DateTime
Результат System.DateTime

LimitedString() публичный статический Метод

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
Результат string

LimitedString() публичный статический Метод

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
Результат string

ListID() публичный статический Метод

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
Результат string

SafeString() публичный статический Метод

public static SafeString ( object obj ) : string
obj object
Результат string

Value() публичный статический Метод

public static Value ( IQBDateTimeType dt ) : System.DateTime
dt IQBDateTimeType
Результат System.DateTime

Value() публичный статический Метод

public static Value ( IQBDateType dt ) : System.DateTime
dt IQBDateType
Результат System.DateTime

Value() публичный статический Метод

public static Value ( IQBBoolType bl ) : bool
bl IQBBoolType
Результат bool

Value() публичный статический Метод

public static Value ( IQBAmountType amt ) : decimal
amt IQBAmountType
Результат decimal

Value() публичный статический Метод

public static Value ( IQBFloatType val ) : decimal
val IQBFloatType
Результат decimal

Value() публичный статический Метод

public static Value ( IQBPercentType pct ) : decimal
pct IQBPercentType
Результат decimal

Value() публичный статический Метод

public static Value ( IQBPriceType prc ) : decimal
prc IQBPriceType
Результат decimal

Value() публичный статический Метод

public static Value ( IQBQuanType quan ) : decimal
quan IQBQuanType
Результат decimal

Value() публичный статический Метод

public static Value ( IQBIntType i ) : int
i IQBIntType
Результат int

Value() публичный статический Метод

public static Value ( IQBIDType ID ) : string
ID IQBIDType
Результат string

Value() публичный статический Метод

Returns a valid non-exploding string from an IQBStringType object
public static Value ( IQBStringType obj ) : string
obj IQBStringType The object to be translated
Результат string