Update after Search in WPF CSLA not working

Update after Search in WPF CSLA not working

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


harrykod posted on Wednesday, June 27, 2012

i have a patient and i have notes as the child object of the patient.
once the patient and the notes load i need to be able to search the notes.
The search works well but after the search when i update the child record it does not get updated.
Any ideas why this is happening?

My code is as follows:

MainWindow.xaml

<views:NoteView DataContext ={Bindiing NotesViewModel}"/>

NotesView.xaml

 <TextBox Name="txtSearch" Grid.Row="0"/>
 <ItemsControl ItemsSource="{Binding Model}" >
 <ItemsControl.ItemTemplate>
                    <DataTemplate>
                       <TextBox Text={binding Col"/>
                                      
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
NotesViewModel
 public void Search(object sender, Csla.Xaml.ExecuteEventArgs e)
  {
  BeginRefresh(callback => Notes.GetAll(1, e.MethodParameter.ToString(),callback));
   }


Notes.cs (CSLA Model)
  public static void GetAll(long patientID, string notes1, EventHandler<DataPortalResult<Notes>> callback)
        {
            DataPortal.BeginFetch<Notes>(new Note { PatientID = patientID, Notes1 = notes1 }, callback);
        }

Can somebody help me figure out what is wrong?

I can update my records without a problem when the records are initially loaded but having a problem after the search

 

Copyright (c) Marimer LLC