¶
2.13.3.Propagate Updates to Virtuoso
-
Add a 'Submit' button just after the DataForm in MainPage.xaml by adding the following code.
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,12,0,0"> <Button x:Name="submitButton" Width="75" Height="23" Content="Submit" Margin="4,0,0,0" Click="submitButton_Click"/> </StackPanel>
-
Handle the button click event in MainPage.xaml.cs by adding the following code:
private void submitButton_Click(object sender, RoutedEventArgs e) { EmployeeDataSource.SubmitChanges(); }
-
Build and run the application. If you now edit data in the form and click the submit button the data in Virtuoso will be updated.
Figure2.184..NET RIA Services Application