Using a ChildFormDialog with same BO
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Using a ChildFormDialog with same BOExpand / Collapse
Author
Message
Posted 04/28/2008 9:23:31 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/16/2008 12:26:47 PM
Posts: 405, Visits: 1,682
Hi,

I am trying to do the following:

I have a form with some fields I would like to modify using a ChildFormDialog.  I have setup all properties and it is working just fine when adding, editing this record, the information is translated back to the parent form, but when I try to Undo it will perform an Undo in the whole record including data in the parent form. 

Is there a way to control what fields to Undo in the translated BO in the ChildFormDialog?

So far, I have not find a way to just undo specifics fields in the BO.  Since this ChildFormDialog will only modify 5 fields of this BO, I may need to create these properties in the form so I can have control of Undoing any changes in the ChildFormDialog.

Edhy Rijo
Progytech (Computer Consultants)
Post #15942
Posted 04/28/2008 9:56:24 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 9:36:54 PM
Posts: 4,200, Visits: 4,251
I have never actually had this need...nor have I heard of this need.  You can undo 3 different ways:

MyBo.Undo(AllRows)
MyBo.Undo(CurrentRowOnly)

In the 1.6.6 beta there is a new option to undo by a filter:

MyBo.UndoByFilter("FilterExpression ")

If you want to "Undo" certain fields, then you will need to cycle through the current row and replace the Current value with the OriginalValue:

MyBo.CurrentRow.Item("MyFieldname") = MyBo.CurrentRow.Item("MyFieldName",DataRowVersion.Original)
Post #15945
Posted 04/28/2008 10:17:26 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/16/2008 12:26:47 PM
Posts: 405, Visits: 1,682
Trent L. Taylor (04/28/2008)
MyBo.CurrentRow.Item("MyFieldname") = MyBo.CurrentRow.Item("MyFieldName",DataRowVersion.Original)

Hi trent, using the DataRowVersion.Original give me what I wanted, also I found that the TextBoxBase control has an Undo() method which will also provide this need.

Even though you have not have this need, in VFP I have make a lot of use of the functions CURVAL() & OLVAL() for this type of scenarios and I think it would be a good idea to have a more direct access to the DataRowVersion.Original and maybe it could be an enhancement to add a property to the BO which will return this value for easy use by the developer.   Again, this is just a though

Thanks for the recommendations!

Edhy Rijo
Progytech (Computer Consultants)
Post #15949
Posted 04/28/2008 11:39:14 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 9:36:54 PM
Posts: 4,200, Visits: 4,251
The row level stuff that I menteioned is the OLDVAL and CURVAL route in ADO.NET.
Post #15957
« 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 12:06am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 10 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.