StrataFrame Forum

Work with Transactions

http://forum.strataframe.net/Topic29504.aspx

By Malcon - 2/4/2011

I'm having a problem and questions regarding the transaction control of SF.
In the case below, if the present boOrdemdeServico (Business of Service Orders) mistake, he should not have to deal, or not save the boMateriaisOS (in english Products of Service) and boServicosOS (Services from Service Order) of the Service Orders?

In this case, the BoOrdensDeServico return "SaveUndoResult.AbortedWithBrokenRules
" in Save method.     

Below, my code:

                    try
                   {
                        BusinessLayer.TransactionBegin("", IsolationLevel.Unspecified);
                        AjustaMateriaisServicos();
                        boOrdensDeServico.Save(true);
                        boMateriaisOS.Save(true);
                        boServicosOS.Save(true);
                        BusinessLayer.TransactionCommit("");
                    }
                    catch(Exception ex)
                    {
                        BusinessLayer.TransactionRollback("");
                        Log.LogInfo(ex);
                    }

What am I missing?
By Ivan George Borges - 2/6/2011

Hi Malcon.

This is a good post on the subject:

http://forum.strataframe.net/FindPost3038.aspx