public Protocols.ToolkitResultProtocol UpdateEcoItem(Protocols.DepotRepair.UpdateEcoItemSetupProtocol setupParam)
        {
            ClarifySession session = Global.GetSession(AuthHeader);

            FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session);
            FChoice.Toolkits.Clarify.DepotRepair.UpdateEcoItemSetup setup;

            switch (setupParam.ConstructorCue)
            {
            case 0:
                setup = new FChoice.Toolkits.Clarify.DepotRepair.UpdateEcoItemSetup(setupParam.EcoItemObjid, setupParam.IsActive, setupParam.EcoHeaderIDNum);
                break;

            default:
                throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue));
            }

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

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

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

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

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

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


            return(new Protocols.ToolkitResultProtocol(toolkit.UpdateEcoItem(setup)));
        }
        public Protocols.ToolkitResultProtocol UpdateEcoItem(Protocols.DepotRepair.UpdateEcoItemSetupProtocol setupParam)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit( session );
            FChoice.Toolkits.Clarify.DepotRepair.UpdateEcoItemSetup setup;

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

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

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

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

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

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

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

            return new Protocols.ToolkitResultProtocol( toolkit.UpdateEcoItem(setup) );
        }