当前位置: 首页>>代码示例>>C#>>正文


C# DataRowVersion类代码示例

本文整理汇总了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;
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:7,代码来源:MySqlParameter.cs

示例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;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:35,代码来源:RelatedView.cs

示例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;
        }
开发者ID:yuzhaocai,项目名称:stonefw,代码行数:25,代码来源:Database.cs

示例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;
        }
开发者ID:dotnet,项目名称:corefx,代码行数:35,代码来源:RelatedView.cs

示例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;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:DataExpression.cs

示例6: DB2Parameter

		public DB2Parameter(string name, DB2Type type)
		{
			direction = ParameterDirection.Input;
			sourceVersion = DataRowVersion.Current;
			this.ParameterName = name;
			this.DB2Type = type;
		} 
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:7,代码来源:DB2Parameter.cs

示例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;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:DesignParameter.cs

示例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;
 }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:8,代码来源:MySqlParameter.cs

示例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);
 }
开发者ID:JackFong,项目名称:QuantumCode.SDAL,代码行数:8,代码来源:MySqlDatabase.cs

示例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);
		}
开发者ID:EvanYaoPeng,项目名称:Kalman.Studio,代码行数:8,代码来源:OracleDatabase.cs

示例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;
 }
开发者ID:kingpong,项目名称:NETProvider,代码行数:9,代码来源:FbParameter.cs

示例12: SQLiteParameter

 public SQLiteParameter(String name, DbType type, object value)
 {
     _DbType = type;
     _ParameterName = name;
     _SourceColumn = "";
     _SourceVersion = DataRowVersion.Default;
     _Value = value;
     _Size = 0;
 }
开发者ID:north0808,项目名称:haina,代码行数:9,代码来源:SQLiteParameter.cs

示例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;
 }
开发者ID:JackFong,项目名称:QuantumCode.SDAL,代码行数:10,代码来源:MySqlDatabase.cs

示例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);
 }
开发者ID:pdckxd,项目名称:bugtrackingsystem,代码行数:20,代码来源:Database.cs

示例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;
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:10,代码来源:Parameter.cs


注:本文中的DataRowVersion类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。