public Protocols.ToolkitResultProtocol AssignLead(Protocols.Sales.AssignLeadSetupProtocol setupParam) { ClarifySession session = Global.GetSession( AuthHeader ); FChoice.Toolkits.Clarify.Sales.SalesToolkit toolkit = new FChoice.Toolkits.Clarify.Sales.SalesToolkit( session ); FChoice.Toolkits.Clarify.Sales.AssignLeadSetup setup; switch( setupParam.ConstructorCue ) { case 0: setup = new FChoice.Toolkits.Clarify.Sales.AssignLeadSetup(setupParam.LeadObjid, setupParam.NewOwner); break; default: throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue)); } if( Global.IsPropertyDirty(1, setupParam.DirtyFieldFlags) ) { setup.LeadObjid = setupParam.LeadObjid; } if( Global.IsPropertyDirty(2, setupParam.DirtyFieldFlags) ) { setup.NewOwner = setupParam.NewOwner; } if( Global.IsPropertyDirty(4, setupParam.DirtyFieldFlags) ) { setup.AssignDate = setupParam.AssignDate; } if( Global.IsPropertyDirty(8, setupParam.DirtyFieldFlags) ) { setup.GenerateTimeBombs = setupParam.GenerateTimeBombs; } return new Protocols.ToolkitResultProtocol( toolkit.AssignLead(setup) ); }
public Protocols.ToolkitResultProtocol AssignLead(System.Int32 leadObjid, System.String newOwner) { ClarifySession session = Global.GetSession( AuthHeader ); FChoice.Toolkits.Clarify.Sales.SalesToolkit toolkit = new FChoice.Toolkits.Clarify.Sales.SalesToolkit( session ); return new Protocols.ToolkitResultProtocol( toolkit.AssignLead(leadObjid, newOwner) ); }