public Protocols.ToolkitResultProtocol AddContactToContract(System.String contractIDNum, System.String contactFirstName, System.String contactLastName, System.String contactPhone, System.String siteIDNum) { ClarifySession session = Global.GetSession( AuthHeader ); FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit toolkit = new FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit( session ); return new Protocols.ToolkitResultProtocol( toolkit.AddContactToContract(contractIDNum, contactFirstName, contactLastName, contactPhone, siteIDNum) ); }
public Protocols.ToolkitResultProtocol AddContactToContract(Protocols.Interfaces.AddContactToContractSetupProtocol setupParam) { ClarifySession session = Global.GetSession( AuthHeader ); FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit toolkit = new FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit( session ); FChoice.Toolkits.Clarify.Interfaces.AddContactToContractSetup setup; switch( setupParam.ConstructorCue ) { case 0: setup = new FChoice.Toolkits.Clarify.Interfaces.AddContactToContractSetup(setupParam.ContractIDNum, setupParam.ContactFirstName, setupParam.ContactLastName, setupParam.ContactPhone, setupParam.SiteIDNum); break; default: throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue)); } if( Global.IsPropertyDirty(1, setupParam.DirtyFieldFlags) ) { setup.ContractIDNum = setupParam.ContractIDNum; } if( Global.IsPropertyDirty(2, setupParam.DirtyFieldFlags) ) { setup.ContactFirstName = setupParam.ContactFirstName; } if( Global.IsPropertyDirty(4, setupParam.DirtyFieldFlags) ) { setup.ContactLastName = setupParam.ContactLastName; } if( Global.IsPropertyDirty(8, setupParam.DirtyFieldFlags) ) { setup.ContactPhone = setupParam.ContactPhone; } if( Global.IsPropertyDirty(16, setupParam.DirtyFieldFlags) ) { setup.SiteIDNum = setupParam.SiteIDNum; } return new Protocols.ToolkitResultProtocol( toolkit.AddContactToContract(setup) ); }