Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Re: Child tables Saved when saveResult = RuleWarnings
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Re: Child tables Saved when saveResult = RuleWarnings
Miscellaneous
Thread ID:
01315722
Message ID:
01315722
Views:
46
* UPDATE
* Before you read any further, the supposed error below is by design
* in MM .NET Developer's Guide - Saving DataSets using Business Objects
*
* RuleWarnings = 3 (Warnings only - data is saved)
*
* I had assumed that the data was NOT saved on RuleWarnings
* UNTIL the user confirmed "overriding" the warnings
* by clicking save a second time (Save Anyway).
* Which is the client's requirement.

I need a different "warning" which prevents INITIAL saves
and allows subsequent ones.

I think I can kludge this by:
1) adding a bool "AlreadyWarned" to ABusinessRule.
2) having a session object to save warnings
3) changing Save and Rules code to check warnings against session warnings
if the same, let it save (don't create warnings again)
be nice to make sure data didn't change as well...
4) overriding public override mmSaveDataResult SaveDataSet() in ABusinessObject
making only one change:
// Save data only if no business rules were broken
// if ( Result != mmSaveDataResult.RulesBroken 
//   && Result != mmSaveDataResult.SaveCanceled)
// !!! change to NOT save on Warnings
if (Result != mmSaveDataResult.RuleWarnings 
 && Result != mmSaveDataResult.RulesBroken 
 && Result != mmSaveDataResult.SaveCanceled)
//...
--- original text below -----------------

MM.NET Version 2.4

(goofed by not sending previous post to Kevin McNeish)

Hi Kevin,

regarding http://www.levelextreme.com/wconnect/wc.dll?2,15,1315702
I'm trying to figure out whether to override which code for a quick fix (deadline...)
in mmBusinessObject.cs:
protected virtual mmSaveDataResult CheckRules()
or
public virtual mmSaveDataResult SaveDataSet()

Please, can you quickly explain the mechanism where RuleWarnings DON'T happen on the SECOND save, when there are previous warnings (no rules broken)? This would help greatly.

Thanks!
Reply
Map
View

Click here to load this message in the networking platform