Author: krasnov
Date: 2007-01-11 04:57:25 -0500 (Thu, 11 Jan 2007)
New Revision: 70845
Modified:
trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
trunk/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSourceView.cs
Log:
* SqlDataSourceView.cs: fixed OnUpdating, OnInserting call with
SqlDataSourceCommandEventArgs
Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-01-11 09:46:00 UTC (rev 70844)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-01-11 09:57:25 UTC (rev 70845)
@@ -1,3 +1,8 @@
+2007-01-11 Vladimir Krasnov <[EMAIL PROTECTED]>
+
+ * SqlDataSourceView.cs: fixed OnUpdating, OnInserting call with
+ SqlDataSourceCommandEventArgs
+
2007-01-10 Konstantin Triger <[EMAIL PROTECTED]>
* ObjectDataSourceView.cs: use case unsensitive comparer for
Modified:
trunk/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSourceView.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSourceView.cs
2007-01-11 09:46:00 UTC (rev 70844)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSourceView.cs
2007-01-11 09:57:25 UTC (rev 70845)
@@ -148,7 +148,10 @@
InitializeParameters (command, InsertParameters,
values, null);
- OnInserting (new SqlDataSourceCommandEventArgs
(command));
+ SqlDataSourceCommandEventArgs args = new
SqlDataSourceCommandEventArgs (command);
+ OnInserting (args);
+ if (args.Cancel)
+ return -1;
bool closed = connection.State ==
ConnectionState.Closed;
if (closed)
@@ -323,7 +326,10 @@
InitializeParameters (command, UpdateParameters,
dataValues, oldDataValues);
- OnUpdating (new SqlDataSourceCommandEventArgs
(command));
+ SqlDataSourceCommandEventArgs args = new
SqlDataSourceCommandEventArgs (command);
+ OnUpdating (args);
+ if (args.Cancel)
+ return -1;
bool closed = connection.State ==
ConnectionState.Closed;
if (closed)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches