public Protocols.ToolkitResultProtocol CreateSite(Protocols.Interfaces.CreateSiteSetupProtocol setupParam)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit toolkit = new FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit( session );
            FChoice.Toolkits.Clarify.Interfaces.CreateSiteSetup setup;

            switch( setupParam.ConstructorCue )
            {
                case 0:
                    setup = new FChoice.Toolkits.Clarify.Interfaces.CreateSiteSetup(setupParam.SiteType, setupParam.Status, setupParam.PrimaryAddressObjid);
                    break;
                default:
                    throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue));
            }

            if( Global.IsPropertyDirty(2, setupParam.DirtyFieldFlags) )
            {
                setup.SiteIDNum = setupParam.SiteIDNum;
            }

            if( Global.IsPropertyDirty(4, setupParam.DirtyFieldFlags) )
            {
                setup.SiteName = setupParam.SiteName;
            }

            if( Global.IsPropertyDirty(8, setupParam.DirtyFieldFlags) )
            {
                setup.SiteType = setupParam.SiteType;
            }

            if( Global.IsPropertyDirty(16, setupParam.DirtyFieldFlags) )
            {
                setup.AccountIDNum = setupParam.AccountIDNum;
            }

            if( Global.IsPropertyDirty(32, setupParam.DirtyFieldFlags) )
            {
                setup.Status = setupParam.Status;
            }

            if( Global.IsPropertyDirty(64, setupParam.DirtyFieldFlags) )
            {
                setup.Region = setupParam.Region;
            }

            if( Global.IsPropertyDirty(128, setupParam.DirtyFieldFlags) )
            {
                setup.District = setupParam.District;
            }

            if( Global.IsPropertyDirty(256, setupParam.DirtyFieldFlags) )
            {
                setup.IndustryType = setupParam.IndustryType;
            }

            if( Global.IsPropertyDirty(512, setupParam.DirtyFieldFlags) )
            {
                setup.PrimaryUse = setupParam.PrimaryUse;
            }

            if( Global.IsPropertyDirty(1024, setupParam.DirtyFieldFlags) )
            {
                setup.PrimaryAddressObjid = setupParam.PrimaryAddressObjid;
            }

            if( Global.IsPropertyDirty(2048, setupParam.DirtyFieldFlags) )
            {
                setup.ShippingAddressObjid = setupParam.ShippingAddressObjid;
            }

            if( Global.IsPropertyDirty(4096, setupParam.DirtyFieldFlags) )
            {
                setup.BillingAddressObjid = setupParam.BillingAddressObjid;
            }

            if( Global.IsPropertyDirty(8192, setupParam.DirtyFieldFlags) )
            {
                setup.ParentSiteIDNum = setupParam.ParentSiteIDNum;
            }

            if( Global.IsPropertyDirty(16384, setupParam.DirtyFieldFlags) )
            {
                setup.SupportOfficeSiteIDNum = setupParam.SupportOfficeSiteIDNum;
            }

            if( Global.IsPropertyDirty(32768, setupParam.DirtyFieldFlags) )
            {
                setup.PrimarySupportEmployeeObjid = setupParam.PrimarySupportEmployeeObjid;
            }

            if( Global.IsPropertyDirty(65536, setupParam.DirtyFieldFlags) )
            {
                setup.SecondarySupportEmployeeObjid = setupParam.SecondarySupportEmployeeObjid;
            }

            if( Global.IsPropertyDirty(131072, setupParam.DirtyFieldFlags) )
            {
                foreach(Protocols.AdditionalFieldProtocol field in setupParam.AdditionalFields){setup.AdditionalFields.Append( field.FieldName, field.FieldType, field.FieldValue);}
            }

            return new Protocols.ToolkitResultProtocol( toolkit.CreateSite(setup) );
        }
        public Protocols.ToolkitResultProtocol CreateSite(FChoice.Toolkits.Clarify.SiteType siteType, FChoice.Toolkits.Clarify.SiteStatus status, System.Int32 primaryAddressObjid)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit toolkit = new FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit( session );

            return new Protocols.ToolkitResultProtocol( toolkit.CreateSite(siteType, status, primaryAddressObjid) );
        }