2002-11-04 Tim Coleman <tim@timcoleman.com>
[mono.git] / mcs / class / System.Data / System.Data.Common / RowUpdatingEventArgs.cs
1 //
2 // System.Data.Common.RowUpdatingEventArgs.cs
3 //
4 // Author:
5 //   Rodrigo Moya (rodrigo@ximian.com)
6 //   Tim Coleman (tim@timcoleman.com)
7 //
8 // (C) Ximian, Inc
9 // Copyright (C) Tim Coleman, 2002
10 //
11
12 namespace System.Data.Common {
13         public abstract class RowUpdatingEventArgs : EventArgs
14         {
15                 #region Fields
16
17                 DataRow dataRow;
18                 IDbCommand command;
19                 StatementType statementType;
20                 DataTableMapping tableMapping;
21                 UpdateStatus status;
22                 Exception errors;
23
24                 #endregion // Fields
25
26                 #region Constructors
27
28                 protected RowUpdatingEventArgs (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) 
29                 {
30                         this.dataRow = dataRow;
31                         this.command = command;
32                         this.statementType = statementType;
33                         this.tableMapping = tableMapping;
34                         this.status = UpdateStatus.Continue;
35                         this.errors = null;
36                 }
37
38                 #endregion // Constructors
39
40                 #region Properties
41                 
42                 public IDbCommand Command {
43                         get { return command; }
44                         set { command = value; }
45                 }
46
47                 public Exception Errors {
48                         get { return errors; }
49                         set { errors = value; }
50                 }
51
52                 public DataRow Row {
53                         get { return dataRow; }
54                 }
55
56                 public StatementType StatementType {
57                         get { return statementType; }
58                 }
59
60                 public UpdateStatus Status {
61                         get { return status; }
62                         set { status = value; }
63                 }
64
65                 public DataTableMapping TableMapping {
66                         get { return tableMapping; }
67                 }
68
69                 #endregion // Properties
70         }
71 }