Note that there are some explanatory texts on larger screens.

plurals
  1. POSilverlight RIA Services Data
    primarykey
    data
    text
    <p>I've been trying to figure out how to access data from my Silverlight application for a few days, now.</p> <p>I want to use a data class and a business class already written.</p> <p>Based on some advice from another post I created a Silverlight Business application. The Code to access the data is in a Domain Service class in my Web Application. This is called from the Silveright application.</p> <p>I think I'm close but I don't have the syntax quite right.</p> <p>Here is the code in my Domain Service Class</p> <pre><code>Public Function GetGridData() As IEnumerable(Of Submissions) Dim dtResults As DataTable Dim _ConnectionString As String = _ "Password=xxxx;Persist Security Info=True;User ID=xxxx;Initial Catalog=APCD;Data Source=xxxx" mdsResults = s.GetSubmissions(3, 0, _ConnectionString,"2011", "0", False) dtResults = mdsResults.Tables(0) Dim MySubmissions = New List(Of Submissions )() For Each row As DataRow In dtResults.Rows Dim MySubmission = New Submissions() With { _ .SubmissionControlId = Convert.ToString(row("SubmissionControlId" )), _ .OrgId = Convert.ToString(row("Org Id" )), _ .DateProcessed = Convert.ToString(row("DateProcessed")) _ } MySubmissions.Add(MySubmission) Next Return MySubmissions End Function The code in the silverlght page is Dim x As New Web.CustomerDomainContext grdSubmissions.DataContext = x.GetGridData() </code></pre> <p>It all compiled and runs but the grid is empty. I know from stepping through that Stored Procedure does contain data.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload