Typed List

Posts   
 
    
shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 10-Jun-2013 14:32:03   

LLBLGEN V 4.0 .NET Framework 4.0 LLBLGEN Runtime Framework

Hi, I have a typed list _title.

What I am doing is I am loading the typedlist _title with following code.


   _filter.Clear()
            _sorter = Nothing
            _filter = New PredicateExpression(TitleFields.Flag = VariableClass.Flagvalid)
            _sorter = New SortExpression(TitleFields.Description Or SortOperator.Ascending)
            _title.Fill(0, _sorter, True, _filter)

Then I am deleting a record from Database with following code.


   Dim titleuow = New UnitOfWork()
            Dim title = New TitleEntity(titleid)
            title.IsNew = False
            title.Modifieddate = DateTimeClass.Currentdatetime()
            title.Modifieduserid = VariableClass.Userid
            title.Flag = VariableClass.FlagInvalid
            titleuow.AddForSave(title)
            Dim succeed = titleuow.Commit(New Transaction(IsolationLevel.ReadCommitted, "UOW"), True)
            Return succeed

Then reloading typed list _tile with the same code as above.

But the _title datatable still holds the deleted record. If I close the form and reopen it shows correct. Any idea what is wrong ?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 10-Jun-2013 18:20:06   

Make sure to clear the dataTable (_title) or re-instantiate it before filling it.

shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 11-Jun-2013 07:02:03   

Walaa wrote:

Make sure to clear the dataTable (_title) or re-instantiate it before filling it.

Thanks a lot smile