StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



BO IsDirty PropertyExpand / Collapse
Author
Message
Posted 06/03/2006 3:22:27 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 10/10/2008 3:41:17 PM
Posts: 363, Visits: 1,805

It appears that when a row is placed in editing state using a standard SF maintenance window the row’s IsDirty property is set to true even if no fields are modified.  I’m using the primary BO on the form only to retrieve another BO that I wish to edit. I’m not making any changes to the primary BO.

 

To get around the issue of having the framework prompt me with a “do you wish to save…” message I’m using the primary BO’s BeforeSave event to do an Undo on the primary BO’s current row. This allows the “save message” to be automatically be displayed for the other object but not the primary.

 

It would seem that the row shouldn’t be set dirty if no fields were modified.  Is this by design or is it a bug?

 

-Larry

 

Post #1369
Posted 06/04/2006 9:08:33 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 09/26/2008 8:30:36 AM
Posts: 2,685, Visits: 1,886
That functionality is by design, actually.  When you call edit on the business object, the current DataRow is automatically set to Modified.  The reason for this is that the business rules are never checked unless the record is in a modified state.  So, to force the business rules check when a record is edited, it first had to be set to modifed. 

I'll look into some other ways for you to get around that functionality.


www.bungie.net
Post #1378
Posted 06/05/2006 10:50:43 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 09/26/2008 8:30:36 AM
Posts: 2,685, Visits: 1,886
I added a SetDirtyOnEdit Boolean property to BusinessLayer that defaults to False. It functions just like the method implies: If it's True, then the record is set to dirty when Edit() is called; if it's set to False, the record is not set to dirty when Edit() is called, but rather waits until some data has changed.

It will be available in the next release.


www.bungie.net
Post #1388
Posted 06/05/2006 1:00:03 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 10/10/2008 3:41:17 PM
Posts: 363, Visits: 1,805
Thanks! I like it

-Larry

Post #1393
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:15am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.094. 8 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.