Beispiel #1
0
 private void OnOracleRowUpdated(object sender, OracleRowUpdatedEventArgs args)
 {
     if ((args.RecordsAffected == 0) && (args.Errors != null))
     {
         args.Row.RowError = Resources.ExceptionMessageUpdateDataSetRowFailure;
         args.Status = UpdateStatus.SkipCurrentRow;
     }
 }
        //为一个支持UpdateBehavior.Continue的DataAdapter对象监听RowUpdate事件
		private void OnOracleRowUpdated(object sender, OracleRowUpdatedEventArgs args)
		{
			if (args.RecordsAffected == 0)
			{
				if (args.Errors != null)
				{
                    args.Row.RowError = Resources.Data.RowUpdateFailed;
					args.Status = UpdateStatus.SkipCurrentRow;
				}
			}
		}
		private void oleDBda_RowUpdated(object sender, OracleRowUpdatedEventArgs e)
		{
			Exception exp = null;
			switch (e.StatementType)
			{
				case StatementType.Insert: 
					try
					{
						BeginCase("RowInsert");
						Compare(drInsert ,e.Row );
					}
					catch(Exception ex)	{exp = ex;}
					finally	{EndCase(exp); exp = null;}
					EventCounter++;
					break;
				case StatementType.Delete:
					try
					{
						BeginCase("RowDelete");
						Compare(drDelete ,e.Row );
					}
					catch(Exception ex)	{exp = ex;}
					finally	{EndCase(exp); exp = null;}
					EventCounter++;
					break;
				case StatementType.Update:
					try
					{
						BeginCase("RowUpdate");
						Compare(drUpdate ,e.Row );
					}
					catch(Exception ex)	{exp = ex;}
					finally	{EndCase(exp); exp = null;}
					EventCounter++;
					break;
			}
		}
Beispiel #4
0
 /// <summary>
 /// Handles the RowUpdated event
 /// </summary>
 /// <param name="obj">The object that published the event</param>
 /// <param name="e">The OracleRowUpdatedEventArgs</param>
 protected void RowUpdated(object obj, OracleRowUpdatedEventArgs e)
 {
     base.RowUpdated(obj, e);
 }