本文整理汇总了C#中DataRowVersion类的典型用法代码示例。如果您正苦于以下问题:C# DataRowVersion类的具体用法?C# DataRowVersion怎么用?C# DataRowVersion使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DataRowVersion类属于命名空间,在下文中一共展示了DataRowVersion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MySqlParameter
public MySqlParameter(string parameterName, GodLesZ.Library.MySql.Data.MySqlClient.MySqlDbType dbType, int size, string sourceColumn)
: this(parameterName, dbType) {
this.size = size;
this.direction = ParameterDirection.Input;
this.sourceColumn = sourceColumn;
this.sourceVersion = DataRowVersion.Current;
}
示例2: Invoke
public bool Invoke(DataRow row, DataRowVersion version) {
object[] parentValues = GetParentValues();
if (parentValues == null) {
return false;
}
object[] childValues = row.GetKeyValues(childKey, version);
#if false
for (int i = 0; i < keyValues.Length; i++) {
Debug.WriteLine("keyvalues[" + (i).ToString() + "] = " + Convert.ToString(keyValues[i]));
}
for (int i = 0; i < values.Length; i++) {
Debug.WriteLine("values[" + (i).ToString() + "] = " + Convert.ToString(values[i]));
}
#endif
bool allow = true;
if (childValues.Length != parentValues.Length) {
allow = false;
}
else {
for (int i = 0; i < childValues.Length; i++) {
if (!childValues[i].Equals(parentValues[i])) {
allow = false;
break;
}
}
}
IFilter baseFilter = base.GetFilter();
if (baseFilter != null) {
allow &= baseFilter.Invoke(row, version);
}
return allow;
}
示例3: AddParameter
public virtual DbParameter AddParameter(DbCommand dm, string name, DbType dbType, int size,
ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn,
DataRowVersion sourceVersion, object value)
{
////if (dbType == DbType.String)
//// throw new Exception("请不要使用DbType.String进行数据库查询!");
if (CheckInjectAttackForSp(dm, value))
throw new Exception("输入的部分内容可能对系统稳定性造成影响,操作已停止![" + value + "]");
DbParameter param = this.ProviderFactory.CreateParameter();
if (param != null)
{
param.ParameterName = name;
param.DbType = dbType;
param.Size = size;
param.Value = value ?? DBNull.Value;
param.Direction = direction;
param.IsNullable = nullable;
param.SourceColumn = sourceColumn;
param.SourceVersion = sourceVersion;
dm.Parameters.Add(param);
}
return param;
}
示例4: Invoke
public bool Invoke(DataRow row, DataRowVersion version)
{
object[] parentValues = GetParentValues();
if (parentValues == null)
{
return false;
}
object[] childValues = row.GetKeyValues(_childKey, version);
bool allow = true;
if (childValues.Length != parentValues.Length)
{
allow = false;
}
else
{
for (int i = 0; i < childValues.Length; i++)
{
if (!childValues[i].Equals(parentValues[i]))
{
allow = false;
break;
}
}
}
IFilter baseFilter = base.GetFilter();
if (baseFilter != null)
{
allow &= baseFilter.Invoke(row, version);
}
return allow;
}
示例5: Evaluate
internal object Evaluate(DataRow row, DataRowVersion version)
{
if (!this.bound)
{
this.Bind(this.table);
}
if (this.expr != null)
{
object obj2 = this.expr.Eval(row, version);
if ((obj2 == DBNull.Value) && (StorageType.Uri >= this._storageType))
{
return obj2;
}
try
{
if (StorageType.Object != this._storageType)
{
obj2 = SqlConvert.ChangeType2(obj2, this._storageType, this._dataType, this.table.FormatProvider);
}
return obj2;
}
catch (Exception exception)
{
if (!ADP.IsCatchableExceptionType(exception))
{
throw;
}
ExceptionBuilder.TraceExceptionForCapture(exception);
throw ExprException.DatavalueConvertion(obj2, this._dataType, exception);
}
}
return null;
}
示例6: DB2Parameter
public DB2Parameter(string name, DB2Type type)
{
direction = ParameterDirection.Input;
sourceVersion = DataRowVersion.Current;
this.ParameterName = name;
this.DB2Type = type;
}
示例7: DesignParameter
public DesignParameter(string name)
{
this.parameterName = name;
this.autogeneratedName = string.Empty;
this.direction = ParameterDirection.Input;
this.sourceVersion = DataRowVersion.Current;
this.dataSourceName = string.Empty;
}
示例8: MySqlParameter
internal MySqlParameter(string name, MySqlDbType type, ParameterDirection dir, string col, DataRowVersion ver, object val)
: this(name, type)
{
Direction = dir;
SourceColumn = col;
SourceVersion = ver;
Value = val;
}
示例9: AddParameter
public override void AddParameter(DbCommand command, string name, DbType dbType, int size,
ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion,
object value)
{
DbParameter parameter = this.CreateParameter(name, dbType, size,
direction, nullable, precision, scale, sourceColumn, sourceVersion, value);
command.Parameters.Add(parameter);
}
示例10: AddParameter
public void AddParameter(OracleCommand command, string name, OracleType oracleType, int size,
ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn,
DataRowVersion sourceVersion, object value)
{
OracleParameter param = CreateParameter(name, DbType.AnsiString, size, direction, nullable, precision, scale, sourceColumn, sourceVersion, value) as OracleParameter;
param.OracleType = oracleType;
command.Parameters.Add(param);
}
示例11: FbParameter
public FbParameter()
{
this.fbDbType = FbDbType.VarChar;
this.direction = ParameterDirection.Input;
this.sourceVersion = DataRowVersion.Current;
this.sourceColumn = string.Empty;
this.parameterName = string.Empty;
this.charset = FbCharset.Default;
}
示例12: SQLiteParameter
public SQLiteParameter(String name, DbType type, object value)
{
_DbType = type;
_ParameterName = name;
_SourceColumn = "";
_SourceVersion = DataRowVersion.Default;
_Value = value;
_Size = 0;
}
示例13: CreateParameter
protected new DbParameter CreateParameter(string name, DbType dbType, int size,
ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn,
DataRowVersion sourceVersion, object value)
{
MySqlParameter param = this.CreateParameter(name) as MySqlParameter;
this.ConfigureParameter(param, name, dbType, size, direction,
nullable, precision, scale, sourceColumn,
sourceVersion, value);
return param;
}
示例14: AddParameter
/// <summary>
/// <para>Adds a new instance of a <see cref="DbParameter"/> object to the command.</para>
/// </summary>
/// <param name="command">The command to add the parameter.</param>
/// <param name="name"><para>The name of the parameter.</para></param>
/// <param name="dbType"><para>One of the <see cref="DbType"/> values.</para></param>
/// <param name="direction"><para>One of the <see cref="ParameterDirection"/> values.</para></param>
/// <param name="sourceColumn"><para>The name of the source column mapped to the DataSet and used for loading or returning the <paramref name="value"/>.</para></param>
/// <param name="sourceVersion"><para>One of the <see cref="DataRowVersion"/> values.</para></param>
/// <param name="value"><para>The value of the parameter.</para></param>
public void AddParameter(DbCommand command,
string name,
DbType dbType,
ParameterDirection direction,
string sourceColumn,
DataRowVersion sourceVersion,
object value)
{
AddParameter(command, name, dbType, 0, direction, false, 0, 0, sourceColumn, sourceVersion, value);
}
示例15: Parameter
public Parameter()
{
this.m_value = null;
this.m_direction = ParameterDirection.Input;
this.m_size = -1;
this.m_version = DataRowVersion.Current;
this.m_forceSize = false;
this.m_offset = 0;
this.m_suppress = false;
}