• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Common.RowUpdatingEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: OnRowUpdating

        private void OnRowUpdating(Object sender, RowUpdatingEventArgs args)
        {
            // make sure we are still to proceed
            if (args.Status != UpdateStatus.Continue) return;

            switch( args.StatementType )
            {
                case StatementType.Delete:	args.Command = GetDeleteCommand();	break;
                case StatementType.Update:	args.Command = GetUpdateCommand();	break;
                case StatementType.Insert:	args.Command = GetInsertCommand();	break;
                default:	return;
            }

            SetParameterValues(args.Command, args.Row);
        }
开发者ID:anelson,项目名称:mercury_test,代码行数:15,代码来源:CommandBuilder.cs


示例17: OnRowUpdating

 protected override void OnRowUpdating(RowUpdatingEventArgs value)
 {
     CrmDataAdapterRowUpdatingEventHandler handler = (CrmDataAdapterRowUpdatingEventHandler)Events[EventRowUpdating];
     if ((null != handler) && (value is CrmDataAdapterRowUpdatingEventArgs))
     {
         handler(this, (CrmDataAdapterRowUpdatingEventArgs)value);
     }
 }
开发者ID:YOTOV-LIMITED,项目名称:CrmAdo,代码行数:8,代码来源:CrmDataAdaptor.cs


示例18: OnRowUpdating

 virtual protected void OnRowUpdating(RowUpdatingEventArgs value) { // V1.0.3300
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:2,代码来源:DbDataAdapter.cs


示例19: OnRowUpdating

 override protected void OnRowUpdating(RowUpdatingEventArgs value)
 {
     VirtuosoRowUpdatingEventHandler handler = (VirtuosoRowUpdatingEventHandler) Events[EventRowUpdating];
     if ((null != handler) && (value is VirtuosoRowUpdatingEventArgs)) 
     {
         handler(this, (VirtuosoRowUpdatingEventArgs) value);
     }
 }
开发者ID:kyriakosbrastianos,项目名称:virtuoso-opensource,代码行数:8,代码来源:VirtuosoDataAdapter.cs


示例20: OnRowUpdating

 override protected void OnRowUpdating(RowUpdatingEventArgs value) {
     SqlRowUpdatingEventHandler handler = (SqlRowUpdatingEventHandler) Events[EventRowUpdating];
     if ((null != handler) && (value is SqlRowUpdatingEventArgs)) {
         handler(this, (SqlRowUpdatingEventArgs) value);
     }
     base.OnRowUpdating(value);
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:7,代码来源:SqlDataAdapter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CommandTrees.DbCommandTree类代码示例发布时间:2022-05-26
下一篇:
C# Common.RowUpdatedEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap