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

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

            switch (setupParam.ConstructorCue)
            {
            case 0:
                setup = new FChoice.Toolkits.Clarify.DepotRepair.UpdateEcoMaterialDetailSetup(setupParam.EcoDetailObjid, setupParam.PartRevisionObjid);
                break;

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

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

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

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

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

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

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

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

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


            return(new Protocols.ToolkitResultProtocol(toolkit.UpdateEcoMaterialDetail(setup)));
        }
        public Protocols.ToolkitResultProtocol UpdateEcoMaterialDetail(System.Int32 ecoDetailObjid, System.Int32 partRevisionObjid)
        {
            ClarifySession session = Global.GetSession(AuthHeader);

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

            return(new Protocols.ToolkitResultProtocol(toolkit.UpdateEcoMaterialDetail(ecoDetailObjid, partRevisionObjid)));
        }
        public Protocols.ToolkitResultProtocol UpdateEcoMaterialDetail(Protocols.DepotRepair.UpdateEcoMaterialDetailSetupProtocol setupParam)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit( session );
            FChoice.Toolkits.Clarify.DepotRepair.UpdateEcoMaterialDetailSetup setup;

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

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

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

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

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

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

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

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

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

            return new Protocols.ToolkitResultProtocol( toolkit.UpdateEcoMaterialDetail(setup) );
        }
        public Protocols.ToolkitResultProtocol UpdateEcoMaterialDetail(System.Int32 ecoDetailObjid, System.Int32 partRevisionObjid)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit( session );

            return new Protocols.ToolkitResultProtocol( toolkit.UpdateEcoMaterialDetail(ecoDetailObjid, partRevisionObjid) );
        }