Pay Run group action

Pay Run group action

Old forum URL: forums.lhotka.net/forums/t/1701.aspx


Wal972 posted on Tuesday, November 07, 2006

Hi Guys,

I have a payrun root list object which contain individual pays (root busines object). Now my question is this, how would you go about a group save for the pays and not activating until a required at the end. So it's all or nothing.

Thanks

ajj3085 replied on Tuesday, November 07, 2006

You mean you want to update the database within a transaction?  You can h andle it manually (and if you're using Csla 1.x you'll have to do it this way) or in Csla 2  you can use the Transactional attribute and specify TransactionScope.

Wal972 replied on Tuesday, November 07, 2006

no i want active the save on the pay one after the other, not the database activity

malloc1024 replied on Tuesday, November 07, 2006

I am not exactly sure what you are asking but I will try to help.  The Payrun class inherits from BusinessListBase and the Pay class inherits from the BusinessBase correct?  When you edit or add a Pay object you would call ApplyEdit on it.  When you are done editing all the Pay objects, you would call Save on the Payrun class to save all the Pay objects at once.

Copyright (c) Marimer LLC