Help in accessing a class

M

Moojjoo

I have created an mySchema.cs file from the scheme myScheme.xsd from an
InfoPath form using XSD.exe I then created a Web services using the
mySchema.cs to access the data to input the data into a backend SQL Server
for later SQL Reporting.

I have completed the db scheme for reporting and the SQL Report and must say
it looks sweet.

Now to my problem:

The schema of the Data Source in the InfoPath form has a nested, nested
group such as the following:

myFields
- Group1
- RepeatingGroup1 (no problem getting to this data)
- GroupInSideGroup2
- RepeatingGroup2 (cannot get to this data or better yet I do not
know how)

Below is the code I am using


[WebMethod]
public void SubmitForm(myFields newForm)
{
DatabaseHelper db = new DatabaseHelper();

This works fine
//Code to Insert Objectives
// KeyRisks = RiskAssessment[] myFields.KeyRisks
foreach (Object businessObjective in newForm.KeyRisks)
{
db.AddParameter("@SumID", sumID);
db.AddParameter("@RaID", raID);
db.AddParameter("@Objective",
((XXX.CoveragePlan.WebService.BusObjective)(businessObjective)).BusObjective1);
db.ExecuteNonQuery("InsertObjective");
}
}

newForm does not seem to let me access the nested, nested group. Any help
would be great. If you need more details let me know.
 
M

Moojjoo

Prayer works - I found the solution.

The problem was not in the CLASS file but rather in the InfoPath form.

In order to access that data you have to pass the deep groups of data as
seperate parameters.

You have to explicity tell the InfoPath for what root elements to pass in
the parameter so it will pass the root and child only.

So to all you InfoPather's be informed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top