I am creating my first Remote Service Method and I want to make sure that I get the first one right as I will have about 5 of these in the app.
I have a class named MemberBalanceCalculator. The purpose of the class is to sift through all of a members assessments and payments and figure out a balance owing.
The class is located in the LaborWareWeb app and in a directory called RemoteCalls.
The method to call in the MemberBalanceCalculator is CalculateAmountOwing.
So what is the code going to look like on the client side? How can I pass a complex object to a Remote Service Method. I need to pass a member object or should I pass the string SSN and have the remote service method look up the member and read it into memory?
public void CalculateBalance(string ssn) // what if I want to pass over the member object instead of just the ssn?
{
string typeName = LaborWareWeb.RemoteCalls.MemberBalanceCalculator, LaborWareWeb";
string methodName = "CalculateAmountOwing";
var op = Mgr.InvokeServerMethodAsync(typeName, methodName, null, null, ssn);
op.Completed += (o, args) => {
//refresh member object in memory to display the new updated values on the view.
}
}
Do I need to make any entries in the web config to tell it about this remote service method?
Bill