public Protocols.ToolkitResultProtocol DispatchFieldEngineer(Protocols.FieldOps.DispatchFieldEngineerSetupProtocol setupParam)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.FieldOps.FieldOpsToolkit toolkit = new FChoice.Toolkits.Clarify.FieldOps.FieldOpsToolkit( session );
            FChoice.Toolkits.Clarify.FieldOps.DispatchFieldEngineerSetup setup;

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

            if( Global.IsPropertyDirty(1, setupParam.DirtyFieldFlags) )
            {
                setup.CaseIDNum = setupParam.CaseIDNum;
            }

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

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

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

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

            if( Global.IsPropertyDirty(32, setupParam.DirtyFieldFlags) )
            {
                setup.Duration = TimeSpan.FromSeconds(setupParam.Duration);
            }

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

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

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

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

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

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

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

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

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

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

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

            if( Global.IsPropertyDirty(131072, setupParam.DirtyFieldFlags) )
            {
                setup.PaymentMethod = setupParam.PaymentMethod;
            }

            if( Global.IsPropertyDirty(262144, setupParam.DirtyFieldFlags) )
            {
                setup.ReferenceNumber = setupParam.ReferenceNumber;
            }

            if( Global.IsPropertyDirty(524288, setupParam.DirtyFieldFlags) )
            {
                setup.Notes = setupParam.Notes;
            }

            if( Global.IsPropertyDirty(1048576, setupParam.DirtyFieldFlags) )
            {
                setup.RequestedETADate = setupParam.RequestedETADate;
            }

            if( Global.IsPropertyDirty(2097152, setupParam.DirtyFieldFlags) )
            {
                setup.AppointmentConfirmed = setupParam.AppointmentConfirmed;
            }

            if( Global.IsPropertyDirty(4194304, setupParam.DirtyFieldFlags) )
            {
                setup.CellText = setupParam.CellText;
            }

            if( Global.IsPropertyDirty(8388608, setupParam.DirtyFieldFlags) )
            {
                setup.Proxy = setupParam.Proxy;
            }

            if( Global.IsPropertyDirty(33554432, setupParam.DirtyFieldFlags) )
            {
                setup.GenerateTimeBombs = setupParam.GenerateTimeBombs;
            }

            return new Protocols.ToolkitResultProtocol( toolkit.DispatchFieldEngineer(setup) );
        }
        public Protocols.ToolkitResultProtocol DispatchFieldEngineer(System.String caseIDNum)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.FieldOps.FieldOpsToolkit toolkit = new FChoice.Toolkits.Clarify.FieldOps.FieldOpsToolkit( session );

            return new Protocols.ToolkitResultProtocol( toolkit.DispatchFieldEngineer(caseIDNum) );
        }