コード例 #1
0
        private void sqlDa_RowUpdated(object sender, SqlRowUpdatedEventArgs 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;
            }
        }
コード例 #2
0
 private void OnRowUpdated(object sender, SqlRowUpdatedEventArgs args)
 {
     System.Exception exp = default(System.Exception);
     exp = args.Errors;
     try
     {
         if ((exp != null))
         {
             args.Status = UpdateStatus.Continue;
         }
         //Else
         // If fieldName <> "" Then
         // If affectedLeadId <> "" Then
         // affectedLeadId = affectedLeadId & "," & CStr(args.Row.Item(fieldName))
         // Else
         // affectedLeadId = CStr(args.Row.Item(fieldName))
         // End If
         // End If
     }
     catch (Exception ex)
     {
     }
 }