public Protocols.FieldOps.CreateTimeLogResultProtocol CreateTimeLog(Protocols.FieldOps.CreateTimeLogSetupProtocol setupParam)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.FieldOps.FieldOpsToolkit toolkit = new FChoice.Toolkits.Clarify.FieldOps.FieldOpsToolkit( session );
            FChoice.Toolkits.Clarify.FieldOps.CreateTimeLogSetup setup;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return new Protocols.FieldOps.CreateTimeLogResultProtocol( toolkit.CreateTimeLog(setup) );
        }
        public Protocols.FieldOps.CreateTimeLogResultProtocol CreateTimeLog(System.Int32 onsiteLogObjid, System.DateTime startDate, System.Int32 duration)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.FieldOps.FieldOpsToolkit toolkit = new FChoice.Toolkits.Clarify.FieldOps.FieldOpsToolkit( session );

            return new Protocols.FieldOps.CreateTimeLogResultProtocol( toolkit.CreateTimeLog(onsiteLogObjid, startDate, TimeSpan.FromSeconds(duration)) );
        }