public Protocols.ToolkitResultProtocol UpdateDepotRepairMaterial(System.Int32 materialLogObjid, FChoice.Toolkits.Clarify.RepairPartDisposition disposition)
        {
            ClarifySession session = Global.GetSession(AuthHeader);

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

            return(new Protocols.ToolkitResultProtocol(toolkit.UpdateDepotRepairMaterial(materialLogObjid, disposition)));
        }
        public Protocols.ToolkitResultProtocol UpdateDepotRepairMaterial(Protocols.DepotRepair.UpdateDepotRepairMaterialSetupProtocol setupParam)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit( session );
            FChoice.Toolkits.Clarify.DepotRepair.UpdateDepotRepairMaterialSetup setup;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return new Protocols.ToolkitResultProtocol( toolkit.UpdateDepotRepairMaterial(setup) );
        }
        public Protocols.ToolkitResultProtocol UpdateDepotRepairMaterial(System.Int32 materialLogObjid, FChoice.Toolkits.Clarify.RepairPartDisposition disposition)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit( session );

            return new Protocols.ToolkitResultProtocol( toolkit.UpdateDepotRepairMaterial(materialLogObjid, disposition) );
        }
        public Protocols.ToolkitResultProtocol UpdateDepotRepairMaterial(Protocols.DepotRepair.UpdateDepotRepairMaterialSetupProtocol setupParam)
        {
            ClarifySession session = Global.GetSession(AuthHeader);

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

            switch (setupParam.ConstructorCue)
            {
            case 0:
                setup = new FChoice.Toolkits.Clarify.DepotRepair.UpdateDepotRepairMaterialSetup(setupParam.MaterialLogObjid, setupParam.Disposition);
                break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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