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


C# Common.RowUpdatingEventArgs类代码示例

本文整理汇总了C#中System.Data.Common.RowUpdatingEventArgs的典型用法代码示例。如果您正苦于以下问题:C# RowUpdatingEventArgs类的具体用法?C# RowUpdatingEventArgs怎么用?C# RowUpdatingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RowUpdatingEventArgs类属于System.Data.Common命名空间,在下文中一共展示了RowUpdatingEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnRowUpdating

		protected virtual void OnRowUpdating (RowUpdatingEventArgs value)
		{
			if (Events ["RowUpdating"] != null) {
				Delegate [] rowUpdatingList = Events ["RowUpdating"].GetInvocationList ();
				foreach (Delegate rowUpdating in rowUpdatingList) {
					MethodInfo rowUpdatingMethod = rowUpdating.Method;
					rowUpdatingMethod.Invoke (value, null);
				}
			}
		}
开发者ID:jamescourtney,项目名称:mono,代码行数:10,代码来源:DbDataAdapter.cs

示例2: OnRowUpdating

    /// <summary>
    /// Raised by the underlying DbDataAdapter when a row is being updated
    /// </summary>
    /// <param name="value">The event's specifics</param>
    protected override void OnRowUpdating(RowUpdatingEventArgs value)
    {
      EventHandler<RowUpdatingEventArgs> handler = base.Events[_updatingEventPH] as EventHandler<RowUpdatingEventArgs>;

      if (handler != null)
        handler(this, value);
    }
开发者ID:rohitlodha,项目名称:DenverDB,代码行数:11,代码来源:SQLiteDataAdapter.cs

示例3: OnRowUpdating

		/// <summary>
		/// Raises the RowUpdated event of a Sqlite data provider.
		/// </summary>
		/// <param name="args">A RowUpdatedEventArgs that contains the event data.</param>
		protected override void OnRowUpdating (RowUpdatingEventArgs args)
		{
			if (RowUpdating != null)
				RowUpdating(this, args);
		}
开发者ID:z0rg1nc,项目名称:CsharpSqliteFork,代码行数:9,代码来源:SqliteDataAdapter.cs

示例4: OnRowUpdating

 /// <summary>
 /// Overridden. Raises the RowUpdating event.
 /// </summary>
 /// <param name="value">A MySqlRowUpdatingEventArgs that contains the event data.</param>
 override protected void OnRowUpdating(RowUpdatingEventArgs value)
 {
   if (RowUpdating != null)
     RowUpdating(this, (value as MySqlRowUpdatingEventArgs));
 }
开发者ID:rotmgkillroyx,项目名称:rotmg_svr_OLD,代码行数:9,代码来源:dataadapter.cs

示例5: OnRowUpdating

			protected override void OnRowUpdating (RowUpdatingEventArgs value)
			{
				throw new NotImplementedException ();
			}
开发者ID:EricHripko,项目名称:mono,代码行数:4,代码来源:DbDataAdapterTest.cs

示例6: OnRowUpdating

 protected override void OnRowUpdating(RowUpdatingEventArgs value)
 {
     var handler = Events[updatingEventKey] as EventHandler<RowUpdatingEventArgs>;
     if (handler != null)
         handler(this, value);
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:6,代码来源:DeveelDbDataAdapter.cs

示例7: RowUpdatingHandler

		private void RowUpdatingHandler (object sender, RowUpdatingEventArgs args)
                {
                        if (args.Command != null)
                                return;
                        try {
                                switch (args.StatementType) {
                                case StatementType.Insert:
                                        args.Command = GetInsertCommand ();
                                        break;
                                case StatementType.Update:
                                        args.Command = GetUpdateCommand ();
                                        break;
                                case StatementType.Delete:
                                        args.Command = GetDeleteCommand ();
                                        break;
                                }
                        } catch (Exception e) {
                                args.Errors = e;
                                args.Status = UpdateStatus.ErrorsOccurred;
                        }
                }
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:21,代码来源:SqliteCommandBuilder.cs

示例8: RowUpdatingHandler

        protected void RowUpdatingHandler(RowUpdatingEventArgs rowUpdatingEvent) {
            if (null == rowUpdatingEvent) {
                throw ADP.ArgumentNull("rowUpdatingEvent");
            }
            try {
                if (UpdateStatus.Continue == rowUpdatingEvent.Status) {
                    StatementType stmtType = rowUpdatingEvent.StatementType;
                    DbCommand command = (DbCommand)rowUpdatingEvent.Command;

                    if (null != command) {
                        switch(stmtType) {
                        case StatementType.Select:
                            Debug.Assert(false, "how did we get here?");
                            return; // don't mess with it
                        case StatementType.Insert:
                            command = InsertCommand;
                            break;
                        case StatementType.Update:
                            command = UpdateCommand;
                            break;
                        case StatementType.Delete:
                            command = DeleteCommand;
                            break;
                        default:
                            throw ADP.InvalidStatementType(stmtType);
                        }

                        if (command != rowUpdatingEvent.Command) {
                            command = (DbCommand)rowUpdatingEvent.Command;
                            if ((null != command) && (null == command.Connection)) { // MDAC 87649
                                DbDataAdapter adapter = DataAdapter;
                                DbCommand select = ((null != adapter) ? ((DbCommand)adapter.SelectCommand) : null);
                                if (null != select) {
                                    command.Connection = (DbConnection)select.Connection;

                                }
                            }
                            // user command, not a command builder command
                        }
                        else command = null;
                    }
                    if (null == command) {
                        RowUpdatingHandlerBuilder(rowUpdatingEvent);
                    }
                 }
            }
            catch(Exception e) {
                // 
                if (!ADP.IsCatchableExceptionType(e)) {
                    throw;
                }

                ADP.TraceExceptionForCapture(e);

                rowUpdatingEvent.Status = UpdateStatus.ErrorsOccurred;
                rowUpdatingEvent.Errors = e;
            }
        }
开发者ID:uQr,项目名称:referencesource,代码行数:58,代码来源:DBCommandBuilder.cs

示例9: RowUpdatingHandlerBuilder

        private void RowUpdatingHandlerBuilder(RowUpdatingEventArgs rowUpdatingEvent) {
            // MDAC 58710 - unable to tell Update method that Event opened connection and Update needs to close when done
            // HackFix - the Update method will close the connection if command was null and returned command.Connection is same as SelectCommand.Connection
            DataRow datarow = rowUpdatingEvent.Row;
            BuildCache(false, datarow, false);

            DbCommand command;
            switch(rowUpdatingEvent.StatementType) {
            case StatementType.Insert:
                command = BuildInsertCommand(rowUpdatingEvent.TableMapping, datarow);
                break;
            case StatementType.Update:
                command = BuildUpdateCommand(rowUpdatingEvent.TableMapping, datarow);
                break;
            case StatementType.Delete:
                command = BuildDeleteCommand(rowUpdatingEvent.TableMapping, datarow);
                break;
#if DEBUG
            case StatementType.Select:
                Debug.Assert(false, "how did we get here?");
                goto default;
#endif
            default:
                throw ADP.InvalidStatementType(rowUpdatingEvent.StatementType);
            }
            if (null == command) {
                if (null != datarow) {
                    datarow.AcceptChanges();
                }
                rowUpdatingEvent.Status = UpdateStatus.SkipCurrentRow;
            }
            rowUpdatingEvent.Command = command;
        }
开发者ID:uQr,项目名称:referencesource,代码行数:33,代码来源:DBCommandBuilder.cs

示例10: RowUpdatingHandler

        protected void RowUpdatingHandler(RowUpdatingEventArgs rowUpdatingEvent)
        {
            if (rowUpdatingEvent == null)
            {
                throw ADP.ArgumentNull("rowUpdatingEvent");
            }
            try
            {
                if (rowUpdatingEvent.Status == UpdateStatus.Continue)
                {
                    StatementType statementType = rowUpdatingEvent.StatementType;
                    DbCommand insertCommand = (DbCommand) rowUpdatingEvent.Command;
                    if (insertCommand != null)
                    {
                        switch (statementType)
                        {
                            case StatementType.Select:
                                return;

                            case StatementType.Insert:
                                insertCommand = this.InsertCommand;
                                break;

                            case StatementType.Update:
                                insertCommand = this.UpdateCommand;
                                break;

                            case StatementType.Delete:
                                insertCommand = this.DeleteCommand;
                                break;

                            default:
                                throw ADP.InvalidStatementType(statementType);
                        }
                        if (insertCommand != rowUpdatingEvent.Command)
                        {
                            insertCommand = (DbCommand) rowUpdatingEvent.Command;
                            if ((insertCommand != null) && (insertCommand.Connection == null))
                            {
                                DbDataAdapter dataAdapter = this.DataAdapter;
                                DbCommand command2 = (dataAdapter != null) ? dataAdapter.SelectCommand : null;
                                if (command2 != null)
                                {
                                    insertCommand.Connection = command2.Connection;
                                }
                            }
                        }
                        else
                        {
                            insertCommand = null;
                        }
                    }
                    if (insertCommand == null)
                    {
                        this.RowUpdatingHandlerBuilder(rowUpdatingEvent);
                    }
                }
            }
            catch (Exception exception)
            {
                if (!ADP.IsCatchableExceptionType(exception))
                {
                    throw;
                }
                ADP.TraceExceptionForCapture(exception);
                rowUpdatingEvent.Status = UpdateStatus.ErrorsOccurred;
                rowUpdatingEvent.Errors = exception;
            }
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:69,代码来源:DbCommandBuilder.cs

示例11: RowUpdatingHandlerBuilder

        private void RowUpdatingHandlerBuilder(RowUpdatingEventArgs rowUpdatingEvent)
        {
            DbCommand command;
            DataRow dataRow = rowUpdatingEvent.Row;
            this.BuildCache(false, dataRow, false);
            switch (rowUpdatingEvent.StatementType)
            {
                case StatementType.Insert:
                    command = this.BuildInsertCommand(rowUpdatingEvent.TableMapping, dataRow);
                    break;

                case StatementType.Update:
                    command = this.BuildUpdateCommand(rowUpdatingEvent.TableMapping, dataRow);
                    break;

                case StatementType.Delete:
                    command = this.BuildDeleteCommand(rowUpdatingEvent.TableMapping, dataRow);
                    break;

                default:
                    throw ADP.InvalidStatementType(rowUpdatingEvent.StatementType);
            }
            if (command == null)
            {
                if (dataRow != null)
                {
                    dataRow.AcceptChanges();
                }
                rowUpdatingEvent.Status = UpdateStatus.SkipCurrentRow;
            }
            rowUpdatingEvent.Command = command;
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:32,代码来源:DbCommandBuilder.cs

示例12: OnRowUpdating

 protected override void OnRowUpdating(
 RowUpdatingEventArgs value)
 {
 }
开发者ID:karmamule,项目名称:ReconRunner,代码行数:4,代码来源:DataReaderAdapter.cs

示例13: RowUpdatingHandler

		protected void RowUpdatingHandler (object sender, RowUpdatingEventArgs rowUpdatingEvent)
		{
			throw new NotImplementedException ();
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:4,代码来源:DbCommandBuilder.cs

示例14: OnRowUpdating

 /// <summary>
 ///   Raises the RowUpdating event of a .NET Framework data provider.
 /// </summary>
 /// <param name="value"> An <see cref="T:System.Data.Common.RowUpdatingEventArgs" /> that contains the event data. </param>
 protected override void OnRowUpdating(RowUpdatingEventArgs value)
 {
   if (RowUpdating != null)
     RowUpdating(this, (value as CUBRIDRowUpdatingEventArgs));
 }
开发者ID:CUBRID,项目名称:cubrid-adonet,代码行数:9,代码来源:CUBRIDDataAdapter.cs

示例15: OnRowUpdating

		protected override void OnRowUpdating(RowUpdatingEventArgs value) {
			if (this.RowUpdating != null) {
				this.RowUpdating(this, value as MySqlRowUpdatingEventArgs);
			}
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:5,代码来源:MySqlDataAdapter.cs


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