CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Update after Search in WPF CSLA not working

rated by 0 users
Not Answered This post has 0 verified answers | 0 Replies | 1 Follower

Not Ranked
10 Posts
harrykod posted on Wed, Jun 27 2012 3:16 PM

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

 

Page 1 of 1 (1 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems