New Posts New Posts RSS Feed: What am I missing in this RemoteServerMethod call
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

What am I missing in this RemoteServerMethod call

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: What am I missing in this RemoteServerMethod call
    Posted: 30-Dec-2010 at 11:24am
So in my LaorWare2011Web project I have a folder named RemoteCalls and in there is a class called MemberBalanceCalculator defined as follows:
 
namespace LaborWare2011Web.RemoteCalls
{
      public static class MemberBalanceCalculator
      {
 
             [AllowRpc]
             public static object CalculateAmountOwing(Member member)
            {
                     // a bunch of calculations.......
 
                     return member;
             }
      }
}
 
In my MemberEditViewModel class, I have a method that will call this remote method.
 
public void CalculateBalance()
{
      string typeName = "LaborWare2011Web.RemoteCalls.MemberBalanceCalculator, LaborWare2011Web";
      string methodName = "CalculateAmountOwing";
      var op = Mgr.InvokeServerMethodAsync(typeName, methodName, null, CurrentMember);
      op.Completed += (o, args) => {
      };
}
 
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 30-Dec-2010 at 12:09pm

The signature for your remote method should be

public static Object CalculateAmountOwing(IPrincipal pPrincipal, EntityManager pPm, params Object[] pArgs)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down