Index: UI/Utils/RtnFind/MainForm/5.mac.rou =================================================================== diff -u --- UI/Utils/RtnFind/MainForm/5.mac.rou (revision 0) +++ UI/Utils/RtnFind/MainForm/5.mac.rou (revision 1156) @@ -0,0 +1,622 @@ + ;UI.Utils.RtnFind.MainForm.5 + ;(C)InterSystems, generated for class UI.Utils.RtnFind.MainForm. Do NOT edit. 11/07/2002 09:27AM + ;;7C9FD9F4074C5F60;UI.Utils.RtnFind.MainForm + q + ; +#classcontext UI.Utils.RtnFind.MainForm + #; method code import packages begin + #import %Library + #import UI.Utils.RtnFind + #; method code import packages end + #; method code include files begin + #include %Const + #include %occExtent + #include %occInclude + #include KeyCodesCNTs + #include MakovaDrawTextCnts + #; method code include files end + + +chkCaseSensitiveSetObject(%this,newvalue) ; + i r%chkCaseSensitive=$$$NULLOREF s:i%chkCaseSensitive'=$$$oidPrimary(newvalue) $$$objModBit(##this,18)=1 s i%chkCaseSensitive=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..chkCaseSensitive.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,18)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%chkCaseSensitive,%this,temp) do ..chkCaseSensitive.%Close() s r%chkCaseSensitive=$$$NULLOREF s i%chkCaseSensitive=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +chkCaseSensitiveSetObjectId(%this,newid) ; + q ..chkCaseSensitiveSetObject($$$oidForm(newid)) + +chkCaseSensitiveUnSwizzle(%this) ; + q:r%chkCaseSensitive=$$$NULLOREF + n sc s sc=..chkCaseSensitiveResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%chkCaseSensitive,%this,temp) d ..chkCaseSensitive.%Close() s r%chkCaseSensitive=$$$NULLOREF QUIT $$$OK + q "" + +chkIgnoreSysClassesGet(%this) ; + i r%chkIgnoreSysClasses'=$$$NULLOREF q r%chkIgnoreSysClasses + n oid,oref s oid=i%chkIgnoreSysClasses + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMCheckBox).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%chkIgnoreSysClasses=oref + q r%chkIgnoreSysClasses + q "" + +chkIgnoreSysClassesGetObject(%this,force) s force=$g(force,0) + q:r%chkIgnoreSysClasses=$$$NULLOREF $s(i%chkIgnoreSysClasses="":"",1:$lb(i%chkIgnoreSysClasses_"")) n oid q:$$$ISOK(..chkIgnoreSysClasses.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +chkIgnoreSysClassesGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..chkIgnoreSysClassesGetObject(force)) + +chkIgnoreSysClassesIsModified(%this) ; + q $$$objModBit(##this,19) + +#classmethod +chkIgnoreSysClassesIsValid(value) ; + q 1 +#endclassmethod + +chkIgnoreSysClassesNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMCheckBox).%New("") i newobject=$$$NULLOREF q newobject + s ..chkIgnoreSysClasses=newobject d newobject.%Close() + q newobject + q "" + +chkIgnoreSysClassesResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%chkIgnoreSysClasses'=$$$NULLOREF s sc=..chkIgnoreSysClasses.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%chkIgnoreSysClasses'=$$$oidPrimary(newvalue) $$$objModBit(##this,19)=1 s i%chkIgnoreSysClasses=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +chkIgnoreSysClassesSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%chkIgnoreSysClasses=newvalue q $$$OK + i r%chkIgnoreSysClasses'=$$$NULLOREF n temp $$$objReferenceListRemove(r%chkIgnoreSysClasses,%this,temp) d ..chkIgnoreSysClasses.%Close() + s:(r%chkIgnoreSysClasses'=newvalue)!((newvalue=$$$NULLOREF)&(i%chkIgnoreSysClasses'="")) $$$objModBit(##this,19)=1 + s r%chkIgnoreSysClasses=newvalue,i%chkIgnoreSysClasses=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%chkIgnoreSysClasses,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +chkIgnoreSysClassesSetModified(%this,newvalue) ; + s $$$objModBit(##this,19)=''newvalue + QUIT $$$OK + q "" + +chkIgnoreSysClassesSetObject(%this,newvalue) ; + i r%chkIgnoreSysClasses=$$$NULLOREF s:i%chkIgnoreSysClasses'=$$$oidPrimary(newvalue) $$$objModBit(##this,19)=1 s i%chkIgnoreSysClasses=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..chkIgnoreSysClasses.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,19)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%chkIgnoreSysClasses,%this,temp) do ..chkIgnoreSysClasses.%Close() s r%chkIgnoreSysClasses=$$$NULLOREF s i%chkIgnoreSysClasses=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +chkIgnoreSysClassesSetObjectId(%this,newid) ; + q ..chkIgnoreSysClassesSetObject($$$oidForm(newid)) + +chkIgnoreSysClassesUnSwizzle(%this) ; + q:r%chkIgnoreSysClasses=$$$NULLOREF + n sc s sc=..chkIgnoreSysClassesResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%chkIgnoreSysClasses,%this,temp) d ..chkIgnoreSysClasses.%Close() s r%chkIgnoreSysClasses=$$$NULLOREF QUIT $$$OK + q "" + +chkMatchWholeStrGet(%this) ; + i r%chkMatchWholeStr'=$$$NULLOREF q r%chkMatchWholeStr + n oid,oref s oid=i%chkMatchWholeStr + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMCheckBox).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%chkMatchWholeStr=oref + q r%chkMatchWholeStr + q "" + +chkMatchWholeStrGetObject(%this,force) s force=$g(force,0) + q:r%chkMatchWholeStr=$$$NULLOREF $s(i%chkMatchWholeStr="":"",1:$lb(i%chkMatchWholeStr_"")) n oid q:$$$ISOK(..chkMatchWholeStr.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +chkMatchWholeStrGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..chkMatchWholeStrGetObject(force)) + +chkMatchWholeStrIsModified(%this) ; + q $$$objModBit(##this,20) + +#classmethod +chkMatchWholeStrIsValid(value) ; + q 1 +#endclassmethod + +chkMatchWholeStrNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMCheckBox).%New("") i newobject=$$$NULLOREF q newobject + s ..chkMatchWholeStr=newobject d newobject.%Close() + q newobject + q "" + +chkMatchWholeStrResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%chkMatchWholeStr'=$$$NULLOREF s sc=..chkMatchWholeStr.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%chkMatchWholeStr'=$$$oidPrimary(newvalue) $$$objModBit(##this,20)=1 s i%chkMatchWholeStr=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +chkMatchWholeStrSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%chkMatchWholeStr=newvalue q $$$OK + i r%chkMatchWholeStr'=$$$NULLOREF n temp $$$objReferenceListRemove(r%chkMatchWholeStr,%this,temp) d ..chkMatchWholeStr.%Close() + s:(r%chkMatchWholeStr'=newvalue)!((newvalue=$$$NULLOREF)&(i%chkMatchWholeStr'="")) $$$objModBit(##this,20)=1 + s r%chkMatchWholeStr=newvalue,i%chkMatchWholeStr=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%chkMatchWholeStr,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +chkMatchWholeStrSetModified(%this,newvalue) ; + s $$$objModBit(##this,20)=''newvalue + QUIT $$$OK + q "" + +chkMatchWholeStrSetObject(%this,newvalue) ; + i r%chkMatchWholeStr=$$$NULLOREF s:i%chkMatchWholeStr'=$$$oidPrimary(newvalue) $$$objModBit(##this,20)=1 s i%chkMatchWholeStr=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..chkMatchWholeStr.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,20)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%chkMatchWholeStr,%this,temp) do ..chkMatchWholeStr.%Close() s r%chkMatchWholeStr=$$$NULLOREF s i%chkMatchWholeStr=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +chkMatchWholeStrSetObjectId(%this,newid) ; + q ..chkMatchWholeStrSetObject($$$oidForm(newid)) + +chkMatchWholeStrUnSwizzle(%this) ; + q:r%chkMatchWholeStr=$$$NULLOREF + n sc s sc=..chkMatchWholeStrResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%chkMatchWholeStr,%this,temp) d ..chkMatchWholeStr.%Close() s r%chkMatchWholeStr=$$$NULLOREF QUIT $$$OK + q "" + +chkOnLblGet(%this) ; + i r%chkOnLbl'=$$$NULLOREF q r%chkOnLbl + n oid,oref s oid=i%chkOnLbl + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMCheckBox).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%chkOnLbl=oref + q r%chkOnLbl + q "" + +chkOnLblGetObject(%this,force) s force=$g(force,0) + q:r%chkOnLbl=$$$NULLOREF $s(i%chkOnLbl="":"",1:$lb(i%chkOnLbl_"")) n oid q:$$$ISOK(..chkOnLbl.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +chkOnLblGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..chkOnLblGetObject(force)) + +chkOnLblIsModified(%this) ; + q $$$objModBit(##this,21) + +#classmethod +chkOnLblIsValid(value) ; + q 1 +#endclassmethod + +chkOnLblNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMCheckBox).%New("") i newobject=$$$NULLOREF q newobject + s ..chkOnLbl=newobject d newobject.%Close() + q newobject + q "" + +chkOnLblResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%chkOnLbl'=$$$NULLOREF s sc=..chkOnLbl.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%chkOnLbl'=$$$oidPrimary(newvalue) $$$objModBit(##this,21)=1 s i%chkOnLbl=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +chkOnLblSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%chkOnLbl=newvalue q $$$OK + i r%chkOnLbl'=$$$NULLOREF n temp $$$objReferenceListRemove(r%chkOnLbl,%this,temp) d ..chkOnLbl.%Close() + s:(r%chkOnLbl'=newvalue)!((newvalue=$$$NULLOREF)&(i%chkOnLbl'="")) $$$objModBit(##this,21)=1 + s r%chkOnLbl=newvalue,i%chkOnLbl=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%chkOnLbl,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +chkOnLblSetModified(%this,newvalue) ; + s $$$objModBit(##this,21)=''newvalue + QUIT $$$OK + q "" + +chkOnLblSetObject(%this,newvalue) ; + i r%chkOnLbl=$$$NULLOREF s:i%chkOnLbl'=$$$oidPrimary(newvalue) $$$objModBit(##this,21)=1 s i%chkOnLbl=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..chkOnLbl.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,21)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%chkOnLbl,%this,temp) do ..chkOnLbl.%Close() s r%chkOnLbl=$$$NULLOREF s i%chkOnLbl=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +chkOnLblSetObjectId(%this,newid) ; + q ..chkOnLblSetObject($$$oidForm(newid)) + +chkOnLblUnSwizzle(%this) ; + q:r%chkOnLbl=$$$NULLOREF + n sc s sc=..chkOnLblResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%chkOnLbl,%this,temp) d ..chkOnLbl.%Close() s r%chkOnLbl=$$$NULLOREF QUIT $$$OK + q "" + +chkOnRtnGet(%this) ; + i r%chkOnRtn'=$$$NULLOREF q r%chkOnRtn + n oid,oref s oid=i%chkOnRtn + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMCheckBox).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%chkOnRtn=oref + q r%chkOnRtn + q "" + +chkOnRtnGetObject(%this,force) s force=$g(force,0) + q:r%chkOnRtn=$$$NULLOREF $s(i%chkOnRtn="":"",1:$lb(i%chkOnRtn_"")) n oid q:$$$ISOK(..chkOnRtn.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +chkOnRtnGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..chkOnRtnGetObject(force)) + +chkOnRtnIsModified(%this) ; + q $$$objModBit(##this,22) + +#classmethod +chkOnRtnIsValid(value) ; + q 1 +#endclassmethod + +chkOnRtnNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMCheckBox).%New("") i newobject=$$$NULLOREF q newobject + s ..chkOnRtn=newobject d newobject.%Close() + q newobject + q "" + +chkOnRtnResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%chkOnRtn'=$$$NULLOREF s sc=..chkOnRtn.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%chkOnRtn'=$$$oidPrimary(newvalue) $$$objModBit(##this,22)=1 s i%chkOnRtn=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +chkOnRtnSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%chkOnRtn=newvalue q $$$OK + i r%chkOnRtn'=$$$NULLOREF n temp $$$objReferenceListRemove(r%chkOnRtn,%this,temp) d ..chkOnRtn.%Close() + s:(r%chkOnRtn'=newvalue)!((newvalue=$$$NULLOREF)&(i%chkOnRtn'="")) $$$objModBit(##this,22)=1 + s r%chkOnRtn=newvalue,i%chkOnRtn=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%chkOnRtn,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +chkOnRtnSetModified(%this,newvalue) ; + s $$$objModBit(##this,22)=''newvalue + QUIT $$$OK + q "" + +chkOnRtnSetObject(%this,newvalue) ; + i r%chkOnRtn=$$$NULLOREF s:i%chkOnRtn'=$$$oidPrimary(newvalue) $$$objModBit(##this,22)=1 s i%chkOnRtn=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..chkOnRtn.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,22)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%chkOnRtn,%this,temp) do ..chkOnRtn.%Close() s r%chkOnRtn=$$$NULLOREF s i%chkOnRtn=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +chkOnRtnSetObjectId(%this,newid) ; + q ..chkOnRtnSetObject($$$oidForm(newid)) + +chkOnRtnUnSwizzle(%this) ; + q:r%chkOnRtn=$$$NULLOREF + n sc s sc=..chkOnRtnResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%chkOnRtn,%this,temp) d ..chkOnRtn.%Close() s r%chkOnRtn=$$$NULLOREF QUIT $$$OK + q "" + +chkOpenMACsGet(%this) ; + i r%chkOpenMACs'=$$$NULLOREF q r%chkOpenMACs + n oid,oref s oid=i%chkOpenMACs + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMCheckBox).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%chkOpenMACs=oref + q r%chkOpenMACs + q "" + +chkOpenMACsGetObject(%this,force) s force=$g(force,0) + q:r%chkOpenMACs=$$$NULLOREF $s(i%chkOpenMACs="":"",1:$lb(i%chkOpenMACs_"")) n oid q:$$$ISOK(..chkOpenMACs.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +chkOpenMACsGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..chkOpenMACsGetObject(force)) + +chkOpenMACsIsModified(%this) ; + q $$$objModBit(##this,23) + +#classmethod +chkOpenMACsIsValid(value) ; + q 1 +#endclassmethod + +chkOpenMACsNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMCheckBox).%New("") i newobject=$$$NULLOREF q newobject + s ..chkOpenMACs=newobject d newobject.%Close() + q newobject + q "" + +chkOpenMACsResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%chkOpenMACs'=$$$NULLOREF s sc=..chkOpenMACs.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%chkOpenMACs'=$$$oidPrimary(newvalue) $$$objModBit(##this,23)=1 s i%chkOpenMACs=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +chkOpenMACsSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%chkOpenMACs=newvalue q $$$OK + i r%chkOpenMACs'=$$$NULLOREF n temp $$$objReferenceListRemove(r%chkOpenMACs,%this,temp) d ..chkOpenMACs.%Close() + s:(r%chkOpenMACs'=newvalue)!((newvalue=$$$NULLOREF)&(i%chkOpenMACs'="")) $$$objModBit(##this,23)=1 + s r%chkOpenMACs=newvalue,i%chkOpenMACs=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%chkOpenMACs,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +chkOpenMACsSetModified(%this,newvalue) ; + s $$$objModBit(##this,23)=''newvalue + QUIT $$$OK + q "" + +chkOpenMACsSetObject(%this,newvalue) ; + i r%chkOpenMACs=$$$NULLOREF s:i%chkOpenMACs'=$$$oidPrimary(newvalue) $$$objModBit(##this,23)=1 s i%chkOpenMACs=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..chkOpenMACs.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,23)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%chkOpenMACs,%this,temp) do ..chkOpenMACs.%Close() s r%chkOpenMACs=$$$NULLOREF s i%chkOpenMACs=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +chkOpenMACsSetObjectId(%this,newid) ; + q ..chkOpenMACsSetObject($$$oidForm(newid)) + +chkOpenMACsUnSwizzle(%this) ; + q:r%chkOpenMACs=$$$NULLOREF + n sc s sc=..chkOpenMACsResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%chkOpenMACs,%this,temp) d ..chkOpenMACs.%Close() s r%chkOpenMACs=$$$NULLOREF QUIT $$$OK + q "" + +chkSimpleSearchGet(%this) ; + i r%chkSimpleSearch'=$$$NULLOREF q r%chkSimpleSearch + n oid,oref s oid=i%chkSimpleSearch + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMCheckBox).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%chkSimpleSearch=oref + q r%chkSimpleSearch + q "" + +chkSimpleSearchGetObject(%this,force) s force=$g(force,0) + q:r%chkSimpleSearch=$$$NULLOREF $s(i%chkSimpleSearch="":"",1:$lb(i%chkSimpleSearch_"")) n oid q:$$$ISOK(..chkSimpleSearch.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +chkSimpleSearchGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..chkSimpleSearchGetObject(force)) + +chkSimpleSearchIsModified(%this) ; + q $$$objModBit(##this,24) + +#classmethod +chkSimpleSearchIsValid(value) ; + q 1 +#endclassmethod + +chkSimpleSearchNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMCheckBox).%New("") i newobject=$$$NULLOREF q newobject + s ..chkSimpleSearch=newobject d newobject.%Close() + q newobject + q "" + +chkSimpleSearchResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%chkSimpleSearch'=$$$NULLOREF s sc=..chkSimpleSearch.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%chkSimpleSearch'=$$$oidPrimary(newvalue) $$$objModBit(##this,24)=1 s i%chkSimpleSearch=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +chkSimpleSearchSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%chkSimpleSearch=newvalue q $$$OK + i r%chkSimpleSearch'=$$$NULLOREF n temp $$$objReferenceListRemove(r%chkSimpleSearch,%this,temp) d ..chkSimpleSearch.%Close() + s:(r%chkSimpleSearch'=newvalue)!((newvalue=$$$NULLOREF)&(i%chkSimpleSearch'="")) $$$objModBit(##this,24)=1 + s r%chkSimpleSearch=newvalue,i%chkSimpleSearch=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%chkSimpleSearch,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +chkSimpleSearchSetModified(%this,newvalue) ; + s $$$objModBit(##this,24)=''newvalue + QUIT $$$OK + q "" + +chkSimpleSearchSetObject(%this,newvalue) ; + i r%chkSimpleSearch=$$$NULLOREF s:i%chkSimpleSearch'=$$$oidPrimary(newvalue) $$$objModBit(##this,24)=1 s i%chkSimpleSearch=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..chkSimpleSearch.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,24)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%chkSimpleSearch,%this,temp) do ..chkSimpleSearch.%Close() s r%chkSimpleSearch=$$$NULLOREF s i%chkSimpleSearch=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +chkSimpleSearchSetObjectId(%this,newid) ; + q ..chkSimpleSearchSetObject($$$oidForm(newid)) + +chkSimpleSearchUnSwizzle(%this) ; + q:r%chkSimpleSearch=$$$NULLOREF + n sc s sc=..chkSimpleSearchResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%chkSimpleSearch,%this,temp) d ..chkSimpleSearch.%Close() s r%chkSimpleSearch=$$$NULLOREF QUIT $$$OK + q "" + +gbAdvancedGet(%this) ; + i r%gbAdvanced'=$$$NULLOREF q r%gbAdvanced + n oid,oref s oid=i%gbAdvanced + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMGroupBox).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%gbAdvanced=oref + q r%gbAdvanced + q "" + +gbAdvancedGetObject(%this,force) s force=$g(force,0) + q:r%gbAdvanced=$$$NULLOREF $s(i%gbAdvanced="":"",1:$lb(i%gbAdvanced_"")) n oid q:$$$ISOK(..gbAdvanced.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +gbAdvancedGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..gbAdvancedGetObject(force)) + +gbAdvancedIsModified(%this) ; + q $$$objModBit(##this,25) + +#classmethod +gbAdvancedIsValid(value) ; + q 1 +#endclassmethod + +gbAdvancedNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMGroupBox).%New("") i newobject=$$$NULLOREF q newobject + s ..gbAdvanced=newobject d newobject.%Close() + q newobject + q "" + +gbAdvancedResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%gbAdvanced'=$$$NULLOREF s sc=..gbAdvanced.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%gbAdvanced'=$$$oidPrimary(newvalue) $$$objModBit(##this,25)=1 s i%gbAdvanced=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +gbAdvancedSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%gbAdvanced=newvalue q $$$OK + i r%gbAdvanced'=$$$NULLOREF n temp $$$objReferenceListRemove(r%gbAdvanced,%this,temp) d ..gbAdvanced.%Close() + s:(r%gbAdvanced'=newvalue)!((newvalue=$$$NULLOREF)&(i%gbAdvanced'="")) $$$objModBit(##this,25)=1 + s r%gbAdvanced=newvalue,i%gbAdvanced=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%gbAdvanced,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +gbAdvancedSetModified(%this,newvalue) ; + s $$$objModBit(##this,25)=''newvalue + QUIT $$$OK + q "" + +gbAdvancedSetObject(%this,newvalue) ; + i r%gbAdvanced=$$$NULLOREF s:i%gbAdvanced'=$$$oidPrimary(newvalue) $$$objModBit(##this,25)=1 s i%gbAdvanced=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..gbAdvanced.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,25)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%gbAdvanced,%this,temp) do ..gbAdvanced.%Close() s r%gbAdvanced=$$$NULLOREF s i%gbAdvanced=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +gbAdvancedSetObjectId(%this,newid) ; + q ..gbAdvancedSetObject($$$oidForm(newid)) + +gbAdvancedUnSwizzle(%this) ; + q:r%gbAdvanced=$$$NULLOREF + n sc s sc=..gbAdvancedResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%gbAdvanced,%this,temp) d ..gbAdvanced.%Close() s r%gbAdvanced=$$$NULLOREF QUIT $$$OK + q "" + +lblSearchMsgGet(%this) ; + i r%lblSearchMsg'=$$$NULLOREF q r%lblSearchMsg + n oid,oref s oid=i%lblSearchMsg + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMLabel).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%lblSearchMsg=oref + q r%lblSearchMsg + q "" + +lblSearchMsgGetObject(%this,force) s force=$g(force,0) + q:r%lblSearchMsg=$$$NULLOREF $s(i%lblSearchMsg="":"",1:$lb(i%lblSearchMsg_"")) n oid q:$$$ISOK(..lblSearchMsg.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +lblSearchMsgGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..lblSearchMsgGetObject(force)) + +lblSearchMsgIsModified(%this) ; + q $$$objModBit(##this,26) + +#classmethod +lblSearchMsgIsValid(value) ; + q 1 +#endclassmethod + +lblSearchMsgNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMLabel).%New("") i newobject=$$$NULLOREF q newobject + s ..lblSearchMsg=newobject d newobject.%Close() + q newobject + q "" + +lblSearchMsgResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%lblSearchMsg'=$$$NULLOREF s sc=..lblSearchMsg.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%lblSearchMsg'=$$$oidPrimary(newvalue) $$$objModBit(##this,26)=1 s i%lblSearchMsg=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +lblSearchMsgSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%lblSearchMsg=newvalue q $$$OK + i r%lblSearchMsg'=$$$NULLOREF n temp $$$objReferenceListRemove(r%lblSearchMsg,%this,temp) d ..lblSearchMsg.%Close() + s:(r%lblSearchMsg'=newvalue)!((newvalue=$$$NULLOREF)&(i%lblSearchMsg'="")) $$$objModBit(##this,26)=1 + s r%lblSearchMsg=newvalue,i%lblSearchMsg=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%lblSearchMsg,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +lblSearchMsgSetModified(%this,newvalue) ; + s $$$objModBit(##this,26)=''newvalue + QUIT $$$OK + q "" + +lblSearchMsgSetObject(%this,newvalue) ; + i r%lblSearchMsg=$$$NULLOREF s:i%lblSearchMsg'=$$$oidPrimary(newvalue) $$$objModBit(##this,26)=1 s i%lblSearchMsg=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..lblSearchMsg.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,26)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%lblSearchMsg,%this,temp) do ..lblSearchMsg.%Close() s r%lblSearchMsg=$$$NULLOREF s i%lblSearchMsg=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +lblSearchMsgSetObjectId(%this,newid) ; + q ..lblSearchMsgSetObject($$$oidForm(newid)) + +lblSearchMsgUnSwizzle(%this) ; + q:r%lblSearchMsg=$$$NULLOREF + n sc s sc=..lblSearchMsgResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%lblSearchMsg,%this,temp) d ..lblSearchMsg.%Close() s r%lblSearchMsg=$$$NULLOREF QUIT $$$OK + q "" + +pbProgGet(%this) ; + i r%pbProg'=$$$NULLOREF q r%pbProg + n oid,oref s oid=i%pbProg + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMProgressBar).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%pbProg=oref + q r%pbProg + q "" + +pbProgGetObject(%this,force) s force=$g(force,0) + q:r%pbProg=$$$NULLOREF $s(i%pbProg="":"",1:$lb(i%pbProg_"")) n oid q:$$$ISOK(..pbProg.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +pbProgGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..pbProgGetObject(force)) + +pbProgIsModified(%this) ; + q $$$objModBit(##this,27) + +#classmethod +pbProgIsValid(value) ; + q 1 +#endclassmethod + +#endclasscontext UI.Utils.RtnFind.MainForm \ No newline at end of file Index: Stat/PR/ProductKenmerken/1.mac.rou =================================================================== diff -u --- Stat/PR/ProductKenmerken/1.mac.rou (revision 0) +++ Stat/PR/ProductKenmerken/1.mac.rou (revision 1156) @@ -0,0 +1,846 @@ + ;Stat.PR.ProductKenmerken.1 + ;(C)InterSystems, generated for class Stat.PR.ProductKenmerken. Do NOT edit. 09/30/2002 04:00PM + ;;431CFD40B04D6329;Stat.PR.ProductKenmerken + q + ; +#classcontext Stat.PR.ProductKenmerken + #; method code import packages begin + #import %Library + #import Stat.PR + #; method code import packages end + #; method code include files begin + #include %occExtent + #include %occInclude + #include %occTransaction + #; method code include files end + + +%AcquireLock(%this,locktype) ; + n %sc,id + s id=..%Id() QUIT:$g(id)="" $$$ERROR($$$NullId) + s %sc=$$$OK + i $g(locktype)="e" l +(^Stat.PR.ProductKenmerkenD(i%Product)):5 s:'$t %sc=$$$ERROR($$$LockFailedToAcquireExclusive) QUIT %sc + i $g(locktype)="s" l +(^Stat.PR.ProductKenmerkenD(i%Product,$j)):5 s:'$t %sc=$$$ERROR($$$LockFailedToAcquireRead) QUIT %sc + QUIT $$$ERROR($$$LockTypeInvalid,locktype) + q "" + +#classmethod +%BuildIndices(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%CheckUnique(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%CheckUnique") + q "" +#endclassmethod + +%ClassName(%this,fullname) s fullname=$g(fullname,0) + q $s(fullname:"Stat.PR.ProductKenmerken",1:"ProductKenmerken") + +%Close(%this) ; + n a s a=$$$objReferenceCount(%this) q:'a $$$OK i a'>$ll($g($$$objReferenceList(%this))) q $$$ERROR($$$TooManyCallsToClose) + s $$$objReferenceCount(%this)=a-1 + i a>1 q:(a-1)>$ll($g($$$objReferenceList(%this))) $$$OK d q:'a $$$OK s $$$objReferenceCount(%this)=0 + . n checklist,checkobj,list,oreffrom,close,i s checklist=$lb(%this),close(%this)="" + . f s checkobj=$li(checklist) s checklist=$li(checklist,2,-1) d q:checklist=""!'a + . . s list=$g($$$objReferenceList(checkobj)),oreffrom="" f i=1:1:$ll(list) s oreffrom=$li(list,i) i '$d(close(oreffrom)) s:$$$objReferenceCount(oreffrom)=0 a=0 q:'a s:$$$objReferenceCount(oreffrom)>$ll($g($$$objReferenceList(oreffrom))) a=0 q:'a s close(oreffrom)="",checklist=checklist_$lb(oreffrom) + i ..%Concurrency=3 d ..%ReleaseLock("s") + i ..%Concurrency=4 d ..%ReleaseLock("e") + s a=$$$objOID(%this) + $$$DeleteObject(%this) + i a'="" $$$ActiveOidRemove(a,%this) + k $$$txLIST(%this),$$$txOIDASSIGNED(%this),$$$txMODIFIED(%this) + QUIT $$$OK + q "" + +#classmethod +%Delete(oid,concurrency) s oid=$g(oid,""),concurrency=$g(concurrency,$zu(115,10)) + n class,id,sc,traninit QUIT:oid="" $$$ERROR($$$NullOid) s id=$$$oidPrimary(oid) QUIT:id="" $$$ERROR($$$NullId) + s class=$$$oidClassName(oid) + i class'="" s class=$$$NormalizeClassname(class) + i class="" s sc=..%OnDetermineClass(oid,.class) q:$$$ISERR(sc) sc s oid=$$$oidInsertClassName(oid,class) + i "Stat.PR.ProductKenmerken"'=class q $zobjclassmethod(class,"%Delete",oid) + s traninit=0 i $zu(115,9) s traninit=1 tstart + s sc=..%DeleteData(id,concurrency) +%DeleteEnd i traninit DO + . i $$$ISOK(sc) tcommit + . i $$$ISERR(sc) trollback + i $$$ISERR(sc) QUIT sc + n oref $$$ActiveOidModified(oid,oref) + QUIT sc + q "" +#endclassmethod + +#classmethod +%DeleteData(id,concurrency) ; + QUIT:id="" $$$ERROR($$$NullId) + n %kp1,%sc + s %sc=$$$ERROR($$$DeleteObjectNotFound) + s %kp1=id + i concurrency>1 l +(^Stat.PR.ProductKenmerkenD(%kp1)):5 i '$t QUIT $$$ERROR($$$LockFailedToAcquireExclusive) + s:($d(^Stat.PR.ProductKenmerkenD(%kp1))) %sc=$$$OK + i $$$ISOK(%sc) DO + . k ^Stat.PR.ProductKenmerkenD(%kp1) + i concurrency>1 l -(^Stat.PR.ProductKenmerkenD(%kp1)) + QUIT %sc + q "" +#endclassmethod + +#classmethod +%DeleteExtent(concurrency,deletecount,instancecount) s concurrency=$g(concurrency,$zu(115,10)) + n atend,id,qh,row,rs,sc + s deletecount=0,instancecount=0 + s sc=..ExtentExecute(.qh) QUIT:$$$ISERR(sc) sc + f s sc=..ExtentFetch(.qh,.row,.atend) q:$s(row="":1,$$$ISERR(sc):1,1:0) s id=$lg(row) i id'="" s sc=..%Delete($lb(id),concurrency) s instancecount=instancecount+1 s:$$$ISOK(sc) deletecount=deletecount+1 q:atend + d ..ExtentClose(qh) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%DeleteId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + q ..%Delete($$$oidForm(id),concurrency) +#endclassmethod + +%DowngradeConcurrency(%this,concurrency) ; + n current,sc + s current=..%Concurrency + #; If the requested setting is greater than the current setting, then do nothing + If concurrency>current QUIT $$$OK + #; Locks are not retained for any setting less than 3 and if the old and new + #; setting are the same, nothing is to done except update the concurrency setting + i current<3!(current=concurrency) s:concurrency2 s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc + #; the following line releases the old lock which we know must be there + #; because we process and quit above for current<3 + Do ..%ReleaseLock($s(current=3:"s",1:"e")) + #; Update the concurrency setting: + s ..%Concurrency=concurrency + QUIT $$$OK + q "" + +#classmethod +%Exists(oid) s oid=$g(oid,"") + q ..%ExistsId($$$oidPrimary(oid)) +#endclassmethod + +#classmethod +%ExistsId(id) s id=$g(id,"") + QUIT:id="" $$$ERROR($$$NullId) + s %kp1=id + i ($d(^Stat.PR.ProductKenmerkenD(%kp1))) Quit 1 + QUIT 0 + q "" +#endclassmethod + +%GetSwizzleObject(%this,force,oid) s force=$g(force,0) + n sc s oid="" i force=0 s oid=..%Oid() QUIT $$$OK + i force=2 s sc=..%Save(1) s:$$$ISOK(sc) oid=..%Oid() QUIT sc + s oid=..%Oid() QUIT:oid'="" $$$OK + s sc=..%Save(0) s:$$$ISOK(sc) oid=..%Oid() QUIT sc + q "" + +%Id(%this) ; + q $$$oidPrimary($$$objOID(##this)) + +%IdSet(%this,id) ; + n oid s oid=$$$oidCompose(id,"Stat.PR.ProductKenmerken") + i $$$objOID(##this)'="",$$$objOID(##this)'=oid QUIT $$$ERROR($$$OidPreviouslyAssigned) + s $$$objOID(##this)=oid + $$$ActiveOidInsert(oid,##this) + QUIT $$$OK + q "" + +%IncrementCount(%this) ; + $$$IncrementReferenceCount(%this) q + q + +#classmethod +%IsA(isclass) ; + q "~Stat.PR.ProductKenmerken~%Library.Persistent~%Library.RegisteredObject~"[("~"_$$$NormalizeClassname(isclass)_"~") +#endclassmethod + +%IsModified(%this) ; + q $$$objModAll(##this) + +#classmethod +%KillExtent() ; + n sc,subextent + s subextent="" f s subextent=$o($$$EXTSUBEXTENT($$$pEXT,"Stat.PR.ProductKenmerken",subextent)) q:subextent="" s sc=$zobjclassmethod(subextent,"%KillExtent") + s sc=..%PurgeIndices() q:$$$ISERR(sc) sc + k ^Stat.PR.ProductKenmerkenD + QUIT $$$OK + q "" +#endclassmethod + +%Load(%this,id) ; + n sc s sc=..%IdSet(id) QUIT:$$$ISERR(sc) sc + s sc=..%LoadData(id) QUIT:$$$ISERR(sc) sc + QUIT $$$OK + q "" + +%LoadData(%this,id) ; + n %sc + s %sc=$$$ERROR($$$LoadObjectNotFound) + s i%Product=id + i ..%Concurrency=4 l +(^Stat.PR.ProductKenmerkenD(i%Product)):5 i '$t QUIT $$$ERROR($$$LockFailedToAcquireExclusive) + i ..%Concurrency'=4,..%Concurrency>1 l +(^Stat.PR.ProductKenmerkenD(i%Product,$j)):5 i '$t QUIT $$$ERROR($$$LockFailedToAcquireRead) + i '$d(^Stat.PR.ProductKenmerkenD(i%Product)) s i%ABCBeweging="",i%ABCWaarde="",i%Divisie="",i%Groep="",i%HoofdGroep="",i%KindMoeder="",i%KortTekst="",i%Leverancier="",i%Magazijn="",i%StockType="",i%SubGroep="" + e DO + . n %s1 + . s %sc=$$$OK + . s %s1=$g(^Stat.PR.ProductKenmerkenD(i%Product)) + . s i%ABCBeweging=$lg(%s1,2),i%ABCWaarde=$lg(%s1,3),i%Divisie=$lg(%s1,4),i%Groep=$lg(%s1,5),i%HoofdGroep=$lg(%s1,6),i%KindMoeder=$lg(%s1,7),i%Leverancier=$lg(%s1,8),i%Magazijn=$lg(%s1,9),i%StockType=$lg(%s1,11),i%SubGroep=$lg(%s1,12),i%KortTekst=$lg(%s1,13) + i ..%Concurrency=2 l -(^Stat.PR.ProductKenmerkenD(i%Product,$j)) + QUIT %sc + q "" + +#classmethod +%New(initvalue) ; + n %this,sc,oref +#endclassmethod + s %this=$$$CreateObject("Stat.PR.ProductKenmerken") + s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" + s i%%Concurrency=$zu(115,10),i%%IsInSave=0,i%ABCBeweging="",i%ABCWaarde="",i%Divisie="" + s i%Groep="",i%HoofdGroep="",i%KindMoeder="",i%KortTekst="",i%Leverancier="" + s i%Magazijn="",i%Product="",i%StockType="",i%SubGroep="" + $$$objModAllSet(##this,1) + QUIT %this +#classmethod + q "" +#endclassmethod + +%NormalizeObject(%this) ; + i i%ABCBeweging'="" s i%ABCBeweging=(..ABCBewegingNormalize(i%ABCBeweging)) + i i%ABCWaarde'="" s i%ABCWaarde=(..ABCWaardeNormalize(i%ABCWaarde)) + i i%Divisie'="" s i%Divisie=(..DivisieNormalize(i%Divisie)) + i i%Groep'="" s i%Groep=(..GroepNormalize(i%Groep)) + i i%HoofdGroep'="" s i%HoofdGroep=(..HoofdGroepNormalize(i%HoofdGroep)) + i i%KindMoeder'="" s i%KindMoeder=(..KindMoederNormalize(i%KindMoeder)) + i i%KortTekst'="" s i%KortTekst=(..KortTekstNormalize(i%KortTekst)) + i i%Leverancier'="" s i%Leverancier=(..LeverancierNormalize(i%Leverancier)) + i i%Magazijn'="" s i%Magazijn=(..MagazijnNormalize(i%Magazijn)) + i i%Product'="" s i%Product=(..ProductNormalize(i%Product)) + i i%StockType'="" s i%StockType=(..StockTypeNormalize(i%StockType)) + i i%SubGroep'="" s i%SubGroep=(..SubGroepNormalize(i%SubGroep)) + QUIT $$$OK + q "" + +%Oid(%this) ; + q $$$objOID(##this) + +#classmethod +%OnDetermineClass(oid,class) ; + n id,idclass + s id=$$$oidPrimary($g(oid)) QUIT:id="" $$$ERROR($$$NullId) + s idclass="Stat.PR.ProductKenmerken" + s class=$s(idclass="":"Stat.PR.ProductKenmerken",1:$p(idclass,$e(idclass),$l(idclass,$e(idclass))-1)) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%Open(oid,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + i $$$oidPrimary($g(oid))="" QUIT $$$NULLOREF + n sc,%this,class s class=$$$oidClassName(oid) + i class'="" s class=$$$NormalizeClassname(class) + i class="" s sc=..%OnDetermineClass(oid,.class) q:$$$ISERR(sc) $$$NULLOREF s oid=$$$oidInsertClassName(oid,class) + i "Stat.PR.ProductKenmerken"'=class q $zobjclassmethod(class,"%Open",oid,concurrency) +#endclassmethod + $$$ActiveOidSearch(oid,%this) + i %this DO QUIT %this + . i concurrency>..%Concurrency i '..%UpgradeConcurrency(concurrency) s %this="" q + . $$$IncrementReferenceCount(%this) + s %this=$$$CreateObject("Stat.PR.ProductKenmerken") + s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" + s i%%Concurrency="",..%Concurrency=concurrency + s sc=..%Load($$$oidPrimary(oid)) i $$$ISERR(sc) d ..%Close() QUIT $$$NULLOREF + s i%%IsInSave=0 + $$$objModAllSet(##this,0) + QUIT %this +#classmethod + q "" +#endclassmethod + +#classmethod +%OpenId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + q ..%Open($$$oidForm(id),concurrency) +#endclassmethod + +%PackageName(%this) ; + q "Stat.PR" + +#classmethod +%PurgeIndices(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$OK + q "" +#endclassmethod + +%ReleaseLock(%this,locktype) ; + n %sc,id + s id=..%Id() QUIT:$g(id)="" $$$ERROR($$$NullId) + s %sc=$$$OK + i $g(locktype)="e" l -(^Stat.PR.ProductKenmerkenD(i%Product)) QUIT $$$OK + i $g(locktype)="s" l -(^Stat.PR.ProductKenmerkenD(i%Product,$j)) QUIT $$$OK + QUIT $$$ERROR($$$LockTypeInvalid,locktype) + q "" + +%ResetAllObject(%this,force) s force=$g(force,0) + q 1 + +%RollBack(%this) ; + n sc s sc=$$$OK + i $d($$$txMODIFIED(##this)) $$$objModStateRestore(##this,$$$txMODIFIED(##this)) + QUIT sc + q "" + +%Save(%this,related) s related=$g(related,1) + n id,oid,ok,sc,traninit s oid=..%Oid(),id=$$$oidPrimary(oid) i 'i%%IsInSave d s i%%IsInSave=0 QUIT sc + . s oid="",sc=$$$OK,traninit=0 + . i $$$txNOTINTRAN DO + . . s traninit=1 + . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot + . . i '$zu(115,9) s $$$txSTATUS=1 q + . . s $$$txSTATUS=2 tstart + . s:$$$txON $$$txLIST(##this)="" + . s i%%IsInSave=1 + . s sc=..%ValidateObject(related+1) i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . s sc=..%NormalizeObject() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . s sc=..%ResetAllObject(related+1) i $$$ISERR(sc) d i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . . s sc=..%SaveData(id) q:$$$ISERR(sc) + . . s sc=..%ResetAllObject(related+1) + . i ..%IsModified()!(related=0) s sc=..%SaveData(id) s:$$$ISOK(sc) oid=..%Oid() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . i ..%IsModified(),$$$txON $$$objModStateSave(##this,$$$txMODIFIED(##this)) + . $$$objModAllSet(##this,0) i traninit d i $$$ISERR(ok) s sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()),oid="" q + . . i $$$txOFF k $$$txSTATUS s ok=$$$OK q + . . tcommit + . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot + . . s ok=$$$OK,sc=$$$OK + . s:oid="" oid=..%Oid() + . q + QUIT:oid'="" $$$OK + s sc=..%ValidateObject(0) QUIT:$$$ISERR(sc) sc + i ..%ResetAllObject(0) + s sc=..%SaveData(id) i $$$ISOK(sc) QUIT $$$OK + QUIT sc + q "" + +%SaveData(%this,id) ; + n %sc,idassigned,idclass,insert + s %sc=$$$OK,id=..%Id() i id'="" s insert=0,idassigned=1 + e s insert=1,idassigned=0 + s idclass="" + n lock + s lock=0 + i 'insert,'(($d(^Stat.PR.ProductKenmerkenD(i%Product)))) s insert=1 + i insert DO + . i 'idassigned s id=i%Product i 1 + . e i i%Product'=id s %sc=$$$ERROR($$$OidPreviouslyAssigned) q + . i ..%Concurrency=4 l +(^Stat.PR.ProductKenmerkenD(i%Product)):5 e s %sc=$$$ERROR($$$LockFailedToAcquireExclusive) q + . i $d(^Stat.PR.ProductKenmerkenD(i%Product)) s %sc=$$$ERROR($$$IDKeyNotUnique) q + . i 'idassigned s %sc=..%IdSet(id) q:$$$ISERR(%sc) s:$$$txON $$$txOIDASSIGNED(##this)="" + . s ^Stat.PR.ProductKenmerkenD(i%Product)=$lb("",i%ABCBeweging,i%ABCWaarde,i%Divisie,i%Groep,i%HoofdGroep,i%KindMoeder,i%Leverancier,i%Magazijn,i%Product,i%StockType,i%SubGroep,i%KortTekst) + . i ..%Concurrency=3 l +(^Stat.PR.ProductKenmerkenD(i%Product,$j)) + i 'insert DO + . i i%Product'=id s %sc=$$$ERROR($$$OidPreviouslyAssigned) q + . i ..%Concurrency>1 l +(^Stat.PR.ProductKenmerkenD(i%Product)):5 s lock=$t e s %sc=$$$ERROR($$$LockFailedToAcquireExclusive) q + . s ^Stat.PR.ProductKenmerkenD(i%Product)=$lb("",i%ABCBeweging,i%ABCWaarde,i%Divisie,i%Groep,i%HoofdGroep,i%KindMoeder,i%Leverancier,i%Magazijn,i%Product,i%StockType,i%SubGroep,i%KortTekst) + i lock l -(^Stat.PR.ProductKenmerkenD(i%Product)) + QUIT %sc + q "" + +#classmethod +%SortBegin(idxlist,excludeunique) s idxlist=$g(idxlist,""),excludeunique=$g(excludeunique,0) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%SortEnd(idxlist,commit) s idxlist=$g(idxlist,""),commit=$g(commit,1) + QUIT $$$OK + q "" +#endclassmethod + +%UpgradeConcurrency(%this,concurrency) ; + n current,sc + #; Locks are not retained for any setting + #; less than 3 and if the old and new + #; setting are the same, nothing is to done! + s current=..%Concurrency + Quit:concurrencycurrent ..%Concurrency=concurrency QUIT $$$OK + #; Get the new lock + s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc + #; the following line releases the old lock + #; which must be a shared lock as that is the + #; only possible condition. + i current=3 d ..%ReleaseLock("s") + #; Update the concurrency setting: + s ..%Concurrency=concurrency + QUIT $$$OK + q "" + +%ValidateObject(%this,force) s force=$g(force,0) + #; VALIDATE=2, modified=3 + n iv i ..%IsModified() DO QUIT:'iv iv + . s iv=..%Concurrency i iv'="" s iv=(..%ConcurrencyIsValid(iv)) q:$$$ISERR(iv) + . s iv=..%IsInSave i iv'="" s iv=(..%IsInSaveIsValid(iv)) q:$$$ISERR(iv) + . s iv=..ABCBeweging i iv'="" s iv=(..ABCBewegingIsValid(iv)) q:$$$ISERR(iv) + . s iv=..ABCWaarde i iv'="" s iv=(..ABCWaardeIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Divisie i iv="" s iv=$$$ERROR($$$PropertyRequired,"Divisie") q + . s iv=(..DivisieIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Groep i iv="" s iv=$$$ERROR($$$PropertyRequired,"Groep") q + . s iv=(..GroepIsValid(iv)) q:$$$ISERR(iv) + . s iv=..HoofdGroep i iv="" s iv=$$$ERROR($$$PropertyRequired,"HoofdGroep") q + . s iv=(..HoofdGroepIsValid(iv)) q:$$$ISERR(iv) + . s iv=..KindMoeder i iv'="" s iv=(..KindMoederIsValid(iv)) q:$$$ISERR(iv) + . s iv=..KortTekst i iv'="" s iv=(..KortTekstIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Leverancier i iv="" s iv=$$$ERROR($$$PropertyRequired,"Leverancier") q + . s iv=(..LeverancierIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Magazijn i iv'="" s iv=(..MagazijnIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Product i iv="" s iv=$$$ERROR($$$PropertyRequired,"Product") q + . s iv=(..ProductIsValid(iv)) q:$$$ISERR(iv) + . s iv=..StockType i iv'="" s iv=(..StockTypeIsValid(iv)) q:$$$ISERR(iv) + . s iv=..SubGroep i iv="" s iv=$$$ERROR($$$PropertyRequired,"SubGroep") q + . s iv=(..SubGroepIsValid(iv)) q:$$$ISERR(iv) + . s iv=$$$OK + QUIT $$$OK + q "" + +%ConcurrencyGet(%this) ; + q i%%Concurrency + +%ConcurrencyIsModified(%this) ; + q $$$objModBit(##this,1) + +#classmethod +%ConcurrencyIsValid(value) ; + q 1 +#endclassmethod + +%ConcurrencySet(%this,newvalue) ; + s:newvalue'=i%%Concurrency $$$objModBit(##this,1)=1 + s i%%Concurrency=newvalue QUIT $$$OK + q "" + +%ConcurrencySetModified(%this,newvalue) ; + s $$$objModBit(##this,1)=''newvalue + QUIT $$$OK + q "" + +%IsInSaveGet(%this) ; + q i%%IsInSave + +%IsInSaveIsModified(%this) ; + q $$$objModBit(##this,2) + +#classmethod +%IsInSaveIsValid(value) ; + q 1 +#endclassmethod + +%IsInSaveSet(%this,newvalue) ; + s:newvalue'=i%%IsInSave $$$objModBit(##this,2)=1 + s i%%IsInSave=newvalue QUIT $$$OK + q "" + +%IsInSaveSetModified(%this,newvalue) ; + s $$$objModBit(##this,2)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..ABCBeweging +#classmethod +ABCBewegingDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..ABCBeweging + +ABCBewegingGet(%this) ; + q i%ABCBeweging + +ABCBewegingIsModified(%this) ; + q $$$objModBit(##this,3) + +#classmethod +ABCBewegingIsValid(value) ; + q $s(..ABCBewegingIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.ABCBeweging")) +#endclassmethod + +#classcontext ..ABCBeweging +#classmethod +ABCBewegingIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..ABCBeweging + +#classcontext ..ABCBeweging +#classmethod +ABCBewegingLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..ABCBeweging + +#classcontext ..ABCBeweging +#classmethod +ABCBewegingNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..ABCBeweging + +ABCBewegingSet(%this,newvalue) ; + s:newvalue'=i%ABCBeweging $$$objModBit(##this,3)=1 + s i%ABCBeweging=newvalue QUIT $$$OK + q "" + +ABCBewegingSetModified(%this,newvalue) ; + s $$$objModBit(##this,3)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..ABCWaarde + +ABCWaardeGet(%this) ; + q i%ABCWaarde + +ABCWaardeIsModified(%this) ; + q $$$objModBit(##this,4) + +#classmethod +ABCWaardeIsValid(value) ; + q $s(..ABCWaardeIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.ABCWaarde")) +#endclassmethod + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..ABCWaarde + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..ABCWaarde + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..ABCWaarde + +ABCWaardeSet(%this,newvalue) ; + s:newvalue'=i%ABCWaarde $$$objModBit(##this,4)=1 + s i%ABCWaarde=newvalue QUIT $$$OK + q "" + +ABCWaardeSetModified(%this,newvalue) ; + s $$$objModBit(##this,4)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Divisie +#classmethod +DivisieDisplayToLogical(%val) ; + q:%val="Beslag" "B" + q:%val="Halux" "H" + q:%val="Orgalux" "O" + q "" + q "" +#endclassmethod +#endclasscontext ..Divisie + +DivisieGet(%this) ; + q i%Divisie + +DivisieIsModified(%this) ; + q $$$objModBit(##this,5) + +#classmethod +DivisieIsValid(value) ; + q $s(..DivisieIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.Divisie")) +#endclassmethod + +#classcontext ..Divisie +#classmethod +DivisieIsValidDT(%val) ; + q (%val'[";")&(";B;H;O;"[(";"_%val_";")) +#endclassmethod +#endclasscontext ..Divisie + +#classcontext ..Divisie +#classmethod +DivisieLogicalToDisplay(%val) ; + q:%val="B" "Beslag" + q:%val="H" "Halux" + q:%val="O" "Orgalux" + q "" + q "" +#endclassmethod +#endclasscontext ..Divisie + +#classcontext ..Divisie +#classmethod +DivisieNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..Divisie + +DivisieSet(%this,newvalue) ; + s:newvalue'=i%Divisie $$$objModBit(##this,5)=1 + s i%Divisie=newvalue QUIT $$$OK + q "" + +DivisieSetModified(%this,newvalue) ; + s $$$objModBit(##this,5)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Groep +#classmethod +GroepDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..Groep + +GroepGet(%this) ; + q i%Groep + +GroepIsModified(%this) ; + q $$$objModBit(##this,6) + +#classmethod +GroepIsValid(value) ; + q $s(..GroepIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.Groep")) +#endclassmethod + +#classcontext ..Groep +#classmethod +GroepIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..Groep + +#classcontext ..Groep +#classmethod +GroepLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..Groep + +#classcontext ..Groep +#classmethod +GroepNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..Groep + +GroepSet(%this,newvalue) ; + s:newvalue'=i%Groep $$$objModBit(##this,6)=1 + s i%Groep=newvalue QUIT $$$OK + q "" + +GroepSetModified(%this,newvalue) ; + s $$$objModBit(##this,6)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..HoofdGroep +#classmethod +HoofdGroepDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..HoofdGroep + +HoofdGroepGet(%this) ; + q i%HoofdGroep + +HoofdGroepIsModified(%this) ; + q $$$objModBit(##this,7) + +#classmethod +HoofdGroepIsValid(value) ; + q $s(..HoofdGroepIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.HoofdGroep")) +#endclassmethod + +#classcontext ..HoofdGroep +#classmethod +HoofdGroepIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..HoofdGroep + +#classcontext ..HoofdGroep +#classmethod +HoofdGroepLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..HoofdGroep + +#classcontext ..HoofdGroep +#classmethod +HoofdGroepNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..HoofdGroep + +HoofdGroepSet(%this,newvalue) ; + s:newvalue'=i%HoofdGroep $$$objModBit(##this,7)=1 + s i%HoofdGroep=newvalue QUIT $$$OK + q "" + +HoofdGroepSetModified(%this,newvalue) ; + s $$$objModBit(##this,7)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..KindMoeder +#classmethod +KindMoederDisplayToLogical(%val) ; + q:%val="Kind" "K" + q:%val="Enkel" "E" + q:%val="Moeder" "M" + q "" + q "" +#endclassmethod +#endclasscontext ..KindMoeder + +KindMoederGet(%this) ; + q i%KindMoeder + +KindMoederIsModified(%this) ; + q $$$objModBit(##this,8) + +#classmethod +KindMoederIsValid(value) ; + q $s(..KindMoederIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.KindMoeder")) +#endclassmethod + +#classcontext ..KindMoeder +#classmethod +KindMoederIsValidDT(%val) ; + q (%val'[";")&(";K;E;M;"[(";"_%val_";")) +#endclassmethod +#endclasscontext ..KindMoeder + +#classcontext ..KindMoeder +#classmethod +KindMoederLogicalToDisplay(%val) ; + q:%val="K" "Kind" + q:%val="E" "Enkel" + q:%val="M" "Moeder" + q "" + q "" +#endclassmethod +#endclasscontext ..KindMoeder + +#classcontext ..KindMoeder +#classmethod +KindMoederNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..KindMoeder + +KindMoederSet(%this,newvalue) ; + s:newvalue'=i%KindMoeder $$$objModBit(##this,8)=1 + s i%KindMoeder=newvalue QUIT $$$OK + q "" + +KindMoederSetModified(%this,newvalue) ; + s $$$objModBit(##this,8)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..KortTekst +#classmethod +KortTekstDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..KortTekst + +KortTekstGet(%this) ; + q i%KortTekst + +KortTekstIsModified(%this) ; + q $$$objModBit(##this,9) + +#classmethod +KortTekstIsValid(value) ; + q $s(..KortTekstIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.KortTekst")) +#endclassmethod + +#classcontext ..KortTekst +#classmethod +KortTekstIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..KortTekst + +#classcontext ..KortTekst +#classmethod +KortTekstLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..KortTekst + +#classcontext ..KortTekst +#classmethod +KortTekstNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..KortTekst + +KortTekstSet(%this,newvalue) ; + s:newvalue'=i%KortTekst $$$objModBit(##this,9)=1 + s i%KortTekst=newvalue QUIT $$$OK + q "" + +KortTekstSetModified(%this,newvalue) ; + s $$$objModBit(##this,9)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Leverancier +#classmethod +LeverancierDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..Leverancier + +LeverancierGet(%this) ; + q i%Leverancier + +LeverancierIsModified(%this) ; + q $$$objModBit(##this,10) + +#classmethod +LeverancierIsValid(value) ; + q $s(..LeverancierIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.Leverancier")) +#endclassmethod + +#classcontext ..Leverancier +#classmethod +LeverancierIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..Leverancier + +#classcontext ..Leverancier +#classmethod +LeverancierLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..Leverancier + +#endclasscontext Stat.PR.ProductKenmerken \ No newline at end of file Index: Stat/PR/StockAanpassing/2.mac.rou =================================================================== diff -u --- Stat/PR/StockAanpassing/2.mac.rou (revision 0) +++ Stat/PR/StockAanpassing/2.mac.rou (revision 1156) @@ -0,0 +1,24 @@ + ;Stat.PR.StockAanpassing.2 + ;(C)InterSystems, generated for class Stat.PR.StockAanpassing. Do NOT edit. 09/30/2002 11:52AM + ;;43612B14781CABB3;Stat.PR.StockAanpassing + q + ; +#classcontext Stat.PR.StockAanpassing + #; method code import packages begin + #import %Library + #import Stat.PR + #; method code import packages end + #; method code include files begin + #include %occExtent + #include %occInclude + #include %occTransaction + #; method code include files end + + +#classmethod +ExtentPrepare(qHandle,statement,containid,optional) s containid=$g(containid,0) + QUIT $$$OK + q "" +#endclassmethod + +#endclasscontext Stat.PR.StockAanpassing \ No newline at end of file Index: Prod/GADef/emKadVulling/tmpDev.mac.rou =================================================================== diff -u --- Prod/GADef/emKadVulling/tmpDev.mac.rou (revision 0) +++ Prod/GADef/emKadVulling/tmpDev.mac.rou (revision 1156) @@ -0,0 +1 @@ \ No newline at end of file Index: Stat/PR/ProductKenmerken/2.mac.rou =================================================================== diff -u --- Stat/PR/ProductKenmerken/2.mac.rou (revision 0) +++ Stat/PR/ProductKenmerken/2.mac.rou (revision 1156) @@ -0,0 +1,326 @@ + ;Stat.PR.ProductKenmerken.2 + ;(C)InterSystems, generated for class Stat.PR.ProductKenmerken. Do NOT edit. 09/30/2002 04:00PM + ;;431CFD40B04D6329;Stat.PR.ProductKenmerken + q + ; +#classcontext Stat.PR.ProductKenmerken + #; method code import packages begin + #import %Library + #import Stat.PR + #; method code import packages end + #; method code include files begin + #include %occExtent + #include %occInclude + #include %occTransaction + #; method code include files end + + +#classcontext ..Leverancier +#classmethod +LeverancierNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..Leverancier + +LeverancierSet(%this,newvalue) ; + s:newvalue'=i%Leverancier $$$objModBit(##this,10)=1 + s i%Leverancier=newvalue QUIT $$$OK + q "" + +LeverancierSetModified(%this,newvalue) ; + s $$$objModBit(##this,10)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Magazijn +#classmethod +MagazijnDisplayToLogical(%val) ; + q:%val="Auto" 1 + q:%val="Ugly" 2 + q:%val="Langgoed" 3 + q:%val="Transit" 4 + q:%val="Manueel" 0 + q:%val="Werkvloer" 99 + q "" + q "" +#endclassmethod +#endclasscontext ..Magazijn + +MagazijnGet(%this) ; + q i%Magazijn + +MagazijnIsModified(%this) ; + q $$$objModBit(##this,11) + +#classmethod +MagazijnIsValid(value) ; + q $s(..MagazijnIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.Magazijn")) +#endclassmethod + +#classcontext ..Magazijn +#classmethod +MagazijnIsValidDT(%val) ; + q (%val'[";")&(";1;2;3;4;0;99;"[(";"_%val_";")) +#endclassmethod +#endclasscontext ..Magazijn + +#classcontext ..Magazijn +#classmethod +MagazijnLogicalToDisplay(%val) ; + q:%val=1 "Auto" + q:%val=2 "Ugly" + q:%val=3 "Langgoed" + q:%val=4 "Transit" + q:%val=0 "Manueel" + q:%val=99 "Werkvloer" + q "" + q "" +#endclassmethod +#endclasscontext ..Magazijn + +#classcontext ..Magazijn +#classmethod +MagazijnNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..Magazijn + +MagazijnSet(%this,newvalue) ; + s:newvalue'=i%Magazijn $$$objModBit(##this,11)=1 + s i%Magazijn=newvalue QUIT $$$OK + q "" + +MagazijnSetModified(%this,newvalue) ; + s $$$objModBit(##this,11)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Product +#classmethod +ProductDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..Product + +ProductGet(%this) ; + q i%Product + +ProductIsModified(%this) ; + q $$$objModBit(##this,12) + +#classmethod +ProductIsValid(value) ; + q $s(..ProductIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.Product")) +#endclassmethod + +#classcontext ..Product +#classmethod +ProductIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..Product + +#classcontext ..Product +#classmethod +ProductLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..Product + +#classcontext ..Product +#classmethod +ProductNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..Product + +ProductSet(%this,newvalue) ; + s:newvalue'=i%Product $$$objModBit(##this,12)=1 + s i%Product=newvalue QUIT $$$OK + q "" + +ProductSetModified(%this,newvalue) ; + s $$$objModBit(##this,12)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..StockType +#classmethod +StockTypeDisplayToLogical(%val) ; + q:%val="NietStock" "N" + q:%val="Stock" "S" + q:%val="Contract" "C" + q "" + q "" +#endclassmethod +#endclasscontext ..StockType + +StockTypeGet(%this) ; + q i%StockType + +StockTypeIsModified(%this) ; + q $$$objModBit(##this,13) + +#classmethod +StockTypeIsValid(value) ; + q $s(..StockTypeIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.StockType")) +#endclassmethod + +#classcontext ..StockType +#classmethod +StockTypeIsValidDT(%val) ; + q (%val'[";")&(";N;S;C;"[(";"_%val_";")) +#endclassmethod +#endclasscontext ..StockType + +#classcontext ..StockType +#classmethod +StockTypeLogicalToDisplay(%val) ; + q:%val="N" "NietStock" + q:%val="S" "Stock" + q:%val="C" "Contract" + q "" + q "" +#endclassmethod +#endclasscontext ..StockType + +#classcontext ..StockType +#classmethod +StockTypeNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..StockType + +StockTypeSet(%this,newvalue) ; + s:newvalue'=i%StockType $$$objModBit(##this,13)=1 + s i%StockType=newvalue QUIT $$$OK + q "" + +StockTypeSetModified(%this,newvalue) ; + s $$$objModBit(##this,13)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..SubGroep +#classmethod +SubGroepDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..SubGroep + +SubGroepGet(%this) ; + q i%SubGroep + +SubGroepIsModified(%this) ; + q $$$objModBit(##this,14) + +#classmethod +SubGroepIsValid(value) ; + q $s(..SubGroepIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.ProductKenmerken.SubGroep")) +#endclassmethod + +#classcontext ..SubGroep +#classmethod +SubGroepIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..SubGroep + +#classcontext ..SubGroep +#classmethod +SubGroepLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..SubGroep + +#classcontext ..SubGroep +#classmethod +SubGroepNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..SubGroep + +SubGroepSet(%this,newvalue) ; + s:newvalue'=i%SubGroep $$$objModBit(##this,14)=1 + s i%SubGroep=newvalue QUIT $$$OK + q "" + +SubGroepSetModified(%this,newvalue) ; + s $$$objModBit(##this,14)=''newvalue + QUIT $$$OK + q "" + +#classmethod +ExtentExecute(qHandle) ; + n %sc,SQLCODE + #sqlcompile select=RUNTIME + s %sc=$$$OK + s qHandle=$i(%objcn) +#EXECUTE s %msqlvar="%objcs(qHandle" + &sql(DECLARE Q13 CURSOR FOR + SELECT ID FROM Stat_PR.ProductKenmerken) +#EXECUTE k %msqlvar + &sql(OPEN Q13) + i SQLCODE s %sc=$$$ERROR($$$QueryCannotInstantiate,"SQLCODE = "_SQLCODE) + QUIT %sc + q "" +#endclassmethod + +#classmethod +ExtentClose(qHandle) ; + n SQLCODE + &sql(CLOSE Q13) + k %objcsc(qHandle),%objcsp(qHandle),%objcss(qHandle),%objcst(qHandle),%objcsl(qHandle),%objcsR(qHandle),%objcsZ(qHandle),%objcsd(qHandle) + QUIT $s('SQLCODE:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentFetch(qHandle,Row,AtEnd) s AtEnd=$g(AtEnd,0) + n SQLCODE,c1 + s Row="",AtEnd=0 + &sql(FETCH Q13 INTO :c1) + i 'SQLCODE s Row=$lb(c1) i 1 + e s AtEnd=1 + QUIT $s('SQLCODE:$$$OK,SQLCODE=100:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentFetchRows(qHandle,FetchCount,RowSet,ReturnCount,AtEnd) s FetchCount=$g(FetchCount,0) + n done,i,SQLCODE,c1 + s done=0,RowSet="",ReturnCount=0,AtEnd=0 + f i=1:1 DO q:done + . &sql(FETCH Q13 INTO :c1) + . i 'SQLCODE s RowSet=RowSet_$lb(c1),ReturnCount=ReturnCount+1 s:ReturnCount=FetchCount done=1 s:($l(RowSet)+($l(RowSet)\ReturnCount))>24000 done=1 i 1 + . e s done=1,AtEnd=1 + QUIT $s('SQLCODE:$$$OK,SQLCODE=100:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentGetInfo(colinfo,parminfo,idinfo,qHandle) ; + s parminfo="" + n clientinfo + s clientinfo=$g($$$QUERYclientinfo($$$pMAC,"Stat.PR.ProductKenmerken","Extent")) + i clientinfo'="" s colinfo=$lg(clientinfo,1),parminfo=$lg(clientinfo,2),idinfo=$lg(clientinfo,3) QUIT $$$OK + n captions,exttypes,i,names,%sc + s colinfo="",parminfo="",idinfo=$lb(0) + s %sc=$$externaltype^%apiOLE("%Library.CacheString",.exttypes,"0") + QUIT:$$$ISERR(%sc) %sc + s names=$g($$$QUERYcolnames($$$pMAC,"Stat.PR.ProductKenmerken","Extent")) + s captions=$g($$$QUERYcolcaptions($$$pMAC,"Stat.PR.ProductKenmerken","Extent")) + f i=1:1:1 s colinfo=colinfo_$lb($lb($lg(names,i),$p(exttypes,",",i),$lg(captions,i))) + s idinfo=$lb(1) + s $$$QUERYclientinfo($$$pMAC,"Stat.PR.ProductKenmerken","Extent")=$lb(colinfo,parminfo,idinfo) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +ExtentPrepare(qHandle,statement,containid,optional) s containid=$g(containid,0) + QUIT $$$OK + q "" +#endclassmethod + +#endclasscontext Stat.PR.ProductKenmerken \ No newline at end of file Index: Stat/PR/StockABCKwotering/2.mac.rou =================================================================== diff -u --- Stat/PR/StockABCKwotering/2.mac.rou (revision 0) +++ Stat/PR/StockABCKwotering/2.mac.rou (revision 1156) @@ -0,0 +1,263 @@ + ;Stat.PR.StockABCKwotering.2 + ;(C)InterSystems, generated for class Stat.PR.StockABCKwotering. Do NOT edit. 09/30/2002 12:21PM + ;;6BA0548E43E1749A;Stat.PR.StockABCKwotering + q + ; +#classcontext Stat.PR.StockABCKwotering + #; method code import packages begin + #import %Library + #import Stat.PR + #; method code import packages end + #; method code include files begin + #include %occExtent + #include %occInclude + #include %occTransaction + #; method code include files end + + +#classcontext ..Kwotering +#classmethod +KwoteringNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..Kwotering + +KwoteringSet(%this,newvalue) ; + s:newvalue'=i%Kwotering $$$objModBit(##this,10)=1 + s i%Kwotering=newvalue QUIT $$$OK + q "" + +KwoteringSetModified(%this,newvalue) ; + s $$$objModBit(##this,10)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Product +#classmethod +ProductDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..Product + +ProductGet(%this) ; + q i%Product + +ProductIsModified(%this) ; + q $$$objModBit(##this,11) + +#classmethod +ProductIsValid(value) ; + q $s(..ProductIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.Product")) +#endclassmethod + +#classcontext ..Product +#classmethod +ProductIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..Product + +#classcontext ..Product +#classmethod +ProductLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..Product + +#classcontext ..Product +#classmethod +ProductNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..Product + +ProductSet(%this,newvalue) ; + s:newvalue'=i%Product $$$objModBit(##this,11)=1 + s i%Product=newvalue QUIT $$$OK + q "" + +ProductSetModified(%this,newvalue) ; + s $$$objModBit(##this,11)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Rotatie +#classmethod +RotatieDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..Rotatie + +RotatieGet(%this) ; + q i%Rotatie + +RotatieIsModified(%this) ; + q $$$objModBit(##this,12) + +#classmethod +RotatieIsValid(value) ; + q $s(..RotatieIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.Rotatie")) +#endclassmethod + +#classcontext ..Rotatie +#classmethod +RotatieIsValidDT(%val) ; + q $isvalidnum(%val,,,) +#endclassmethod +#endclasscontext ..Rotatie + +#classcontext ..Rotatie +#classmethod +RotatieLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..Rotatie + +#classcontext ..Rotatie +#classmethod +RotatieNormalize(%val) ; + q +%val +#endclassmethod +#endclasscontext ..Rotatie + +RotatieSet(%this,newvalue) ; + s:newvalue'=i%Rotatie $$$objModBit(##this,12)=1 + s i%Rotatie=newvalue QUIT $$$OK + q "" + +RotatieSetModified(%this,newvalue) ; + s $$$objModBit(##this,12)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..StockType +#classmethod +StockTypeDisplayToLogical(%val) ; + q:%val="Stock" "S" + q:%val="NietSTock" "N" + q:%val="Contract" "C" + q "" + q "" +#endclassmethod +#endclasscontext ..StockType + +StockTypeGet(%this) ; + q i%StockType + +StockTypeIsModified(%this) ; + q $$$objModBit(##this,13) + +#classmethod +StockTypeIsValid(value) ; + q $s(..StockTypeIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.StockType")) +#endclassmethod + +#classcontext ..StockType +#classmethod +StockTypeIsValidDT(%val) ; + q (%val'[";")&(";S;N;C;"[(";"_%val_";")) +#endclassmethod +#endclasscontext ..StockType + +#classcontext ..StockType +#classmethod +StockTypeLogicalToDisplay(%val) ; + q:%val="S" "Stock" + q:%val="N" "NietSTock" + q:%val="C" "Contract" + q "" + q "" +#endclassmethod +#endclasscontext ..StockType + +#classcontext ..StockType +#classmethod +StockTypeNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..StockType + +StockTypeSet(%this,newvalue) ; + s:newvalue'=i%StockType $$$objModBit(##this,13)=1 + s i%StockType=newvalue QUIT $$$OK + q "" + +StockTypeSetModified(%this,newvalue) ; + s $$$objModBit(##this,13)=''newvalue + QUIT $$$OK + q "" + +#classmethod +ExtentExecute(qHandle) ; + n %sc,SQLCODE + #sqlcompile select=RUNTIME + s %sc=$$$OK + s qHandle=$i(%objcn) +#EXECUTE s %msqlvar="%objcs(qHandle" + &sql(DECLARE Q13 CURSOR FOR + SELECT ID FROM Stat_PR.StockABCKwotering) +#EXECUTE k %msqlvar + &sql(OPEN Q13) + i SQLCODE s %sc=$$$ERROR($$$QueryCannotInstantiate,"SQLCODE = "_SQLCODE) + QUIT %sc + q "" +#endclassmethod + +#classmethod +ExtentClose(qHandle) ; + n SQLCODE + &sql(CLOSE Q13) + k %objcsc(qHandle),%objcsp(qHandle),%objcss(qHandle),%objcst(qHandle),%objcsl(qHandle),%objcsR(qHandle),%objcsZ(qHandle),%objcsd(qHandle) + QUIT $s('SQLCODE:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentFetch(qHandle,Row,AtEnd) s AtEnd=$g(AtEnd,0) + n SQLCODE,c1 + s Row="",AtEnd=0 + &sql(FETCH Q13 INTO :c1) + i 'SQLCODE s Row=$lb(c1) i 1 + e s AtEnd=1 + QUIT $s('SQLCODE:$$$OK,SQLCODE=100:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentFetchRows(qHandle,FetchCount,RowSet,ReturnCount,AtEnd) s FetchCount=$g(FetchCount,0) + n done,i,SQLCODE,c1 + s done=0,RowSet="",ReturnCount=0,AtEnd=0 + f i=1:1 DO q:done + . &sql(FETCH Q13 INTO :c1) + . i 'SQLCODE s RowSet=RowSet_$lb(c1),ReturnCount=ReturnCount+1 s:ReturnCount=FetchCount done=1 s:($l(RowSet)+($l(RowSet)\ReturnCount))>24000 done=1 i 1 + . e s done=1,AtEnd=1 + QUIT $s('SQLCODE:$$$OK,SQLCODE=100:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentGetInfo(colinfo,parminfo,idinfo,qHandle) ; + s parminfo="" + n clientinfo + s clientinfo=$g($$$QUERYclientinfo($$$pMAC,"Stat.PR.StockABCKwotering","Extent")) + i clientinfo'="" s colinfo=$lg(clientinfo,1),parminfo=$lg(clientinfo,2),idinfo=$lg(clientinfo,3) QUIT $$$OK + n captions,exttypes,i,names,%sc + s colinfo="",parminfo="",idinfo=$lb(0) + s %sc=$$externaltype^%apiOLE("%Library.CacheString",.exttypes,"0") + QUIT:$$$ISERR(%sc) %sc + s names=$g($$$QUERYcolnames($$$pMAC,"Stat.PR.StockABCKwotering","Extent")) + s captions=$g($$$QUERYcolcaptions($$$pMAC,"Stat.PR.StockABCKwotering","Extent")) + f i=1:1:1 s colinfo=colinfo_$lb($lb($lg(names,i),$p(exttypes,",",i),$lg(captions,i))) + s idinfo=$lb(1) + s $$$QUERYclientinfo($$$pMAC,"Stat.PR.StockABCKwotering","Extent")=$lb(colinfo,parminfo,idinfo) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +ExtentPrepare(qHandle,statement,containid,optional) s containid=$g(containid,0) + QUIT $$$OK + q "" +#endclassmethod + +#endclasscontext Stat.PR.StockABCKwotering \ No newline at end of file Index: zTryout/JCL/Export.cls.xml =================================================================== diff -u --- zTryout/JCL/Export.cls.xml (revision 0) +++ zTryout/JCL/Export.cls.xml (revision 1156) @@ -0,0 +1,22 @@ + + + +1 +%RegisteredObject +0 + + +1 + + + + Index: SQLStat/PRStockABCKwotering/2.mac.rou =================================================================== diff -u --- SQLStat/PRStockABCKwotering/2.mac.rou (revision 0) +++ SQLStat/PRStockABCKwotering/2.mac.rou (revision 1156) @@ -0,0 +1,194 @@ + ;SQLStat.PRStockABCKwotering.2 + ;(C)InterSystems, generated for class SQLStat.PRStockABCKwotering. Do NOT edit. 10/01/2002 05:52PM + ;;58C49E05537E0FF5;SQLStat.PRStockABCKwotering + q + ; +#classcontext SQLStat.PRStockABCKwotering + #; method code import packages begin + #import %Library + #import SQLStat + #; method code import packages end + #; method code include files begin + #include %occExtent + #include %occInclude + #include %occTransaction + #; method code include files end + + +ProductSetModified(%this,newvalue) ; + s $$$objModBit(##this,11)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Rotatie +#classmethod +RotatieDisplayToLogical(%val) ; + q $in(%val,"#.0","") +#endclassmethod +#endclasscontext ..Rotatie + +RotatieGet(%this) ; + q i%Rotatie + +RotatieIsModified(%this) ; + q $$$objModBit(##this,12) + +#classmethod +RotatieIsValid(value) ; + q $s(..RotatieIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.Rotatie")) +#endclassmethod + +#classcontext ..Rotatie +#classmethod +RotatieIsValidDT(%val) ; + q $isvalidnum(%val,1,-99999999999999999.9,99999999999999999.9) +#endclassmethod +#endclasscontext ..Rotatie + +#classcontext ..Rotatie +#classmethod +RotatieLogicalToDisplay(%val) ; + q $s(%val="":"",1:$fn(%val,"#.0",1)) +#endclassmethod +#endclasscontext ..Rotatie + +#classcontext ..Rotatie +#classmethod +RotatieNormalize(%val) ; + q +$fn(%val,"",1) +#endclassmethod +#endclasscontext ..Rotatie + +RotatieSet(%this,newvalue) ; + s:newvalue'=i%Rotatie $$$objModBit(##this,12)=1 + s i%Rotatie=newvalue QUIT $$$OK + q "" + +RotatieSetModified(%this,newvalue) ; + s $$$objModBit(##this,12)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..StockType +#classmethod +StockTypeDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..StockType + +StockTypeGet(%this) ; + q i%StockType + +StockTypeIsModified(%this) ; + q $$$objModBit(##this,13) + +#classmethod +StockTypeIsValid(value) ; + q $s(..StockTypeIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.StockType")) +#endclassmethod + +#classcontext ..StockType +#classmethod +StockTypeIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..StockType + +#classcontext ..StockType +#classmethod +StockTypeLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..StockType + +#classcontext ..StockType +#classmethod +StockTypeNormalize(%val) ; + q $e(%val,1,1) +#endclassmethod +#endclasscontext ..StockType + +StockTypeSet(%this,newvalue) ; + s:newvalue'=i%StockType $$$objModBit(##this,13)=1 + s i%StockType=newvalue QUIT $$$OK + q "" + +StockTypeSetModified(%this,newvalue) ; + s $$$objModBit(##this,13)=''newvalue + QUIT $$$OK + q "" + +#classmethod +ExtentExecute(qHandle) ; + n %sc,SQLCODE + #sqlcompile select=RUNTIME + s %sc=$$$OK + s qHandle=$i(%objcn) +#EXECUTE s %msqlvar="%objcs(qHandle" + &sql(DECLARE Q13 CURSOR FOR + SELECT Product,Datum FROM SQLStat.StockABCKwotering) +#EXECUTE k %msqlvar + &sql(OPEN Q13) + i SQLCODE s %sc=$$$ERROR($$$QueryCannotInstantiate,"SQLCODE = "_SQLCODE) + QUIT %sc + q "" +#endclassmethod + +#classmethod +ExtentClose(qHandle) ; + n SQLCODE + &sql(CLOSE Q13) + k %objcsc(qHandle),%objcsp(qHandle),%objcss(qHandle),%objcst(qHandle),%objcsl(qHandle),%objcsR(qHandle),%objcsZ(qHandle),%objcsd(qHandle) + QUIT $s('SQLCODE:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentFetch(qHandle,Row,AtEnd) s AtEnd=$g(AtEnd,0) + n SQLCODE,c1,c2 + s Row="",AtEnd=0 + &sql(FETCH Q13 INTO :c1,:c2) + i 'SQLCODE s Row=$lb(c1_"||"_c2) i 1 + e s AtEnd=1 + QUIT $s('SQLCODE:$$$OK,SQLCODE=100:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentFetchRows(qHandle,FetchCount,RowSet,ReturnCount,AtEnd) s FetchCount=$g(FetchCount,0) + n done,i,SQLCODE,c1,c2 + s done=0,RowSet="",ReturnCount=0,AtEnd=0 + f i=1:1 DO q:done + . &sql(FETCH Q13 INTO :c1,:c2) + . i 'SQLCODE s RowSet=RowSet_$lb(c1_"||"_c2),ReturnCount=ReturnCount+1 s:ReturnCount=FetchCount done=1 s:($l(RowSet)+($l(RowSet)\ReturnCount))>24000 done=1 i 1 + . e s done=1,AtEnd=1 + QUIT $s('SQLCODE:$$$OK,SQLCODE=100:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentGetInfo(colinfo,parminfo,idinfo,qHandle) ; + s parminfo="" + n clientinfo + s clientinfo=$g($$$QUERYclientinfo($$$pMAC,"SQLStat.PRStockABCKwotering","Extent")) + i clientinfo'="" s colinfo=$lg(clientinfo,1),parminfo=$lg(clientinfo,2),idinfo=$lg(clientinfo,3) QUIT $$$OK + n captions,exttypes,i,names,%sc + s colinfo="",parminfo="",idinfo=$lb(0) + s %sc=$$externaltype^%apiOLE("%Library.CacheString",.exttypes,"0") + QUIT:$$$ISERR(%sc) %sc + s names=$g($$$QUERYcolnames($$$pMAC,"SQLStat.PRStockABCKwotering","Extent")) + s captions=$g($$$QUERYcolcaptions($$$pMAC,"SQLStat.PRStockABCKwotering","Extent")) + f i=1:1:1 s colinfo=colinfo_$lb($lb($lg(names,i),$p(exttypes,",",i),$lg(captions,i))) + s idinfo=$lb(1) + s $$$QUERYclientinfo($$$pMAC,"SQLStat.PRStockABCKwotering","Extent")=$lb(colinfo,parminfo,idinfo) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +ExtentPrepare(qHandle,statement,containid,optional) s containid=$g(containid,0) + QUIT $$$OK + q "" +#endclassmethod + +#endclasscontext SQLStat.PRStockABCKwotering \ No newline at end of file Index: UI/TNT/System.mac.rou =================================================================== diff -u --- UI/TNT/System.mac.rou (revision 0) +++ UI/TNT/System.mac.rou (revision 1156) @@ -0,0 +1,191 @@ + #Include UI.TNT.System + + // ==================================================== + // Een collectie aan gemeenschappelijke UI.TNT routines + // ==================================================== + +GetDefaultFGColor(FormType,FontSelect) + Set Font=%Screen.Fonts(FormType,FontSelect) + Quit Font.FGColor +GetDefaultBGColor(FormType,FontSelect) + Set Font=%Screen.Fonts(FormType,FontSelect) + Quit Font.BGColor + +PointInRect(Y, X, lbRect) + Quit (Y'<$LI(lbRect,1)) && (X'<$LI(lbRect,2)) && (Y'>$LI(lbRect,3)) && (X'>$LI(lbRect,4)) + + // Geef een control op en krijg zijn form terug +GetParentForm(Control) + Quit:(Control="") "" + + For Quit:(Control.Parent="") Set Control=Control.Parent + + Quit $S(Control.%IsA("UI.TNT.TForm"):Control,1:"") + + // Geef een control op en krijg een 'leesbare' naam terug +GetDebugControlName(Control) + Quit:('$IsObject(Control)) "(nil)" + Set Name=Control.%ClassName(1) + Set:($L(Name,"UI.TNT.")=2) Name=$P(Name,"UI.TNT.",2) + If Control.%IsA("UI.TNT.TControlBasis") Do + . Set Name=Control.Name_" ("_Name_")" + . For Quit:(Control.Parent="") Set Control=Control.Parent, Name=Control.Name_"."_Name + Quit Name + + // ***************************************************************************************************** + // InputBox + // ***************************************************************************************************** +InputBox(Caption,Message,DefaultValue,Width) + #Define cntDefaultWidth 50 + + ;Message form + New MsgForm + Set MsgForm=%Application.CreateForm("UI.TNT.TForm","dlgInput"_$TR(Caption," ",""),Caption,1,1,10,30,,$$$ftDialog) + + New FormWidth + Set FormWidth=$G(Width,$$$cntDefaultWidth) + Set MsgForm.Width=FormWidth + Set MsgForm.Left=(%Screen.Width-FormWidth)\2 + + ;FormHeight bepalen adhv message + New Memo + Set Memo=##class(UI.TNT.TMemo).Create(MsgForm,"mmoMsg","",2,2,2,FormWidth-2,2,2) + Set Memo.TabStop=0 + Set Memo.Text=Message + Do Memo.Wrap() + + ;Indien slechts 1 row, neem dan toch een plaats van hoogte 3 in beslag + Set Memo.Height=Memo.Rows + + New FormHeight + Set FormHeight=Memo.Height+5 + + Set MsgForm.Height=FormHeight + Set MsgForm.Top=(%Screen.Height-FormHeight)\2 + + ;Msg kader + New Kader + Set Kader=##class(UI.TNT.TKader).Create(MsgForm,"kdrMsg",Caption,1,1,MsgForm.Height,MsgForm.Width,1,1,,) + + ;Lijn boven buttons + New Line + Set Line=##class(UI.TNT.TLijn).CreateLijn("H",MsgForm,"lnMsg",FormHeight-2,1,FormWidth,FormHeight-2,,,$LB($LB(1,"ML"),$LB(,"MR"))) + + ;Creatie van de buttons op de form + New Button,BtnCaption + + Set BtnCaption=$$ButtonToCaption($$$mbCancel) + Set Button=##class(UI.TNT.TButton).Create(MsgForm,"Btn"_BtnCaption,BtnCaption,FormHeight-1,FormWidth-12,1,11,5,5,,$LB($$$clUltraLight,$$$clDark),$$$alCenter) + Set Button.ModalResult=$$$mrCancel + + Set BtnCaption=$$ButtonToCaption($$$mbOk) + Set Button=##class(UI.TNT.TButton).Create(MsgForm,"Btn"_BtnCaption,BtnCaption,FormHeight-1,FormWidth-24,1,11,4,4,,$LB($$$clUltraLight,$$$clDark),$$$alCenter) + Set Button.ModalResult=$$$mrOk + + New Edit + Set Edit=##class(UI.TNT.TEdit).Create(MsgForm,"txtValue","",FormHeight-3,2,1,FormWidth-4,3,3) + Set Edit.Caption=DefaultValue + + New Result + Set Result=MsgForm.ShowModal() + + Set DefaultValue=Edit.Caption + + Do MsgForm.Destroy() + + Quit Result + + // ***************************************************************************************************** + // MessageBox + // ***************************************************************************************************** +MessageBox(Caption,Message,lbButtons,MessageType=$$$mtInformation,DefaultButton=$$$mbCancel) + #Define cntMinButtonWidth 10 + #Define cntButtonSpace 2 + #Define cntMinFormWidth 60 + + Set lbButtons=$G(lbButtons,$LB($$$mbOk)) + + ;Message form + New MsgForm,Font + Set Font=$S(MessageType=$$$mtError:$LB($$$clRed),1:"") + Set MsgForm=%Application.CreateForm("UI.TNT.TForm","dlg"_$TR(Caption," ",""),Caption,1,1,10,30,Font,$$$ftDialog) + + ;Formwidth achterhalen adhv buttons + New Loop,BtnWidth,BtnWidthSum,ButtonType,BtnCaption + Set BtnWidthSum=0 + For Loop=1:1:$LL(lbButtons) Do + . Set ButtonType=$LI(lbButtons,Loop) + . Set BtnCaption=$$ButtonToCaption(ButtonType) + . Set BtnWidth=$L(BtnCaption)+2 + . Set:(BtnWidth<$$$cntMinButtonWidth) BtnWidth=$$$cntMinButtonWidth + . If Loop=1 Do + .. Set BtnWidthSum=BtnWidth + . Else Do + .. Set BtnWidthSum=BtnWidthSum+$$$cntButtonSpace+BtnWidth + + New FormWidth + Set FormWidth=BtnWidthSum+4 + Set:(FormWidth<$$$cntMinFormWidth) FormWidth=$$$cntMinFormWidth + Set MsgForm.Width=FormWidth + Set MsgForm.Left=(%Screen.Width-FormWidth)\2 + + New ButtonOffsetLeft + Set ButtonOffsetLeft=((FormWidth-BtnWidthSum)\2)+1 + + ;FormHeight bepalen adhv message + New Memo + Set Memo=##class(UI.TNT.TMemo).Create(MsgForm,"mmoMsg","",2,2,2,FormWidth-2,2,2) + Set Memo.TabStop=0 + Set Memo.Enabled=0 + Set Memo.Text=Message + Do Memo.Wrap() + + ;Indien slechts 1 row, neem dan toch een plaats van hoogte 3 in beslag + If Memo.Rows=1 Do + . Set Memo.Height=3 + . Set Memo.Top=3 + Else Do + . Set Memo.Height=Memo.Rows + + New FormHeight + Set FormHeight=Memo.Height+4 + + Set MsgForm.Height=FormHeight + Set MsgForm.Top=(%Screen.Height-FormHeight)\2 + + ;Msg kader + New Kader + Set Kader=##class(UI.TNT.TKader).Create(MsgForm,"kdrMsg",Caption,1,1,MsgForm.Height,MsgForm.Width,1,1,,) + + ;Lijn boven buttons + New Line + Set Line=##class(UI.TNT.TLijn).CreateLijn("H",MsgForm,"lnMsg",FormHeight-2,1,FormWidth,FormHeight-2,,,$LB($LB(1,"ML"),$LB(,"MR"))) + + ;Creatie van de buttons op de form + New Button,DefButton + Set BtnWidthSum=0, DefButton=0 + + For Loop=1:1:$LL(lbButtons) Do + . Set ButtonType=$LI(lbButtons,Loop) + . Set BtnCaption=$$ButtonToCaption(ButtonType) + . Set BtnWidth=$L(BtnCaption)+2 + . Set:(BtnWidth<$$$cntMinButtonWidth) BtnWidth=$$$cntMinButtonWidth + . Set Button=##class(UI.TNT.TButton).Create(MsgForm,"Btn"_BtnCaption,BtnCaption,FormHeight-1,ButtonOffsetLeft+BtnWidthSum,1,BtnWidth,(2+Loop),(2+Loop),,$LB($$$clUltraLight,$$$clDark),$$$alCenter) + . Set BtnWidthSum=BtnWidthSum+BtnWidth+2 + . Set Button.ModalResult=$$ButtonToModalResult(ButtonType) + . Set:(ButtonType=DefaultButton) DefButton=Button + + Set:($IsObject(DefButton)) MsgForm.ActiveControl=DefButton + + New Result + Set Result=MsgForm.ShowModal() + + Do MsgForm.Destroy() + + Quit Result + +ButtonToModalResult(Button) + Quit $CASE(Button,$$$mbYes:$$$mrYes,$$$mbNo:$$$mrNo,$$$mbOk:$$$mrOk,$$$mbCancel:$$$mrCancel,$$$mbAbort:$$$mrAbort,$$$mbRetry:$$$mrRetry,$$$mbIgnore:$$$mrIgnore,$$$mbAll:$$$mrAll,$$$mbNoToAll:$$$mrNoToAll,$$$mbYesToAll:$$$mrYesToAll,$$$mbHelp:$$$mrHelp,:Button) + +ButtonToCaption(Button) + Quit $CASE(Button,$$$mbYes:$$$SMsgDlgYes,$$$mbNo:$$$SMsgDlgNo,$$$mbOk:$$$SMsgDlgOk,$$$mbCancel:$$$SMsgDlgCancel,$$$mbAbort:$$$SMsgDlgAbort,$$$mbRetry:$$$SMsgDlgRetry,$$$mbIgnore:$$$SMsgDlgIgnore,$$$mbAll:$$$SMsgDlgAll,$$$mbNoToAll:$$$SMsgDlgNoToAll,$$$mbYesToAll:$$$SMsgDlgYesToAll,$$$mbHelp:$$$SMsgDlgHelp,:Button) \ No newline at end of file Index: BL/vHintra/Common.inc.rou =================================================================== diff -u --- BL/vHintra/Common.inc.rou (revision 0) +++ BL/vHintra/Common.inc.rou (revision 1156) @@ -0,0 +1,2 @@ + #Define StripC0(%Local) $S($C(0)[$G(%Local):"",1:%Local) + \ No newline at end of file Index: Stat/PR/StockABCKwotering/1.mac.rou =================================================================== diff -u --- Stat/PR/StockABCKwotering/1.mac.rou (revision 0) +++ Stat/PR/StockABCKwotering/1.mac.rou (revision 1156) @@ -0,0 +1,841 @@ + ;Stat.PR.StockABCKwotering.1 + ;(C)InterSystems, generated for class Stat.PR.StockABCKwotering. Do NOT edit. 09/30/2002 12:21PM + ;;6BA0548E43E1749A;Stat.PR.StockABCKwotering + q + ; +#classcontext Stat.PR.StockABCKwotering + #; method code import packages begin + #import %Library + #import Stat.PR + #; method code import packages end + #; method code include files begin + #include %occExtent + #include %occInclude + #include %occTransaction + #; method code include files end + + +%AcquireLock(%this,locktype) ; + n %sc,id + s id=..%Id() QUIT:$g(id)="" $$$ERROR($$$NullId) + s %sc=$$$OK + i $g(locktype)="e" l +(^Stat.PR.StockKwotD(i%Product,i%Datum)):5 s:'$t %sc=$$$ERROR($$$LockFailedToAcquireExclusive) QUIT %sc + i $g(locktype)="s" l +(^Stat.PR.StockKwotD(i%Product,i%Datum,$j)):5 s:'$t %sc=$$$ERROR($$$LockFailedToAcquireRead) QUIT %sc + QUIT $$$ERROR($$$LockTypeInvalid,locktype) + q "" + +#classmethod +%BuildIndices(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%CheckUnique(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%CheckUnique") + q "" +#endclassmethod + +%ClassName(%this,fullname) s fullname=$g(fullname,0) + q $s(fullname:"Stat.PR.StockABCKwotering",1:"StockABCKwotering") + +%Close(%this) ; + n a s a=$$$objReferenceCount(%this) q:'a $$$OK i a'>$ll($g($$$objReferenceList(%this))) q $$$ERROR($$$TooManyCallsToClose) + s $$$objReferenceCount(%this)=a-1 + i a>1 q:(a-1)>$ll($g($$$objReferenceList(%this))) $$$OK d q:'a $$$OK s $$$objReferenceCount(%this)=0 + . n checklist,checkobj,list,oreffrom,close,i s checklist=$lb(%this),close(%this)="" + . f s checkobj=$li(checklist) s checklist=$li(checklist,2,-1) d q:checklist=""!'a + . . s list=$g($$$objReferenceList(checkobj)),oreffrom="" f i=1:1:$ll(list) s oreffrom=$li(list,i) i '$d(close(oreffrom)) s:$$$objReferenceCount(oreffrom)=0 a=0 q:'a s:$$$objReferenceCount(oreffrom)>$ll($g($$$objReferenceList(oreffrom))) a=0 q:'a s close(oreffrom)="",checklist=checklist_$lb(oreffrom) + i ..%Concurrency=3 d ..%ReleaseLock("s") + i ..%Concurrency=4 d ..%ReleaseLock("e") + s a=$$$objOID(%this) + $$$DeleteObject(%this) + i a'="" $$$ActiveOidRemove(a,%this) + k $$$txLIST(%this),$$$txOIDASSIGNED(%this),$$$txMODIFIED(%this) + QUIT $$$OK + q "" + +#classmethod +%Delete(oid,concurrency) s oid=$g(oid,""),concurrency=$g(concurrency,$zu(115,10)) + n class,id,sc,traninit QUIT:oid="" $$$ERROR($$$NullOid) s id=$$$oidPrimary(oid) QUIT:id="" $$$ERROR($$$NullId) + s class=$$$oidClassName(oid) + i class'="" s class=$$$NormalizeClassname(class) + i class="" s sc=..%OnDetermineClass(oid,.class) q:$$$ISERR(sc) sc s oid=$$$oidInsertClassName(oid,class) + i "Stat.PR.StockABCKwotering"'=class q $zobjclassmethod(class,"%Delete",oid) + s traninit=0 i $zu(115,9) s traninit=1 tstart + s sc=..%DeleteData(id,concurrency) +%DeleteEnd i traninit DO + . i $$$ISOK(sc) tcommit + . i $$$ISERR(sc) trollback + i $$$ISERR(sc) QUIT sc + n oref $$$ActiveOidModified(oid,oref) + QUIT sc + q "" +#endclassmethod + +#classmethod +%DeleteData(id,concurrency) ; + QUIT:id="" $$$ERROR($$$NullId) + n %kp1,%kp2,%sc + s %sc=$$$ERROR($$$DeleteObjectNotFound) + s %kp1=$p(id,"||",1),%kp2=$p(id,"||",2) + i concurrency>1 l +(^Stat.PR.StockKwotD(%kp1,%kp2)):5 i '$t QUIT $$$ERROR($$$LockFailedToAcquireExclusive) + s:($d(^Stat.PR.StockKwotD(%kp1,%kp2))) %sc=$$$OK + i $$$ISOK(%sc) DO + . k ^Stat.PR.StockKwotD(%kp1,%kp2) + i concurrency>1 l -(^Stat.PR.StockKwotD(%kp1,%kp2)) + QUIT %sc + q "" +#endclassmethod + +#classmethod +%DeleteExtent(concurrency,deletecount,instancecount) s concurrency=$g(concurrency,$zu(115,10)) + n atend,id,qh,row,rs,sc + s deletecount=0,instancecount=0 + s sc=..ExtentExecute(.qh) QUIT:$$$ISERR(sc) sc + f s sc=..ExtentFetch(.qh,.row,.atend) q:$s(row="":1,$$$ISERR(sc):1,1:0) s id=$lg(row) i id'="" s sc=..%Delete($lb(id),concurrency) s instancecount=instancecount+1 s:$$$ISOK(sc) deletecount=deletecount+1 q:atend + d ..ExtentClose(qh) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%DeleteId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + q ..%Delete($$$oidForm(id),concurrency) +#endclassmethod + +%DowngradeConcurrency(%this,concurrency) ; + n current,sc + s current=..%Concurrency + #; If the requested setting is greater than the current setting, then do nothing + If concurrency>current QUIT $$$OK + #; Locks are not retained for any setting less than 3 and if the old and new + #; setting are the same, nothing is to done except update the concurrency setting + i current<3!(current=concurrency) s:concurrency2 s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc + #; the following line releases the old lock which we know must be there + #; because we process and quit above for current<3 + Do ..%ReleaseLock($s(current=3:"s",1:"e")) + #; Update the concurrency setting: + s ..%Concurrency=concurrency + QUIT $$$OK + q "" + +#classmethod +%Exists(oid) s oid=$g(oid,"") + q ..%ExistsId($$$oidPrimary(oid)) +#endclassmethod + +#classmethod +%ExistsId(id) s id=$g(id,"") + QUIT:id="" $$$ERROR($$$NullId) + s %kp1=$p(id,"||",1),%kp2=$p(id,"||",2) + i ($d(^Stat.PR.StockKwotD(%kp1,%kp2))) Quit 1 + QUIT 0 + q "" +#endclassmethod + +%GetSwizzleObject(%this,force,oid) s force=$g(force,0) + n sc s oid="" i force=0 s oid=..%Oid() QUIT $$$OK + i force=2 s sc=..%Save(1) s:$$$ISOK(sc) oid=..%Oid() QUIT sc + s oid=..%Oid() QUIT:oid'="" $$$OK + s sc=..%Save(0) s:$$$ISOK(sc) oid=..%Oid() QUIT sc + q "" + +%Id(%this) ; + q $$$oidPrimary($$$objOID(##this)) + +%IdSet(%this,id) ; + n oid s oid=$$$oidCompose(id,"Stat.PR.StockABCKwotering") + i $$$objOID(##this)'="",$$$objOID(##this)'=oid QUIT $$$ERROR($$$OidPreviouslyAssigned) + s $$$objOID(##this)=oid + $$$ActiveOidInsert(oid,##this) + QUIT $$$OK + q "" + +%IncrementCount(%this) ; + $$$IncrementReferenceCount(%this) q + q + +#classmethod +%IsA(isclass) ; + q "~Stat.PR.StockABCKwotering~%Library.Persistent~%Library.RegisteredObject~"[("~"_$$$NormalizeClassname(isclass)_"~") +#endclassmethod + +%IsModified(%this) ; + q $$$objModAll(##this) + +#classmethod +%KillExtent() ; + n sc,subextent + s subextent="" f s subextent=$o($$$EXTSUBEXTENT($$$pEXT,"Stat.PR.StockABCKwotering",subextent)) q:subextent="" s sc=$zobjclassmethod(subextent,"%KillExtent") + s sc=..%PurgeIndices() q:$$$ISERR(sc) sc + k ^Stat.PR.StockKwotD + QUIT $$$OK + q "" +#endclassmethod + +%Load(%this,id) ; + n sc s sc=..%IdSet(id) QUIT:$$$ISERR(sc) sc + s sc=..%LoadData(id) QUIT:$$$ISERR(sc) sc + QUIT $$$OK + q "" + +%LoadData(%this,id) ; + n %sc + s %sc=$$$ERROR($$$LoadObjectNotFound) + s i%Product=$p(id,"||",1),i%Datum=$p(id,"||",2) + i ..%Concurrency=4 l +(^Stat.PR.StockKwotD(i%Product,i%Datum)):5 i '$t QUIT $$$ERROR($$$LockFailedToAcquireExclusive) + i ..%Concurrency'=4,..%Concurrency>1 l +(^Stat.PR.StockKwotD(i%Product,i%Datum,$j)):5 i '$t QUIT $$$ERROR($$$LockFailedToAcquireRead) + i '$d(^Stat.PR.StockKwotD(i%Product,i%Datum)) s i%ABCWaarde="",i%CiffPPL="",i%FysStock="",i%GemFysStock="",i%GemGewogenWVK="",i%GemWVK="",i%Kwotering="",i%Rotatie="",i%StockType="" + e DO + . n %s1 + . s %sc=$$$OK + . s %s1=$g(^Stat.PR.StockKwotD(i%Product,i%Datum)) + . s i%CiffPPL=$lg(%s1,2),i%FysStock=$lg(%s1,3),i%GemFysStock=$lg(%s1,4),i%GemGewogenWVK=$lg(%s1,5),i%GemWVK=$lg(%s1,6),i%Kwotering=$lg(%s1,9),i%Rotatie=$lg(%s1,10),i%ABCWaarde=$lg(%s1,12),i%StockType=$lg(%s1,13) + i ..%Concurrency=2 l -(^Stat.PR.StockKwotD(i%Product,i%Datum,$j)) + QUIT %sc + q "" + +#classmethod +%New(initvalue) ; + n %this,sc,oref +#endclassmethod + s %this=$$$CreateObject("Stat.PR.StockABCKwotering") + s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" + s i%%Concurrency=$zu(115,10),i%%IsInSave=0,i%ABCWaarde="",i%CiffPPL="",i%Datum="" + s i%FysStock="",i%GemFysStock="",i%GemGewogenWVK="",i%GemWVK="",i%Kwotering="" + s i%Product="",i%Rotatie="",i%StockType="" + $$$objModAllSet(##this,1) + QUIT %this +#classmethod + q "" +#endclassmethod + +%NormalizeObject(%this) ; + i i%ABCWaarde'="" s i%ABCWaarde=(..ABCWaardeNormalize(i%ABCWaarde)) + i i%CiffPPL'="" s i%CiffPPL=(..CiffPPLNormalize(i%CiffPPL)) + i i%Datum'="" s i%Datum=(..DatumNormalize(i%Datum)) + i i%FysStock'="" s i%FysStock=(..FysStockNormalize(i%FysStock)) + i i%GemFysStock'="" s i%GemFysStock=(..GemFysStockNormalize(i%GemFysStock)) + i i%GemGewogenWVK'="" s i%GemGewogenWVK=(..GemGewogenWVKNormalize(i%GemGewogenWVK)) + i i%GemWVK'="" s i%GemWVK=(..GemWVKNormalize(i%GemWVK)) + i i%Kwotering'="" s i%Kwotering=(..KwoteringNormalize(i%Kwotering)) + i i%Product'="" s i%Product=(..ProductNormalize(i%Product)) + i i%Rotatie'="" s i%Rotatie=(..RotatieNormalize(i%Rotatie)) + i i%StockType'="" s i%StockType=(..StockTypeNormalize(i%StockType)) + QUIT $$$OK + q "" + +%Oid(%this) ; + q $$$objOID(##this) + +#classmethod +%OnDetermineClass(oid,class) ; + n %o3,%o9,id,idclass + s id=$$$oidPrimary($g(oid)) QUIT:id="" $$$ERROR($$$NullId) + s %o9=$p(id,"||",1),%o3=$p(id,"||",2) + s idclass="Stat.PR.StockABCKwotering" + s class=$s(idclass="":"Stat.PR.StockABCKwotering",1:$p(idclass,$e(idclass),$l(idclass,$e(idclass))-1)) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%Open(oid,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + i $$$oidPrimary($g(oid))="" QUIT $$$NULLOREF + n sc,%this,class s class=$$$oidClassName(oid) + i class'="" s class=$$$NormalizeClassname(class) + i class="" s sc=..%OnDetermineClass(oid,.class) q:$$$ISERR(sc) $$$NULLOREF s oid=$$$oidInsertClassName(oid,class) + i "Stat.PR.StockABCKwotering"'=class q $zobjclassmethod(class,"%Open",oid,concurrency) +#endclassmethod + $$$ActiveOidSearch(oid,%this) + i %this DO QUIT %this + . i concurrency>..%Concurrency i '..%UpgradeConcurrency(concurrency) s %this="" q + . $$$IncrementReferenceCount(%this) + s %this=$$$CreateObject("Stat.PR.StockABCKwotering") + s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" + s i%%Concurrency="",..%Concurrency=concurrency + s sc=..%Load($$$oidPrimary(oid)) i $$$ISERR(sc) d ..%Close() QUIT $$$NULLOREF + s i%%IsInSave=0 + $$$objModAllSet(##this,0) + QUIT %this +#classmethod + q "" +#endclassmethod + +#classmethod +%OpenId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + q ..%Open($$$oidForm(id),concurrency) +#endclassmethod + +%PackageName(%this) ; + q "Stat.PR" + +#classmethod +%PurgeIndices(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$OK + q "" +#endclassmethod + +%ReleaseLock(%this,locktype) ; + n %sc,id + s id=..%Id() QUIT:$g(id)="" $$$ERROR($$$NullId) + s %sc=$$$OK + i $g(locktype)="e" l -(^Stat.PR.StockKwotD(i%Product,i%Datum)) QUIT $$$OK + i $g(locktype)="s" l -(^Stat.PR.StockKwotD(i%Product,i%Datum,$j)) QUIT $$$OK + QUIT $$$ERROR($$$LockTypeInvalid,locktype) + q "" + +%ResetAllObject(%this,force) s force=$g(force,0) + q 1 + +%RollBack(%this) ; + n sc s sc=$$$OK + i $d($$$txMODIFIED(##this)) $$$objModStateRestore(##this,$$$txMODIFIED(##this)) + QUIT sc + q "" + +%Save(%this,related) s related=$g(related,1) + n id,oid,ok,sc,traninit s oid=..%Oid(),id=$$$oidPrimary(oid) i 'i%%IsInSave d s i%%IsInSave=0 QUIT sc + . s oid="",sc=$$$OK,traninit=0 + . i $$$txNOTINTRAN DO + . . s traninit=1 + . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot + . . i '$zu(115,9) s $$$txSTATUS=1 q + . . s $$$txSTATUS=2 tstart + . s:$$$txON $$$txLIST(##this)="" + . s i%%IsInSave=1 + . s sc=..%ValidateObject(related+1) i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . s sc=..%NormalizeObject() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . s sc=..%ResetAllObject(related+1) i $$$ISERR(sc) d i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . . s sc=..%SaveData(id) q:$$$ISERR(sc) + . . s sc=..%ResetAllObject(related+1) + . i ..%IsModified()!(related=0) s sc=..%SaveData(id) s:$$$ISOK(sc) oid=..%Oid() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . i ..%IsModified(),$$$txON $$$objModStateSave(##this,$$$txMODIFIED(##this)) + . $$$objModAllSet(##this,0) i traninit d i $$$ISERR(ok) s sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()),oid="" q + . . i $$$txOFF k $$$txSTATUS s ok=$$$OK q + . . tcommit + . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot + . . s ok=$$$OK,sc=$$$OK + . s:oid="" oid=..%Oid() + . q + QUIT:oid'="" $$$OK + s sc=..%ValidateObject(0) QUIT:$$$ISERR(sc) sc + i ..%ResetAllObject(0) + s sc=..%SaveData(id) i $$$ISOK(sc) QUIT $$$OK + QUIT sc + q "" + +%SaveData(%this,id) ; + n %sc,idassigned,idclass,insert + s %sc=$$$OK,id=..%Id() i id'="" s insert=0,idassigned=1 + e s insert=1,idassigned=0 + s idclass="" + n lock + s lock=0 + i 'insert,'(($d(^Stat.PR.StockKwotD(i%Product,i%Datum)))) s insert=1 + i insert DO + . i 'idassigned s id=i%Product_"||"_i%Datum i 1 + . e i $s(i%Product'=$p(id,"||",1):1,i%Datum'=$p(id,"||",2):1,1:0) s %sc=$$$ERROR($$$OidPreviouslyAssigned) q + . i ..%Concurrency=4 l +(^Stat.PR.StockKwotD(i%Product,i%Datum)):5 e s %sc=$$$ERROR($$$LockFailedToAcquireExclusive) q + . i $d(^Stat.PR.StockKwotD(i%Product,i%Datum)) s %sc=$$$ERROR($$$IDKeyNotUnique) q + . i 'idassigned s %sc=..%IdSet(id) q:$$$ISERR(%sc) s:$$$txON $$$txOIDASSIGNED(##this)="" + . s ^Stat.PR.StockKwotD(i%Product,i%Datum)=$lb("",i%CiffPPL,i%FysStock,i%GemFysStock,i%GemGewogenWVK,i%GemWVK,,,i%Kwotering,i%Rotatie,,i%ABCWaarde,i%StockType) + . i ..%Concurrency=3 l +(^Stat.PR.StockKwotD(i%Product,i%Datum,$j)) + i 'insert DO + . i $s(i%Product'=$p(id,"||",1):1,i%Datum'=$p(id,"||",2):1,1:0) s %sc=$$$ERROR($$$OidPreviouslyAssigned) q + . i ..%Concurrency>1 l +(^Stat.PR.StockKwotD(i%Product,i%Datum)):5 s lock=$t e s %sc=$$$ERROR($$$LockFailedToAcquireExclusive) q + . s ^Stat.PR.StockKwotD(i%Product,i%Datum)=$lb("",i%CiffPPL,i%FysStock,i%GemFysStock,i%GemGewogenWVK,i%GemWVK,,,i%Kwotering,i%Rotatie,,i%ABCWaarde,i%StockType) + i lock l -(^Stat.PR.StockKwotD(i%Product,i%Datum)) + QUIT %sc + q "" + +#classmethod +%SortBegin(idxlist,excludeunique) s idxlist=$g(idxlist,""),excludeunique=$g(excludeunique,0) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%SortEnd(idxlist,commit) s idxlist=$g(idxlist,""),commit=$g(commit,1) + QUIT $$$OK + q "" +#endclassmethod + +%UpgradeConcurrency(%this,concurrency) ; + n current,sc + #; Locks are not retained for any setting + #; less than 3 and if the old and new + #; setting are the same, nothing is to done! + s current=..%Concurrency + Quit:concurrencycurrent ..%Concurrency=concurrency QUIT $$$OK + #; Get the new lock + s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc + #; the following line releases the old lock + #; which must be a shared lock as that is the + #; only possible condition. + i current=3 d ..%ReleaseLock("s") + #; Update the concurrency setting: + s ..%Concurrency=concurrency + QUIT $$$OK + q "" + +%ValidateObject(%this,force) s force=$g(force,0) + #; VALIDATE=2, modified=3 + n iv i ..%IsModified() DO QUIT:'iv iv + . s iv=..%Concurrency i iv'="" s iv=(..%ConcurrencyIsValid(iv)) q:$$$ISERR(iv) + . s iv=..%IsInSave i iv'="" s iv=(..%IsInSaveIsValid(iv)) q:$$$ISERR(iv) + . s iv=..ABCWaarde i iv'="" s iv=(..ABCWaardeIsValid(iv)) q:$$$ISERR(iv) + . s iv=..CiffPPL i iv'="" s iv=(..CiffPPLIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Datum i iv="" s iv=$$$ERROR($$$PropertyRequired,"Datum") q + . s iv=(..DatumIsValid(iv)) q:$$$ISERR(iv) + . s iv=..FysStock i iv'="" s iv=(..FysStockIsValid(iv)) q:$$$ISERR(iv) + . s iv=..GemFysStock i iv'="" s iv=(..GemFysStockIsValid(iv)) q:$$$ISERR(iv) + . s iv=..GemGewogenWVK i iv="" s iv=$$$ERROR($$$PropertyRequired,"GemGewogenWVK") q + . s iv=(..GemGewogenWVKIsValid(iv)) q:$$$ISERR(iv) + . s iv=..GemWVK i iv="" s iv=$$$ERROR($$$PropertyRequired,"GemWVK") q + . s iv=(..GemWVKIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Kwotering i iv'="" s iv=(..KwoteringIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Product i iv="" s iv=$$$ERROR($$$PropertyRequired,"Product") q + . s iv=(..ProductIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Rotatie i iv'="" s iv=(..RotatieIsValid(iv)) q:$$$ISERR(iv) + . s iv=..StockType i iv'="" s iv=(..StockTypeIsValid(iv)) q:$$$ISERR(iv) + . s iv=$$$OK + QUIT $$$OK + q "" + +%ConcurrencyGet(%this) ; + q i%%Concurrency + +%ConcurrencyIsModified(%this) ; + q $$$objModBit(##this,1) + +#classmethod +%ConcurrencyIsValid(value) ; + q 1 +#endclassmethod + +%ConcurrencySet(%this,newvalue) ; + s:newvalue'=i%%Concurrency $$$objModBit(##this,1)=1 + s i%%Concurrency=newvalue QUIT $$$OK + q "" + +%ConcurrencySetModified(%this,newvalue) ; + s $$$objModBit(##this,1)=''newvalue + QUIT $$$OK + q "" + +%IsInSaveGet(%this) ; + q i%%IsInSave + +%IsInSaveIsModified(%this) ; + q $$$objModBit(##this,2) + +#classmethod +%IsInSaveIsValid(value) ; + q 1 +#endclassmethod + +%IsInSaveSet(%this,newvalue) ; + s:newvalue'=i%%IsInSave $$$objModBit(##this,2)=1 + s i%%IsInSave=newvalue QUIT $$$OK + q "" + +%IsInSaveSetModified(%this,newvalue) ; + s $$$objModBit(##this,2)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..ABCWaarde + +ABCWaardeGet(%this) ; + q i%ABCWaarde + +ABCWaardeIsModified(%this) ; + q $$$objModBit(##this,3) + +#classmethod +ABCWaardeIsValid(value) ; + q $s(..ABCWaardeIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.ABCWaarde")) +#endclassmethod + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeIsValidDT(%val) ; + q (%val'[";")&(";A;B;C;"[(";"_%val_";")) +#endclassmethod +#endclasscontext ..ABCWaarde + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..ABCWaarde + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..ABCWaarde + +ABCWaardeSet(%this,newvalue) ; + s:newvalue'=i%ABCWaarde $$$objModBit(##this,3)=1 + s i%ABCWaarde=newvalue QUIT $$$OK + q "" + +ABCWaardeSetModified(%this,newvalue) ; + s $$$objModBit(##this,3)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..CiffPPL +#classmethod +CiffPPLDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..CiffPPL + +CiffPPLGet(%this) ; + q i%CiffPPL + +CiffPPLIsModified(%this) ; + q $$$objModBit(##this,4) + +#classmethod +CiffPPLIsValid(value) ; + q $s(..CiffPPLIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.CiffPPL")) +#endclassmethod + +#classcontext ..CiffPPL +#classmethod +CiffPPLIsValidDT(%val) ; + q $isvalidnum(%val,,,) +#endclassmethod +#endclasscontext ..CiffPPL + +#classcontext ..CiffPPL +#classmethod +CiffPPLLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..CiffPPL + +#classcontext ..CiffPPL +#classmethod +CiffPPLNormalize(%val) ; + q +%val +#endclassmethod +#endclasscontext ..CiffPPL + +CiffPPLSet(%this,newvalue) ; + s:newvalue'=i%CiffPPL $$$objModBit(##this,4)=1 + s i%CiffPPL=newvalue QUIT $$$OK + q "" + +CiffPPLSetModified(%this,newvalue) ; + s $$$objModBit(##this,4)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Datum +#classmethod +DatumDisplayToLogical(%val) ; + q $s(%val="":"",1:$zdh(%val,,,5,80,20,,,"")) +#endclassmethod +#endclasscontext ..Datum + +DatumGet(%this) ; + q i%Datum + +DatumIsModified(%this) ; + q $$$objModBit(##this,5) + +#classmethod +DatumIsValid(value) ; + q $s(..DatumIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.Datum")) +#endclassmethod + +#classcontext ..Datum +#classmethod +DatumIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumLogicalToDisplay(%val) ; + q $s(%val="":"",1:$zd(%val,,,4)) +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumLogicalToOdbc(%val) s %val=$g(%val,"") + q $s(%val="":"",1:$zd(%val,3)) +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumOdbcToLogical(%val) s %val=$g(%val,"") + q $s(%val="":"",1:$zdh(%val,3,,,,,,,"error")) +#endclassmethod +#endclasscontext ..Datum + +DatumSet(%this,newvalue) ; + s:newvalue'=i%Datum $$$objModBit(##this,5)=1 + s i%Datum=newvalue QUIT $$$OK + q "" + +DatumSetModified(%this,newvalue) ; + s $$$objModBit(##this,5)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..FysStock +#classmethod +FysStockDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..FysStock + +FysStockGet(%this) ; + q i%FysStock + +FysStockIsModified(%this) ; + q $$$objModBit(##this,6) + +#classmethod +FysStockIsValid(value) ; + q $s(..FysStockIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.FysStock")) +#endclassmethod + +#classcontext ..FysStock +#classmethod +FysStockIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..FysStock + +#classcontext ..FysStock +#classmethod +FysStockLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..FysStock + +#classcontext ..FysStock +#classmethod +FysStockNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..FysStock + +FysStockSet(%this,newvalue) ; + s:newvalue'=i%FysStock $$$objModBit(##this,6)=1 + s i%FysStock=newvalue QUIT $$$OK + q "" + +FysStockSetModified(%this,newvalue) ; + s $$$objModBit(##this,6)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..GemFysStock +#classmethod +GemFysStockDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..GemFysStock + +GemFysStockGet(%this) ; + q i%GemFysStock + +GemFysStockIsModified(%this) ; + q $$$objModBit(##this,7) + +#classmethod +GemFysStockIsValid(value) ; + q $s(..GemFysStockIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.GemFysStock")) +#endclassmethod + +#classcontext ..GemFysStock +#classmethod +GemFysStockIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..GemFysStock + +#classcontext ..GemFysStock +#classmethod +GemFysStockLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..GemFysStock + +#classcontext ..GemFysStock +#classmethod +GemFysStockNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..GemFysStock + +GemFysStockSet(%this,newvalue) ; + s:newvalue'=i%GemFysStock $$$objModBit(##this,7)=1 + s i%GemFysStock=newvalue QUIT $$$OK + q "" + +GemFysStockSetModified(%this,newvalue) ; + s $$$objModBit(##this,7)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..GemGewogenWVK +#classmethod +GemGewogenWVKDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..GemGewogenWVK + +GemGewogenWVKGet(%this) ; + q i%GemGewogenWVK + +GemGewogenWVKIsModified(%this) ; + q $$$objModBit(##this,8) + +#classmethod +GemGewogenWVKIsValid(value) ; + q $s(..GemGewogenWVKIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.GemGewogenWVK")) +#endclassmethod + +#classcontext ..GemGewogenWVK +#classmethod +GemGewogenWVKIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..GemGewogenWVK + +#classcontext ..GemGewogenWVK +#classmethod +GemGewogenWVKLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..GemGewogenWVK + +#classcontext ..GemGewogenWVK +#classmethod +GemGewogenWVKNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..GemGewogenWVK + +GemGewogenWVKSet(%this,newvalue) ; + s:newvalue'=i%GemGewogenWVK $$$objModBit(##this,8)=1 + s i%GemGewogenWVK=newvalue QUIT $$$OK + q "" + +GemGewogenWVKSetModified(%this,newvalue) ; + s $$$objModBit(##this,8)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..GemWVK +#classmethod +GemWVKDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..GemWVK + +GemWVKGet(%this) ; + q i%GemWVK + +GemWVKIsModified(%this) ; + q $$$objModBit(##this,9) + +#classmethod +GemWVKIsValid(value) ; + q $s(..GemWVKIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.GemWVK")) +#endclassmethod + +#classcontext ..GemWVK +#classmethod +GemWVKIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..GemWVK + +#classcontext ..GemWVK +#classmethod +GemWVKLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..GemWVK + +#classcontext ..GemWVK +#classmethod +GemWVKNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..GemWVK + +GemWVKSet(%this,newvalue) ; + s:newvalue'=i%GemWVK $$$objModBit(##this,9)=1 + s i%GemWVK=newvalue QUIT $$$OK + q "" + +GemWVKSetModified(%this,newvalue) ; + s $$$objModBit(##this,9)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Kwotering +#classmethod +KwoteringDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..Kwotering + +KwoteringGet(%this) ; + q i%Kwotering + +KwoteringIsModified(%this) ; + q $$$objModBit(##this,10) + +#classmethod +KwoteringIsValid(value) ; + q $s(..KwoteringIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockABCKwotering.Kwotering")) +#endclassmethod + +#classcontext ..Kwotering +#classmethod +KwoteringIsValidDT(%val) ; + q (%val'[";")&(";+;=;-;"[(";"_%val_";")) +#endclassmethod +#endclasscontext ..Kwotering + +#classcontext ..Kwotering +#classmethod +KwoteringLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..Kwotering + +#endclasscontext Stat.PR.StockABCKwotering \ No newline at end of file Index: CHUI/EC/Toegang.mac.rou =================================================================== diff -u --- CHUI/EC/Toegang.mac.rou (revision 0) +++ CHUI/EC/Toegang.mac.rou (revision 1156) @@ -0,0 +1,64 @@ + #Include %CHUI.System + +Start + Quit:('$$InitializationOpenToegang()) + + If 'frmOpenToegang.LoadData() Do Quit + . Do Finalization() + + Do Run() + + Do Finalization() + + Quit + +ShowForKlant(KlantNr) + Quit:('$$InitializationOpenToegang()) + + If 'frmOpenToegang.LoadData(KlantNr) Do Quit + . Do Finalization() + + Do Run() + + Do Finalization() + + Quit + + ;============================================================================================================= +InitializationOpenToegang() + Quit:('$$Initialization()) 0 + + Set frmOpenToegang=%Application.CreateForm("CHUI.Derde.EC.Toegang.dlgOpen","frmOpenToegang","frmOpenToegang") + + Quit 1 + +Initialization() + Set %Application=##class(%CHUI.TApplication).Create() + + Do:($G(%CHUIDebug)) %Application.AttachDebugEvents() + Set %Screen=##class(%CHUI.TScreen).Create($$$ttVT520) + Set %Input=##class(%CHUI.TInput).Create() + Do %Screen.Clear() + + ;Check of de ingelogde gebruiker bekend is... + Quit:('$$UserAvailable^$$$SystemRtn) 0 + + ;Caption + Do %Screen.SetTerminalCaption("vHisie toegang") + + Quit 1 + +Run() + Do %Application.Run() + Quit + +Finalization() + Do %Screen.Canvas.ChangeFont(%Screen.Font) + k %Application,%Screen,%Input,frmToegang,%CHUIDebug + Quit + + ;============================================================================================================= +Debug + Set %CHUIDebug=1 + Do Start + Quit \ No newline at end of file Index: zTryout/PRAFMA/Design/ORD/Order.inc.rou =================================================================== diff -u --- zTryout/PRAFMA/Design/ORD/Order.inc.rou (revision 0) +++ zTryout/PRAFMA/Design/ORD/Order.inc.rou (revision 1156) @@ -0,0 +1,4 @@ +#define LinetypeAllLines "KF" +#define LinetypeProduct "KF0" +#define LinetypeManual "KF1925###" +#define LinetypeText "KF11" \ No newline at end of file Index: CHUI/EC/Logging.mac.rou =================================================================== diff -u --- CHUI/EC/Logging.mac.rou (revision 0) +++ CHUI/EC/Logging.mac.rou (revision 1156) @@ -0,0 +1,29 @@ +Start + #Include %CHUI.System + + Set %Application=##class(%CHUI.TApplication).Create() + + Do:($G(%CHUIDebug)) %Application.AttachDebugEvents() + Set %Screen=##class(%CHUI.TScreen).Create($$$ttVT520) + Set %Input=##class(%CHUI.TInput).Create() + Do %Screen.Clear() + + ;Check of de ingelogde gebruiker bekend is... + Quit:('$$UserAvailable^$$$SystemRtn) + + ;MainForm + Set frmLogging=%Application.CreateForm("CHUI.Derde.EC.Logging.MainForm","frmMain","frmMain") + + Do %Application.Run() + + Do %Screen.Canvas.ChangeFont(%Screen.Font) + k %Application,%Screen,%Input + k frmLogging + k %CHUIDebug + + Quit + +Debug + Set %CHUIDebug=1 + Do Start + Quit \ No newline at end of file Index: UI/Utils/RtnFind/MainForm/4.mac.rou =================================================================== diff -u --- UI/Utils/RtnFind/MainForm/4.mac.rou (revision 0) +++ UI/Utils/RtnFind/MainForm/4.mac.rou (revision 1156) @@ -0,0 +1,688 @@ + ;UI.Utils.RtnFind.MainForm.4 + ;(C)InterSystems, generated for class UI.Utils.RtnFind.MainForm. Do NOT edit. 11/07/2002 09:27AM + ;;7C9FD9F4074C5F60;UI.Utils.RtnFind.MainForm + q + ; +#classcontext UI.Utils.RtnFind.MainForm + #; method code import packages begin + #import %Library + #import UI.Utils.RtnFind + #; method code import packages end + #; method code include files begin + #include %Const + #include %occExtent + #include %occInclude + #include KeyCodesCNTs + #include MakovaDrawTextCnts + #; method code include files end + + +Label4UnSwizzle(%this) ; + q:r%Label4=$$$NULLOREF + n sc s sc=..Label4ResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%Label4,%this,temp) d ..Label4.%Close() s r%Label4=$$$NULLOREF QUIT $$$OK + q "" + +Label5Get(%this) ; + i r%Label5'=$$$NULLOREF q r%Label5 + n oid,oref s oid=i%Label5 + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMLabel).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%Label5=oref + q r%Label5 + q "" + +Label5GetObject(%this,force) s force=$g(force,0) + q:r%Label5=$$$NULLOREF $s(i%Label5="":"",1:$lb(i%Label5_"")) n oid q:$$$ISOK(..Label5.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +Label5GetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..Label5GetObject(force)) + +Label5IsModified(%this) ; + q $$$objModBit(##this,9) + +#classmethod +Label5IsValid(value) ; + q 1 +#endclassmethod + +Label5NewObject(%this) ; + n newobject + s newobject=##class(%Library.TMLabel).%New("") i newobject=$$$NULLOREF q newobject + s ..Label5=newobject d newobject.%Close() + q newobject + q "" + +Label5ResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%Label5'=$$$NULLOREF s sc=..Label5.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%Label5'=$$$oidPrimary(newvalue) $$$objModBit(##this,9)=1 s i%Label5=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +Label5Set(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%Label5=newvalue q $$$OK + i r%Label5'=$$$NULLOREF n temp $$$objReferenceListRemove(r%Label5,%this,temp) d ..Label5.%Close() + s:(r%Label5'=newvalue)!((newvalue=$$$NULLOREF)&(i%Label5'="")) $$$objModBit(##this,9)=1 + s r%Label5=newvalue,i%Label5=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%Label5,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +Label5SetModified(%this,newvalue) ; + s $$$objModBit(##this,9)=''newvalue + QUIT $$$OK + q "" + +Label5SetObject(%this,newvalue) ; + i r%Label5=$$$NULLOREF s:i%Label5'=$$$oidPrimary(newvalue) $$$objModBit(##this,9)=1 s i%Label5=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..Label5.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,9)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%Label5,%this,temp) do ..Label5.%Close() s r%Label5=$$$NULLOREF s i%Label5=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +Label5SetObjectId(%this,newid) ; + q ..Label5SetObject($$$oidForm(newid)) + +Label5UnSwizzle(%this) ; + q:r%Label5=$$$NULLOREF + n sc s sc=..Label5ResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%Label5,%this,temp) d ..Label5.%Close() s r%Label5=$$$NULLOREF QUIT $$$OK + q "" + +ListBox1Get(%this) ; + i r%ListBox1'=$$$NULLOREF q r%ListBox1 + n oid,oref s oid=i%ListBox1 + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMListBox).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%ListBox1=oref + q r%ListBox1 + q "" + +ListBox1GetObject(%this,force) s force=$g(force,0) + q:r%ListBox1=$$$NULLOREF $s(i%ListBox1="":"",1:$lb(i%ListBox1_"")) n oid q:$$$ISOK(..ListBox1.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +ListBox1GetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..ListBox1GetObject(force)) + +ListBox1IsModified(%this) ; + q $$$objModBit(##this,10) + +#classmethod +ListBox1IsValid(value) ; + q 1 +#endclassmethod + +ListBox1NewObject(%this) ; + n newobject + s newobject=##class(%Library.TMListBox).%New("") i newobject=$$$NULLOREF q newobject + s ..ListBox1=newobject d newobject.%Close() + q newobject + q "" + +ListBox1ResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%ListBox1'=$$$NULLOREF s sc=..ListBox1.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%ListBox1'=$$$oidPrimary(newvalue) $$$objModBit(##this,10)=1 s i%ListBox1=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +ListBox1Set(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%ListBox1=newvalue q $$$OK + i r%ListBox1'=$$$NULLOREF n temp $$$objReferenceListRemove(r%ListBox1,%this,temp) d ..ListBox1.%Close() + s:(r%ListBox1'=newvalue)!((newvalue=$$$NULLOREF)&(i%ListBox1'="")) $$$objModBit(##this,10)=1 + s r%ListBox1=newvalue,i%ListBox1=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%ListBox1,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +ListBox1SetModified(%this,newvalue) ; + s $$$objModBit(##this,10)=''newvalue + QUIT $$$OK + q "" + +ListBox1SetObject(%this,newvalue) ; + i r%ListBox1=$$$NULLOREF s:i%ListBox1'=$$$oidPrimary(newvalue) $$$objModBit(##this,10)=1 s i%ListBox1=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..ListBox1.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,10)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%ListBox1,%this,temp) do ..ListBox1.%Close() s r%ListBox1=$$$NULLOREF s i%ListBox1=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +ListBox1SetObjectId(%this,newid) ; + q ..ListBox1SetObject($$$oidForm(newid)) + +ListBox1UnSwizzle(%this) ; + q:r%ListBox1=$$$NULLOREF + n sc s sc=..ListBox1ResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%ListBox1,%this,temp) d ..ListBox1.%Close() s r%ListBox1=$$$NULLOREF QUIT $$$OK + q "" + +Panel1Get(%this) ; + i r%Panel1'=$$$NULLOREF q r%Panel1 + n oid,oref s oid=i%Panel1 + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMPanel).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%Panel1=oref + q r%Panel1 + q "" + +Panel1GetObject(%this,force) s force=$g(force,0) + q:r%Panel1=$$$NULLOREF $s(i%Panel1="":"",1:$lb(i%Panel1_"")) n oid q:$$$ISOK(..Panel1.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +Panel1GetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..Panel1GetObject(force)) + +Panel1IsModified(%this) ; + q $$$objModBit(##this,11) + +#classmethod +Panel1IsValid(value) ; + q 1 +#endclassmethod + +Panel1NewObject(%this) ; + n newobject + s newobject=##class(%Library.TMPanel).%New("") i newobject=$$$NULLOREF q newobject + s ..Panel1=newobject d newobject.%Close() + q newobject + q "" + +Panel1ResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%Panel1'=$$$NULLOREF s sc=..Panel1.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%Panel1'=$$$oidPrimary(newvalue) $$$objModBit(##this,11)=1 s i%Panel1=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +Panel1Set(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%Panel1=newvalue q $$$OK + i r%Panel1'=$$$NULLOREF n temp $$$objReferenceListRemove(r%Panel1,%this,temp) d ..Panel1.%Close() + s:(r%Panel1'=newvalue)!((newvalue=$$$NULLOREF)&(i%Panel1'="")) $$$objModBit(##this,11)=1 + s r%Panel1=newvalue,i%Panel1=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%Panel1,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +Panel1SetModified(%this,newvalue) ; + s $$$objModBit(##this,11)=''newvalue + QUIT $$$OK + q "" + +Panel1SetObject(%this,newvalue) ; + i r%Panel1=$$$NULLOREF s:i%Panel1'=$$$oidPrimary(newvalue) $$$objModBit(##this,11)=1 s i%Panel1=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..Panel1.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,11)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%Panel1,%this,temp) do ..Panel1.%Close() s r%Panel1=$$$NULLOREF s i%Panel1=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +Panel1SetObjectId(%this,newid) ; + q ..Panel1SetObject($$$oidForm(newid)) + +Panel1UnSwizzle(%this) ; + q:r%Panel1=$$$NULLOREF + n sc s sc=..Panel1ResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%Panel1,%this,temp) d ..Panel1.%Close() s r%Panel1=$$$NULLOREF QUIT $$$OK + q "" + +#classcontext ..SearchStr +#classmethod +SearchStrDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..SearchStr + +SearchStrGet(%this) ; + q i%SearchStr + +SearchStrIsModified(%this) ; + q $$$objModBit(##this,12) + +#classmethod +SearchStrIsValid(value) ; + q $s(..SearchStrIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"UI.Utils.RtnFind.MainForm.SearchStr")) +#endclassmethod + +#classcontext ..SearchStr +#classmethod +SearchStrIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..SearchStr + +#classcontext ..SearchStr +#classmethod +SearchStrLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..SearchStr + +#classcontext ..SearchStr +#classmethod +SearchStrNormalize(%val) ; + q $e(%val,1,50) +#endclassmethod +#endclasscontext ..SearchStr + +SearchStrSet(%this,newvalue) ; + s:newvalue'=i%SearchStr $$$objModBit(##this,12)=1 + s i%SearchStr=newvalue QUIT $$$OK + q "" + +SearchStrSetModified(%this,newvalue) ; + s $$$objModBit(##this,12)=''newvalue + QUIT $$$OK + q "" + +Splitter1Get(%this) ; + i r%Splitter1'=$$$NULLOREF q r%Splitter1 + n oid,oref s oid=i%Splitter1 + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMSplitter).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%Splitter1=oref + q r%Splitter1 + q "" + +Splitter1GetObject(%this,force) s force=$g(force,0) + q:r%Splitter1=$$$NULLOREF $s(i%Splitter1="":"",1:$lb(i%Splitter1_"")) n oid q:$$$ISOK(..Splitter1.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +Splitter1GetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..Splitter1GetObject(force)) + +Splitter1IsModified(%this) ; + q $$$objModBit(##this,13) + +#classmethod +Splitter1IsValid(value) ; + q 1 +#endclassmethod + +Splitter1NewObject(%this) ; + n newobject + s newobject=##class(%Library.TMSplitter).%New("") i newobject=$$$NULLOREF q newobject + s ..Splitter1=newobject d newobject.%Close() + q newobject + q "" + +Splitter1ResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%Splitter1'=$$$NULLOREF s sc=..Splitter1.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%Splitter1'=$$$oidPrimary(newvalue) $$$objModBit(##this,13)=1 s i%Splitter1=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +Splitter1Set(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%Splitter1=newvalue q $$$OK + i r%Splitter1'=$$$NULLOREF n temp $$$objReferenceListRemove(r%Splitter1,%this,temp) d ..Splitter1.%Close() + s:(r%Splitter1'=newvalue)!((newvalue=$$$NULLOREF)&(i%Splitter1'="")) $$$objModBit(##this,13)=1 + s r%Splitter1=newvalue,i%Splitter1=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%Splitter1,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +Splitter1SetModified(%this,newvalue) ; + s $$$objModBit(##this,13)=''newvalue + QUIT $$$OK + q "" + +Splitter1SetObject(%this,newvalue) ; + i r%Splitter1=$$$NULLOREF s:i%Splitter1'=$$$oidPrimary(newvalue) $$$objModBit(##this,13)=1 s i%Splitter1=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..Splitter1.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,13)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%Splitter1,%this,temp) do ..Splitter1.%Close() s r%Splitter1=$$$NULLOREF s i%Splitter1=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +Splitter1SetObjectId(%this,newid) ; + q ..Splitter1SetObject($$$oidForm(newid)) + +Splitter1UnSwizzle(%this) ; + q:r%Splitter1=$$$NULLOREF + n sc s sc=..Splitter1ResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%Splitter1,%this,temp) d ..Splitter1.%Close() s r%Splitter1=$$$NULLOREF QUIT $$$OK + q "" + +btnCancelGet(%this) ; + i r%btnCancel'=$$$NULLOREF q r%btnCancel + n oid,oref s oid=i%btnCancel + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMButton).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%btnCancel=oref + q r%btnCancel + q "" + +btnCancelGetObject(%this,force) s force=$g(force,0) + q:r%btnCancel=$$$NULLOREF $s(i%btnCancel="":"",1:$lb(i%btnCancel_"")) n oid q:$$$ISOK(..btnCancel.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +btnCancelGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..btnCancelGetObject(force)) + +btnCancelIsModified(%this) ; + q $$$objModBit(##this,14) + +#classmethod +btnCancelIsValid(value) ; + q 1 +#endclassmethod + +btnCancelNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMButton).%New("") i newobject=$$$NULLOREF q newobject + s ..btnCancel=newobject d newobject.%Close() + q newobject + q "" + +btnCancelResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%btnCancel'=$$$NULLOREF s sc=..btnCancel.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%btnCancel'=$$$oidPrimary(newvalue) $$$objModBit(##this,14)=1 s i%btnCancel=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +btnCancelSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%btnCancel=newvalue q $$$OK + i r%btnCancel'=$$$NULLOREF n temp $$$objReferenceListRemove(r%btnCancel,%this,temp) d ..btnCancel.%Close() + s:(r%btnCancel'=newvalue)!((newvalue=$$$NULLOREF)&(i%btnCancel'="")) $$$objModBit(##this,14)=1 + s r%btnCancel=newvalue,i%btnCancel=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%btnCancel,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +btnCancelSetModified(%this,newvalue) ; + s $$$objModBit(##this,14)=''newvalue + QUIT $$$OK + q "" + +btnCancelSetObject(%this,newvalue) ; + i r%btnCancel=$$$NULLOREF s:i%btnCancel'=$$$oidPrimary(newvalue) $$$objModBit(##this,14)=1 s i%btnCancel=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..btnCancel.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,14)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%btnCancel,%this,temp) do ..btnCancel.%Close() s r%btnCancel=$$$NULLOREF s i%btnCancel=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +btnCancelSetObjectId(%this,newid) ; + q ..btnCancelSetObject($$$oidForm(newid)) + +btnCancelUnSwizzle(%this) ; + q:r%btnCancel=$$$NULLOREF + n sc s sc=..btnCancelResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%btnCancel,%this,temp) d ..btnCancel.%Close() s r%btnCancel=$$$NULLOREF QUIT $$$OK + q "" + +btnGoPrintGet(%this) ; + i r%btnGoPrint'=$$$NULLOREF q r%btnGoPrint + n oid,oref s oid=i%btnGoPrint + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMButton).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%btnGoPrint=oref + q r%btnGoPrint + q "" + +btnGoPrintGetObject(%this,force) s force=$g(force,0) + q:r%btnGoPrint=$$$NULLOREF $s(i%btnGoPrint="":"",1:$lb(i%btnGoPrint_"")) n oid q:$$$ISOK(..btnGoPrint.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +btnGoPrintGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..btnGoPrintGetObject(force)) + +btnGoPrintIsModified(%this) ; + q $$$objModBit(##this,15) + +#classmethod +btnGoPrintIsValid(value) ; + q 1 +#endclassmethod + +btnGoPrintNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMButton).%New("") i newobject=$$$NULLOREF q newobject + s ..btnGoPrint=newobject d newobject.%Close() + q newobject + q "" + +btnGoPrintResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%btnGoPrint'=$$$NULLOREF s sc=..btnGoPrint.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%btnGoPrint'=$$$oidPrimary(newvalue) $$$objModBit(##this,15)=1 s i%btnGoPrint=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +btnGoPrintSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%btnGoPrint=newvalue q $$$OK + i r%btnGoPrint'=$$$NULLOREF n temp $$$objReferenceListRemove(r%btnGoPrint,%this,temp) d ..btnGoPrint.%Close() + s:(r%btnGoPrint'=newvalue)!((newvalue=$$$NULLOREF)&(i%btnGoPrint'="")) $$$objModBit(##this,15)=1 + s r%btnGoPrint=newvalue,i%btnGoPrint=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%btnGoPrint,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +btnGoPrintSetModified(%this,newvalue) ; + s $$$objModBit(##this,15)=''newvalue + QUIT $$$OK + q "" + +btnGoPrintSetObject(%this,newvalue) ; + i r%btnGoPrint=$$$NULLOREF s:i%btnGoPrint'=$$$oidPrimary(newvalue) $$$objModBit(##this,15)=1 s i%btnGoPrint=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..btnGoPrint.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,15)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%btnGoPrint,%this,temp) do ..btnGoPrint.%Close() s r%btnGoPrint=$$$NULLOREF s i%btnGoPrint=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +btnGoPrintSetObjectId(%this,newid) ; + q ..btnGoPrintSetObject($$$oidForm(newid)) + +btnGoPrintUnSwizzle(%this) ; + q:r%btnGoPrint=$$$NULLOREF + n sc s sc=..btnGoPrintResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%btnGoPrint,%this,temp) d ..btnGoPrint.%Close() s r%btnGoPrint=$$$NULLOREF QUIT $$$OK + q "" + +btnPrintGet(%this) ; + i r%btnPrint'=$$$NULLOREF q r%btnPrint + n oid,oref s oid=i%btnPrint + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMButton).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%btnPrint=oref + q r%btnPrint + q "" + +btnPrintGetObject(%this,force) s force=$g(force,0) + q:r%btnPrint=$$$NULLOREF $s(i%btnPrint="":"",1:$lb(i%btnPrint_"")) n oid q:$$$ISOK(..btnPrint.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +btnPrintGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..btnPrintGetObject(force)) + +btnPrintIsModified(%this) ; + q $$$objModBit(##this,16) + +#classmethod +btnPrintIsValid(value) ; + q 1 +#endclassmethod + +btnPrintNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMButton).%New("") i newobject=$$$NULLOREF q newobject + s ..btnPrint=newobject d newobject.%Close() + q newobject + q "" + +btnPrintResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%btnPrint'=$$$NULLOREF s sc=..btnPrint.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%btnPrint'=$$$oidPrimary(newvalue) $$$objModBit(##this,16)=1 s i%btnPrint=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +btnPrintSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%btnPrint=newvalue q $$$OK + i r%btnPrint'=$$$NULLOREF n temp $$$objReferenceListRemove(r%btnPrint,%this,temp) d ..btnPrint.%Close() + s:(r%btnPrint'=newvalue)!((newvalue=$$$NULLOREF)&(i%btnPrint'="")) $$$objModBit(##this,16)=1 + s r%btnPrint=newvalue,i%btnPrint=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%btnPrint,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +btnPrintSetModified(%this,newvalue) ; + s $$$objModBit(##this,16)=''newvalue + QUIT $$$OK + q "" + +btnPrintSetObject(%this,newvalue) ; + i r%btnPrint=$$$NULLOREF s:i%btnPrint'=$$$oidPrimary(newvalue) $$$objModBit(##this,16)=1 s i%btnPrint=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..btnPrint.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,16)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%btnPrint,%this,temp) do ..btnPrint.%Close() s r%btnPrint=$$$NULLOREF s i%btnPrint=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +btnPrintSetObjectId(%this,newid) ; + q ..btnPrintSetObject($$$oidForm(newid)) + +btnPrintUnSwizzle(%this) ; + q:r%btnPrint=$$$NULLOREF + n sc s sc=..btnPrintResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%btnPrint,%this,temp) d ..btnPrint.%Close() s r%btnPrint=$$$NULLOREF QUIT $$$OK + q "" + +btnSearchGet(%this) ; + i r%btnSearch'=$$$NULLOREF q r%btnSearch + n oid,oref s oid=i%btnSearch + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMButton).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%btnSearch=oref + q r%btnSearch + q "" + +btnSearchGetObject(%this,force) s force=$g(force,0) + q:r%btnSearch=$$$NULLOREF $s(i%btnSearch="":"",1:$lb(i%btnSearch_"")) n oid q:$$$ISOK(..btnSearch.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +btnSearchGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..btnSearchGetObject(force)) + +btnSearchIsModified(%this) ; + q $$$objModBit(##this,17) + +#classmethod +btnSearchIsValid(value) ; + q 1 +#endclassmethod + +btnSearchNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMButton).%New("") i newobject=$$$NULLOREF q newobject + s ..btnSearch=newobject d newobject.%Close() + q newobject + q "" + +btnSearchResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%btnSearch'=$$$NULLOREF s sc=..btnSearch.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%btnSearch'=$$$oidPrimary(newvalue) $$$objModBit(##this,17)=1 s i%btnSearch=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +btnSearchSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%btnSearch=newvalue q $$$OK + i r%btnSearch'=$$$NULLOREF n temp $$$objReferenceListRemove(r%btnSearch,%this,temp) d ..btnSearch.%Close() + s:(r%btnSearch'=newvalue)!((newvalue=$$$NULLOREF)&(i%btnSearch'="")) $$$objModBit(##this,17)=1 + s r%btnSearch=newvalue,i%btnSearch=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%btnSearch,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +btnSearchSetModified(%this,newvalue) ; + s $$$objModBit(##this,17)=''newvalue + QUIT $$$OK + q "" + +btnSearchSetObject(%this,newvalue) ; + i r%btnSearch=$$$NULLOREF s:i%btnSearch'=$$$oidPrimary(newvalue) $$$objModBit(##this,17)=1 s i%btnSearch=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..btnSearch.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,17)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%btnSearch,%this,temp) do ..btnSearch.%Close() s r%btnSearch=$$$NULLOREF s i%btnSearch=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +btnSearchSetObjectId(%this,newid) ; + q ..btnSearchSetObject($$$oidForm(newid)) + +btnSearchUnSwizzle(%this) ; + q:r%btnSearch=$$$NULLOREF + n sc s sc=..btnSearchResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%btnSearch,%this,temp) d ..btnSearch.%Close() s r%btnSearch=$$$NULLOREF QUIT $$$OK + q "" + +chkCaseSensitiveGet(%this) ; + i r%chkCaseSensitive'=$$$NULLOREF q r%chkCaseSensitive + n oid,oref s oid=i%chkCaseSensitive + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMCheckBox).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%chkCaseSensitive=oref + q r%chkCaseSensitive + q "" + +chkCaseSensitiveGetObject(%this,force) s force=$g(force,0) + q:r%chkCaseSensitive=$$$NULLOREF $s(i%chkCaseSensitive="":"",1:$lb(i%chkCaseSensitive_"")) n oid q:$$$ISOK(..chkCaseSensitive.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +chkCaseSensitiveGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..chkCaseSensitiveGetObject(force)) + +chkCaseSensitiveIsModified(%this) ; + q $$$objModBit(##this,18) + +#classmethod +chkCaseSensitiveIsValid(value) ; + q 1 +#endclassmethod + +chkCaseSensitiveNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMCheckBox).%New("") i newobject=$$$NULLOREF q newobject + s ..chkCaseSensitive=newobject d newobject.%Close() + q newobject + q "" + +chkCaseSensitiveResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%chkCaseSensitive'=$$$NULLOREF s sc=..chkCaseSensitive.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%chkCaseSensitive'=$$$oidPrimary(newvalue) $$$objModBit(##this,18)=1 s i%chkCaseSensitive=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +chkCaseSensitiveSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%chkCaseSensitive=newvalue q $$$OK + i r%chkCaseSensitive'=$$$NULLOREF n temp $$$objReferenceListRemove(r%chkCaseSensitive,%this,temp) d ..chkCaseSensitive.%Close() + s:(r%chkCaseSensitive'=newvalue)!((newvalue=$$$NULLOREF)&(i%chkCaseSensitive'="")) $$$objModBit(##this,18)=1 + s r%chkCaseSensitive=newvalue,i%chkCaseSensitive=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%chkCaseSensitive,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +chkCaseSensitiveSetModified(%this,newvalue) ; + s $$$objModBit(##this,18)=''newvalue + QUIT $$$OK + q "" + +#endclasscontext UI.Utils.RtnFind.MainForm \ No newline at end of file Index: SQLStat/PRStockABCKwotering/1.mac.rou =================================================================== diff -u --- SQLStat/PRStockABCKwotering/1.mac.rou (revision 0) +++ SQLStat/PRStockABCKwotering/1.mac.rou (revision 1156) @@ -0,0 +1,868 @@ + ;SQLStat.PRStockABCKwotering.1 + ;(C)InterSystems, generated for class SQLStat.PRStockABCKwotering. Do NOT edit. 10/01/2002 05:52PM + ;;58C49E05537E0FF5;SQLStat.PRStockABCKwotering + q + ; +#classcontext SQLStat.PRStockABCKwotering + #; method code import packages begin + #import %Library + #import SQLStat + #; method code import packages end + #; method code include files begin + #include %occExtent + #include %occInclude + #include %occTransaction + #; method code include files end + + +%AcquireLock(%this,locktype) ; + q $$$OK + +#classmethod +%BuildIndices(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%BuildIndices") + q "" +#endclassmethod + +#classmethod +%CheckUnique(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%CheckUnique") + q "" +#endclassmethod + +%ClassName(%this,fullname) s fullname=$g(fullname,0) + q $s(fullname:"SQLStat.PRStockABCKwotering",1:"PRStockABCKwotering") + +%Close(%this) ; + n a s a=$$$objReferenceCount(%this) q:'a $$$OK i a'>$ll($g($$$objReferenceList(%this))) q $$$ERROR($$$TooManyCallsToClose) + s $$$objReferenceCount(%this)=a-1 + i a>1 q:(a-1)>$ll($g($$$objReferenceList(%this))) $$$OK d q:'a $$$OK s $$$objReferenceCount(%this)=0 + . n checklist,checkobj,list,oreffrom,close,i s checklist=$lb(%this),close(%this)="" + . f s checkobj=$li(checklist) s checklist=$li(checklist,2,-1) d q:checklist=""!'a + . . s list=$g($$$objReferenceList(checkobj)),oreffrom="" f i=1:1:$ll(list) s oreffrom=$li(list,i) i '$d(close(oreffrom)) s:$$$objReferenceCount(oreffrom)=0 a=0 q:'a s:$$$objReferenceCount(oreffrom)>$ll($g($$$objReferenceList(oreffrom))) a=0 q:'a s close(oreffrom)="",checklist=checklist_$lb(oreffrom) + i ..%Concurrency=3 d ..%ReleaseLock("s") + i ..%Concurrency=4 d ..%ReleaseLock("e") + s a=$$$objOID(%this) + $$$DeleteObject(%this) + i a'="" $$$ActiveOidRemove(a,%this) + k $$$txLIST(%this),$$$txOIDASSIGNED(%this),$$$txMODIFIED(%this) + QUIT $$$OK + q "" + +#classmethod +%Delete(oid,concurrency) s oid=$g(oid,""),concurrency=$g(concurrency,$zu(115,10)) + n class,id,sc,traninit QUIT:oid="" $$$ERROR($$$NullOid) s id=$$$oidPrimary(oid) QUIT:id="" $$$ERROR($$$NullId) + s class=$$$oidClassName(oid) + i class'="" s class=$$$NormalizeClassname(class) + i class="" s class="SQLStat.PRStockABCKwotering",oid=$$$oidInsertClassName(oid,"SQLStat.PRStockABCKwotering") + i "SQLStat.PRStockABCKwotering"'=class q $zobjclassmethod(class,"%Delete",oid) + s traninit=0 i $zu(115,9) s traninit=1 tstart + s sc=..%DeleteData(id,concurrency) +%DeleteEnd i traninit DO + . i $$$ISOK(sc) tcommit + . i $$$ISERR(sc) trollback + i $$$ISERR(sc) QUIT sc + n oref $$$ActiveOidModified(oid,oref) + QUIT sc + q "" +#endclassmethod + +#classmethod +%DeleteData(id,concurrency) ; + QUIT:id="" $$$ERROR($$$NullId) n %sc s %sc=$$$OK + n id1,id2 + s id1=$p(id,"||",1),id2=$p(id,"||",2) + n %ROWID,SQLCODE + &sql(DELETE FROM SQLStat.StockABCKwotering WHERE Product=:id1 AND Datum=:id2) + i SQLCODE s %sc=$$$ERROR($$$SQLError,SQLCODE) + QUIT %sc + q "" +#endclassmethod + +#classmethod +%DeleteExtent(concurrency,deletecount,instancecount) s concurrency=$g(concurrency,$zu(115,10)) + n atend,id,qh,row,rs,sc + s deletecount=0,instancecount=0 + s sc=..ExtentExecute(.qh) QUIT:$$$ISERR(sc) sc + f s sc=..ExtentFetch(.qh,.row,.atend) q:$s(row="":1,$$$ISERR(sc):1,1:0) s id=$lg(row) i id'="" s sc=..%Delete($lb(id),concurrency) s instancecount=instancecount+1 s:$$$ISOK(sc) deletecount=deletecount+1 q:atend + d ..ExtentClose(qh) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%DeleteId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + q ..%Delete($$$oidForm(id),concurrency) +#endclassmethod + +%DowngradeConcurrency(%this,concurrency) ; + n current,sc + s current=..%Concurrency + #; If the requested setting is greater than the current setting, then do nothing + If concurrency>current QUIT $$$OK + #; Locks are not retained for any setting less than 3 and if the old and new + #; setting are the same, nothing is to done except update the concurrency setting + i current<3!(current=concurrency) s:concurrency2 s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc + #; the following line releases the old lock which we know must be there + #; because we process and quit above for current<3 + Do ..%ReleaseLock($s(current=3:"s",1:"e")) + #; Update the concurrency setting: + s ..%Concurrency=concurrency + QUIT $$$OK + q "" + +#classmethod +%Exists(oid) ; + New oref Set oref=..%Open(oid,0) Quit:oref=$$$NULLOREF 0 + Do oref.%Close() + Quit 1 + q "" +#endclassmethod + +#classmethod +%ExistsId(id) ; + QUIT ..%Exists($lb(id)) + q "" +#endclassmethod + +%GetSwizzleObject(%this,force,oid) s force=$g(force,0) + n sc s oid="" i force=0 s oid=..%Oid() QUIT $$$OK + i force=2 s sc=..%Save(1) s:$$$ISOK(sc) oid=..%Oid() QUIT sc + s oid=..%Oid() QUIT:oid'="" $$$OK + s sc=..%Save(0) s:$$$ISOK(sc) oid=..%Oid() QUIT sc + q "" + +%Id(%this) ; + q $$$oidPrimary($$$objOID(##this)) + +%IdSet(%this,id) ; + n oid s oid=$$$oidCompose(id,"SQLStat.PRStockABCKwotering") + i $$$objOID(##this)'="",$$$objOID(##this)'=oid QUIT $$$ERROR($$$OidPreviouslyAssigned) + s $$$objOID(##this)=oid + $$$ActiveOidInsert(oid,##this) + QUIT $$$OK + q "" + +%IncrementCount(%this) ; + $$$IncrementReferenceCount(%this) q + q + +#classmethod +%IsA(isclass) ; + q "~SQLStat.PRStockABCKwotering~%Library.Persistent~%Library.RegisteredObject~"[("~"_$$$NormalizeClassname(isclass)_"~") +#endclassmethod + +%IsModified(%this) ; + q $$$objModAll(##this) + +#classmethod +%KillExtent() ; + QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%KillExtent") + q "" +#endclassmethod + +%Load(%this,id) ; + n sc s sc=..%IdSet(id) QUIT:$$$ISERR(sc) sc + s sc=..%LoadData(id) QUIT:$$$ISERR(sc) sc + QUIT $$$OK + q "" + +%LoadData(%this,id) ; + n %ROWID,%sc,SQLCODE,id1,id2 + s id1=$p(id,"||",1),id2=$p(id,"||",2) + s %sc=$$$ERROR($$$LoadObjectNotFound) +#sqlcompile select=logical + &sql(SELECT ABCWaarde,CiffPPL,Datum,FysStock,GemFysStock,GemGewogenWVK,GemWVK,Kwotering,Product,Rotatie,StockType + INTO :i%ABCWaarde,:i%CiffPPL,:i%Datum,:i%FysStock,:i%GemFysStock,:i%GemGewogenWVK,:i%GemWVK,:i%Kwotering,:i%Product,:i%Rotatie,:i%StockType + FROM SQLStat.StockABCKwotering + WHERE Product=:id1 AND Datum=:id2) + i SQLCODE s i%ABCWaarde="",i%CiffPPL="",i%Datum="",i%FysStock="",i%GemFysStock="",i%GemGewogenWVK="",i%GemWVK="",i%Kwotering="",i%Product="",i%Rotatie="",i%StockType="" + e d + . s %sc=$$$OK + QUIT %sc + q "" + +#classmethod +%New(initvalue) ; + n %this,sc,oref +#endclassmethod + s %this=$$$CreateObject("SQLStat.PRStockABCKwotering") + s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" + s i%%Concurrency=$zu(115,10),i%%IsInSave=0,i%ABCWaarde="",i%CiffPPL="",i%Datum="" + s i%FysStock="",i%GemFysStock="",i%GemGewogenWVK="",i%GemWVK="",i%Kwotering="" + s i%Product="",i%Rotatie="",i%StockType="" + $$$objModAllSet(##this,1) + QUIT %this +#classmethod + q "" +#endclassmethod + +%NormalizeObject(%this) ; + i i%ABCWaarde'="" s i%ABCWaarde=(..ABCWaardeNormalize(i%ABCWaarde)) + i i%CiffPPL'="" s i%CiffPPL=(..CiffPPLNormalize(i%CiffPPL)) + i i%Datum'="" s i%Datum=(..DatumNormalize(i%Datum)) + i i%FysStock'="" s i%FysStock=(..FysStockNormalize(i%FysStock)) + i i%GemFysStock'="" s i%GemFysStock=(..GemFysStockNormalize(i%GemFysStock)) + i i%GemGewogenWVK'="" s i%GemGewogenWVK=(..GemGewogenWVKNormalize(i%GemGewogenWVK)) + i i%GemWVK'="" s i%GemWVK=(..GemWVKNormalize(i%GemWVK)) + i i%Kwotering'="" s i%Kwotering=(..KwoteringNormalize(i%Kwotering)) + i i%Product'="" s i%Product=(..ProductNormalize(i%Product)) + i i%Rotatie'="" s i%Rotatie=(..RotatieNormalize(i%Rotatie)) + i i%StockType'="" s i%StockType=(..StockTypeNormalize(i%StockType)) + QUIT $$$OK + q "" + +%Oid(%this) ; + q $$$objOID(##this) + +#classmethod +%Open(oid,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + i $$$oidPrimary($g(oid))="" QUIT $$$NULLOREF + n sc,%this,class s class=$$$oidClassName(oid) + i class'="" s class=$$$NormalizeClassname(class) + i class="" s class="SQLStat.PRStockABCKwotering",oid=$$$oidInsertClassName(oid,"SQLStat.PRStockABCKwotering") + i "SQLStat.PRStockABCKwotering"'=class q $zobjclassmethod(class,"%Open",oid,concurrency) +#endclassmethod + $$$ActiveOidSearch(oid,%this) + i %this DO QUIT %this + . i concurrency>..%Concurrency i '..%UpgradeConcurrency(concurrency) s %this="" q + . $$$IncrementReferenceCount(%this) + s %this=$$$CreateObject("SQLStat.PRStockABCKwotering") + s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" + s i%%Concurrency="",..%Concurrency=concurrency + s sc=..%Load($$$oidPrimary(oid)) i $$$ISERR(sc) d ..%Close() QUIT $$$NULLOREF + s i%%IsInSave=0 + $$$objModAllSet(##this,0) + QUIT %this +#classmethod + q "" +#endclassmethod + +#classmethod +%OpenId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + q ..%Open($$$oidForm(id),concurrency) +#endclassmethod + +%PackageName(%this) ; + q "SQLStat" + +#classmethod +%PurgeIndices(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%PurgeIndices") + q "" +#endclassmethod + +%ReleaseLock(%this,locktype) ; + q $$$OK + +%ResetAllObject(%this,force) s force=$g(force,0) + q 1 + +%RollBack(%this) ; + n sc s sc=$$$OK + i $d($$$txMODIFIED(##this)) $$$objModStateRestore(##this,$$$txMODIFIED(##this)) + QUIT sc + q "" + +%Save(%this,related) s related=$g(related,1) + n id,oid,ok,sc,traninit s oid=..%Oid(),id=$$$oidPrimary(oid) i 'i%%IsInSave d s i%%IsInSave=0 QUIT sc + . s oid="",sc=$$$OK,traninit=0 + . i $$$txNOTINTRAN DO + . . s traninit=1 + . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot + . . i '$zu(115,9) s $$$txSTATUS=1 q + . . s $$$txSTATUS=2 tstart + . s:$$$txON $$$txLIST(##this)="" + . s i%%IsInSave=1 + . s sc=..%ValidateObject(related+1) i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . s sc=..%NormalizeObject() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . s sc=..%ResetAllObject(related+1) i $$$ISERR(sc) d i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . . s sc=..%SaveData(id) q:$$$ISERR(sc) + . . s sc=..%ResetAllObject(related+1) + . i ..%IsModified()!(related=0) s sc=..%SaveData(id) s:$$$ISOK(sc) oid=..%Oid() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . i ..%IsModified(),$$$txON $$$objModStateSave(##this,$$$txMODIFIED(##this)) + . $$$objModAllSet(##this,0) i traninit d i $$$ISERR(ok) s sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()),oid="" q + . . i $$$txOFF k $$$txSTATUS s ok=$$$OK q + . . tcommit + . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot + . . s ok=$$$OK,sc=$$$OK + . s:oid="" oid=..%Oid() + . q + QUIT:oid'="" $$$OK + s sc=..%ValidateObject(0) QUIT:$$$ISERR(sc) sc + i ..%ResetAllObject(0) + s sc=..%SaveData(id) i $$$ISOK(sc) QUIT $$$OK + QUIT sc + q "" + +%SaveData(%this,id) ; + s id=..%Id() i id="" QUIT ..%SaveDataInsert(id) + QUIT ..%SaveDataUpdate(id) + q "" + +%SaveDataInsert(%this,id) ; + n %ROWID,%sc,SQLCODE,id1,id2,lock,temp1 + s lock=0,%sc=$$$OK + s id1=$p(id,"||",1),id2=$p(id,"||",2) + &sql(INSERT INTO SQLStat.StockABCKwotering(ABCWaarde,CiffPPL,Datum,FysStock,GemFysStock,GemGewogenWVK,GemWVK,Kwotering,Product,Rotatie,StockType) + VALUES (:i%ABCWaarde,:i%CiffPPL,:i%Datum,:i%FysStock,:i%GemFysStock,:i%GemGewogenWVK,:i%GemWVK,:i%Kwotering,:i%Product,:i%Rotatie,:i%StockType)) + i SQLCODE q $$$ERROR($$$SQLError,SQLCODE_":"_$g(%msg)) + s id=i%Product_"||"_i%Datum s %sc=..%IdSet(id) QUIT:$$$ISERR(%sc) %sc + s:$$$txON $$$txOIDASSIGNED(##this)="" + QUIT %sc + q "" + +%SaveDataUpdate(%this,id) ; + n %ROWID,%sc,SQLCODE,id1,id2,lock,temp1 + s lock=0,%sc=$$$OK + s id1=$p(id,"||",1),id2=$p(id,"||",2) + &sql(UPDATE SQLStat.StockABCKwotering SET ABCWaarde = :i%ABCWaarde, CiffPPL = :i%CiffPPL, Datum = :i%Datum, FysStock = :i%FysStock, GemFysStock = :i%GemFysStock, GemGewogenWVK = :i%GemGewogenWVK, GemWVK = :i%GemWVK, Kwotering = :i%Kwotering, Product = :i%Product, Rotatie = :i%Rotatie, StockType = :i%StockType WHERE Product=:id1 AND Datum=:id2) + i SQLCODE q $$$ERROR($$$SQLError,SQLCODE_":"_$g(%msg)) + QUIT %sc + q "" + +#classmethod +%SortBegin(idxlist,excludeunique) s idxlist=$g(idxlist,""),excludeunique=$g(excludeunique,0) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%SortEnd(idxlist,commit) s idxlist=$g(idxlist,""),commit=$g(commit,1) + QUIT $$$OK + q "" +#endclassmethod + +%UpgradeConcurrency(%this,concurrency) ; + n current,sc + #; Locks are not retained for any setting + #; less than 3 and if the old and new + #; setting are the same, nothing is to done! + s current=..%Concurrency + Quit:concurrencycurrent ..%Concurrency=concurrency QUIT $$$OK + #; Get the new lock + s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc + #; the following line releases the old lock + #; which must be a shared lock as that is the + #; only possible condition. + i current=3 d ..%ReleaseLock("s") + #; Update the concurrency setting: + s ..%Concurrency=concurrency + QUIT $$$OK + q "" + +%ValidateObject(%this,force) s force=$g(force,0) + #; VALIDATE=2, modified=3 + n iv i ..%IsModified() DO QUIT:'iv iv + . s iv=..%Concurrency i iv'="" s iv=(..%ConcurrencyIsValid(iv)) q:$$$ISERR(iv) + . s iv=..%IsInSave i iv'="" s iv=(..%IsInSaveIsValid(iv)) q:$$$ISERR(iv) + . s iv=..ABCWaarde i iv'="" s iv=(..ABCWaardeIsValid(iv)) q:$$$ISERR(iv) + . s iv=..CiffPPL i iv'="" s iv=(..CiffPPLIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Datum i iv="" s iv=$$$ERROR($$$PropertyRequired,"Datum") q + . s iv=(..DatumIsValid(iv)) q:$$$ISERR(iv) + . s iv=..FysStock i iv'="" s iv=(..FysStockIsValid(iv)) q:$$$ISERR(iv) + . s iv=..GemFysStock i iv'="" s iv=(..GemFysStockIsValid(iv)) q:$$$ISERR(iv) + . s iv=..GemGewogenWVK i iv'="" s iv=(..GemGewogenWVKIsValid(iv)) q:$$$ISERR(iv) + . s iv=..GemWVK i iv'="" s iv=(..GemWVKIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Kwotering i iv'="" s iv=(..KwoteringIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Product i iv="" s iv=$$$ERROR($$$PropertyRequired,"Product") q + . s iv=(..ProductIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Rotatie i iv'="" s iv=(..RotatieIsValid(iv)) q:$$$ISERR(iv) + . s iv=..StockType i iv'="" s iv=(..StockTypeIsValid(iv)) q:$$$ISERR(iv) + . s iv=$$$OK + QUIT $$$OK + q "" + +%ConcurrencyGet(%this) ; + q i%%Concurrency + +%ConcurrencyIsModified(%this) ; + q $$$objModBit(##this,1) + +#classmethod +%ConcurrencyIsValid(value) ; + q 1 +#endclassmethod + +%ConcurrencySet(%this,newvalue) ; + s:newvalue'=i%%Concurrency $$$objModBit(##this,1)=1 + s i%%Concurrency=newvalue QUIT $$$OK + q "" + +%ConcurrencySetModified(%this,newvalue) ; + s $$$objModBit(##this,1)=''newvalue + QUIT $$$OK + q "" + +%IsInSaveGet(%this) ; + q i%%IsInSave + +%IsInSaveIsModified(%this) ; + q $$$objModBit(##this,2) + +#classmethod +%IsInSaveIsValid(value) ; + q 1 +#endclassmethod + +%IsInSaveSet(%this,newvalue) ; + s:newvalue'=i%%IsInSave $$$objModBit(##this,2)=1 + s i%%IsInSave=newvalue QUIT $$$OK + q "" + +%IsInSaveSetModified(%this,newvalue) ; + s $$$objModBit(##this,2)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..ABCWaarde + +ABCWaardeGet(%this) ; + q i%ABCWaarde + +ABCWaardeIsModified(%this) ; + q $$$objModBit(##this,3) + +#classmethod +ABCWaardeIsValid(value) ; + q $s(..ABCWaardeIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.ABCWaarde")) +#endclassmethod + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..ABCWaarde + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..ABCWaarde + +#classcontext ..ABCWaarde +#classmethod +ABCWaardeNormalize(%val) ; + q $e(%val,1,1) +#endclassmethod +#endclasscontext ..ABCWaarde + +ABCWaardeSet(%this,newvalue) ; + s:newvalue'=i%ABCWaarde $$$objModBit(##this,3)=1 + s i%ABCWaarde=newvalue QUIT $$$OK + q "" + +ABCWaardeSetModified(%this,newvalue) ; + s $$$objModBit(##this,3)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..CiffPPL +#classmethod +CiffPPLDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..CiffPPL + +CiffPPLGet(%this) ; + q i%CiffPPL + +CiffPPLIsModified(%this) ; + q $$$objModBit(##this,4) + +#classmethod +CiffPPLIsValid(value) ; + q $s(..CiffPPLIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.CiffPPL")) +#endclassmethod + +#classcontext ..CiffPPL +#classmethod +CiffPPLIsValidDT(%val) ; + q $isvalidnum(%val,,,) +#endclassmethod +#endclasscontext ..CiffPPL + +#classcontext ..CiffPPL +#classmethod +CiffPPLLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..CiffPPL + +#classcontext ..CiffPPL +#classmethod +CiffPPLNormalize(%val) ; + q +%val +#endclassmethod +#endclasscontext ..CiffPPL + +CiffPPLSet(%this,newvalue) ; + s:newvalue'=i%CiffPPL $$$objModBit(##this,4)=1 + s i%CiffPPL=newvalue QUIT $$$OK + q "" + +CiffPPLSetModified(%this,newvalue) ; + s $$$objModBit(##this,4)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Datum +#classmethod +DatumDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..Datum + +DatumGet(%this) ; + q i%Datum + +DatumIsModified(%this) ; + q $$$objModBit(##this,5) + +#classmethod +DatumIsValid(value) ; + q $s(..DatumIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.Datum")) +#endclassmethod + +#classcontext ..Datum +#classmethod +DatumIsValidDT(%val) ; + i %val=(%val\1) s %val=$zd(%val,3,,,,,,,"error")_" 00:00:00" + i $l(%val)=10 s %val=%val_" 00:00:00" + i $l(%val)=8 s %val=$zd($h,3)_" "_%val + q ($l(%val)>18)&''$zdth(%val,3,,,,,,,,"") + q "" +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumNormalize(%val) ; + q $s(%val="":"",%val=(%val\1):$zd(%val,3,,,,,,,"error")_" 00:00:00",$l(%val)=8:$zd($h,3)_" "_%val,$l(%val)=10:%val_" 00:00:00",1:%val) +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumOdbcToLogical(%val) ; + q $s(%val="":"",$zdth(%val,3,,,,,,,,"")'="":$zdt($zdth(%val,3),3),$zdth(%val,-1,,,,,,,,"")'="":$zdt($zdth(%val,-1),3),1:%val) +#endclassmethod +#endclasscontext ..Datum + +DatumSet(%this,newvalue) ; + s:newvalue'=i%Datum $$$objModBit(##this,5)=1 + s i%Datum=newvalue QUIT $$$OK + q "" + +DatumSetModified(%this,newvalue) ; + s $$$objModBit(##this,5)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..FysStock +#classmethod +FysStockDisplayToLogical(%val) ; + q $in(%val,"#.0","") +#endclassmethod +#endclasscontext ..FysStock + +FysStockGet(%this) ; + q i%FysStock + +FysStockIsModified(%this) ; + q $$$objModBit(##this,6) + +#classmethod +FysStockIsValid(value) ; + q $s(..FysStockIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.FysStock")) +#endclassmethod + +#classcontext ..FysStock +#classmethod +FysStockIsValidDT(%val) ; + q $isvalidnum(%val,1,-99999999999999999.9,99999999999999999.9) +#endclassmethod +#endclasscontext ..FysStock + +#classcontext ..FysStock +#classmethod +FysStockLogicalToDisplay(%val) ; + q $s(%val="":"",1:$fn(%val,"#.0",1)) +#endclassmethod +#endclasscontext ..FysStock + +#classcontext ..FysStock +#classmethod +FysStockNormalize(%val) ; + q +$fn(%val,"",1) +#endclassmethod +#endclasscontext ..FysStock + +FysStockSet(%this,newvalue) ; + s:newvalue'=i%FysStock $$$objModBit(##this,6)=1 + s i%FysStock=newvalue QUIT $$$OK + q "" + +FysStockSetModified(%this,newvalue) ; + s $$$objModBit(##this,6)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..GemFysStock +#classmethod +GemFysStockDisplayToLogical(%val) ; + q $in(%val,"#.0","") +#endclassmethod +#endclasscontext ..GemFysStock + +GemFysStockGet(%this) ; + q i%GemFysStock + +GemFysStockIsModified(%this) ; + q $$$objModBit(##this,7) + +#classmethod +GemFysStockIsValid(value) ; + q $s(..GemFysStockIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.GemFysStock")) +#endclassmethod + +#classcontext ..GemFysStock +#classmethod +GemFysStockIsValidDT(%val) ; + q $isvalidnum(%val,1,-99999999999999999.9,99999999999999999.9) +#endclassmethod +#endclasscontext ..GemFysStock + +#classcontext ..GemFysStock +#classmethod +GemFysStockLogicalToDisplay(%val) ; + q $s(%val="":"",1:$fn(%val,"#.0",1)) +#endclassmethod +#endclasscontext ..GemFysStock + +#classcontext ..GemFysStock +#classmethod +GemFysStockNormalize(%val) ; + q +$fn(%val,"",1) +#endclassmethod +#endclasscontext ..GemFysStock + +GemFysStockSet(%this,newvalue) ; + s:newvalue'=i%GemFysStock $$$objModBit(##this,7)=1 + s i%GemFysStock=newvalue QUIT $$$OK + q "" + +GemFysStockSetModified(%this,newvalue) ; + s $$$objModBit(##this,7)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..GemGewogenWVK +#classmethod +GemGewogenWVKDisplayToLogical(%val) ; + q $in(%val,"#.0","") +#endclassmethod +#endclasscontext ..GemGewogenWVK + +GemGewogenWVKGet(%this) ; + q i%GemGewogenWVK + +GemGewogenWVKIsModified(%this) ; + q $$$objModBit(##this,8) + +#classmethod +GemGewogenWVKIsValid(value) ; + q $s(..GemGewogenWVKIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.GemGewogenWVK")) +#endclassmethod + +#classcontext ..GemGewogenWVK +#classmethod +GemGewogenWVKIsValidDT(%val) ; + q $isvalidnum(%val,1,-99999999999999999.9,99999999999999999.9) +#endclassmethod +#endclasscontext ..GemGewogenWVK + +#classcontext ..GemGewogenWVK +#classmethod +GemGewogenWVKLogicalToDisplay(%val) ; + q $s(%val="":"",1:$fn(%val,"#.0",1)) +#endclassmethod +#endclasscontext ..GemGewogenWVK + +#classcontext ..GemGewogenWVK +#classmethod +GemGewogenWVKNormalize(%val) ; + q +$fn(%val,"",1) +#endclassmethod +#endclasscontext ..GemGewogenWVK + +GemGewogenWVKSet(%this,newvalue) ; + s:newvalue'=i%GemGewogenWVK $$$objModBit(##this,8)=1 + s i%GemGewogenWVK=newvalue QUIT $$$OK + q "" + +GemGewogenWVKSetModified(%this,newvalue) ; + s $$$objModBit(##this,8)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..GemWVK +#classmethod +GemWVKDisplayToLogical(%val) ; + q $in(%val,"#.0","") +#endclassmethod +#endclasscontext ..GemWVK + +GemWVKGet(%this) ; + q i%GemWVK + +GemWVKIsModified(%this) ; + q $$$objModBit(##this,9) + +#classmethod +GemWVKIsValid(value) ; + q $s(..GemWVKIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.GemWVK")) +#endclassmethod + +#classcontext ..GemWVK +#classmethod +GemWVKIsValidDT(%val) ; + q $isvalidnum(%val,1,-99999999999999999.9,99999999999999999.9) +#endclassmethod +#endclasscontext ..GemWVK + +#classcontext ..GemWVK +#classmethod +GemWVKLogicalToDisplay(%val) ; + q $s(%val="":"",1:$fn(%val,"#.0",1)) +#endclassmethod +#endclasscontext ..GemWVK + +#classcontext ..GemWVK +#classmethod +GemWVKNormalize(%val) ; + q +$fn(%val,"",1) +#endclassmethod +#endclasscontext ..GemWVK + +GemWVKSet(%this,newvalue) ; + s:newvalue'=i%GemWVK $$$objModBit(##this,9)=1 + s i%GemWVK=newvalue QUIT $$$OK + q "" + +GemWVKSetModified(%this,newvalue) ; + s $$$objModBit(##this,9)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Kwotering +#classmethod +KwoteringDisplayToLogical(%val) ; + q %val +#endclassmethod +#endclasscontext ..Kwotering + +KwoteringGet(%this) ; + q i%Kwotering + +KwoteringIsModified(%this) ; + q $$$objModBit(##this,10) + +#classmethod +KwoteringIsValid(value) ; + q $s(..KwoteringIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.Kwotering")) +#endclassmethod + +#classcontext ..Kwotering +#classmethod +KwoteringIsValidDT(%val) ; + q 1 +#endclassmethod +#endclasscontext ..Kwotering + +#classcontext ..Kwotering +#classmethod +KwoteringLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..Kwotering + +#classcontext ..Kwotering +#classmethod +KwoteringNormalize(%val) ; + q $e(%val,1,1) +#endclassmethod +#endclasscontext ..Kwotering + +KwoteringSet(%this,newvalue) ; + s:newvalue'=i%Kwotering $$$objModBit(##this,10)=1 + s i%Kwotering=newvalue QUIT $$$OK + q "" + +KwoteringSetModified(%this,newvalue) ; + s $$$objModBit(##this,10)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Product +#classmethod +ProductDisplayToLogical(%val) ; + q $in(%val,"#.","") +#endclassmethod +#endclasscontext ..Product + +ProductGet(%this) ; + q i%Product + +ProductIsModified(%this) ; + q $$$objModBit(##this,11) + +#classmethod +ProductIsValid(value) ; + q $s(..ProductIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.Product")) +#endclassmethod + +#classcontext ..Product +#classmethod +ProductIsValidDT(%val) ; + q $isvalidnum(%val,0,-999999999999999999,999999999999999999) +#endclassmethod +#endclasscontext ..Product + +#classcontext ..Product +#classmethod +ProductLogicalToDisplay(%val) ; + q $s(%val="":"",1:$fn(%val,"#.",0)) +#endclassmethod +#endclasscontext ..Product + +#classcontext ..Product +#classmethod +ProductNormalize(%val) ; + q +$fn(%val,"",0) +#endclassmethod +#endclasscontext ..Product + +ProductSet(%this,newvalue) ; + s:newvalue'=i%Product $$$objModBit(##this,11)=1 + s i%Product=newvalue QUIT $$$OK + q "" + +#endclasscontext SQLStat.PRStockABCKwotering \ No newline at end of file Index: UI/Utils/RtnFind/MainForm/6.mac.rou =================================================================== diff -u --- UI/Utils/RtnFind/MainForm/6.mac.rou (revision 0) +++ UI/Utils/RtnFind/MainForm/6.mac.rou (revision 1156) @@ -0,0 +1,415 @@ + ;UI.Utils.RtnFind.MainForm.6 + ;(C)InterSystems, generated for class UI.Utils.RtnFind.MainForm. Do NOT edit. 11/07/2002 09:27AM + ;;7C9FD9F4074C5F60;UI.Utils.RtnFind.MainForm + q + ; +#classcontext UI.Utils.RtnFind.MainForm + #; method code import packages begin + #import %Library + #import UI.Utils.RtnFind + #; method code import packages end + #; method code include files begin + #include %Const + #include %occExtent + #include %occInclude + #include KeyCodesCNTs + #include MakovaDrawTextCnts + #; method code include files end + + +pbProgNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMProgressBar).%New("") i newobject=$$$NULLOREF q newobject + s ..pbProg=newobject d newobject.%Close() + q newobject + q "" + +pbProgResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%pbProg'=$$$NULLOREF s sc=..pbProg.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%pbProg'=$$$oidPrimary(newvalue) $$$objModBit(##this,27)=1 s i%pbProg=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +pbProgSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%pbProg=newvalue q $$$OK + i r%pbProg'=$$$NULLOREF n temp $$$objReferenceListRemove(r%pbProg,%this,temp) d ..pbProg.%Close() + s:(r%pbProg'=newvalue)!((newvalue=$$$NULLOREF)&(i%pbProg'="")) $$$objModBit(##this,27)=1 + s r%pbProg=newvalue,i%pbProg=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%pbProg,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +pbProgSetModified(%this,newvalue) ; + s $$$objModBit(##this,27)=''newvalue + QUIT $$$OK + q "" + +pbProgSetObject(%this,newvalue) ; + i r%pbProg=$$$NULLOREF s:i%pbProg'=$$$oidPrimary(newvalue) $$$objModBit(##this,27)=1 s i%pbProg=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..pbProg.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,27)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%pbProg,%this,temp) do ..pbProg.%Close() s r%pbProg=$$$NULLOREF s i%pbProg=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +pbProgSetObjectId(%this,newid) ; + q ..pbProgSetObject($$$oidForm(newid)) + +pbProgUnSwizzle(%this) ; + q:r%pbProg=$$$NULLOREF + n sc s sc=..pbProgResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%pbProg,%this,temp) d ..pbProg.%Close() s r%pbProg=$$$NULLOREF QUIT $$$OK + q "" + +rePrintGet(%this) ; + i r%rePrint'=$$$NULLOREF q r%rePrint + n oid,oref s oid=i%rePrint + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMRichEdit).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%rePrint=oref + q r%rePrint + q "" + +rePrintGetObject(%this,force) s force=$g(force,0) + q:r%rePrint=$$$NULLOREF $s(i%rePrint="":"",1:$lb(i%rePrint_"")) n oid q:$$$ISOK(..rePrint.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +rePrintGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..rePrintGetObject(force)) + +rePrintIsModified(%this) ; + q $$$objModBit(##this,28) + +#classmethod +rePrintIsValid(value) ; + q 1 +#endclassmethod + +rePrintNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMRichEdit).%New("") i newobject=$$$NULLOREF q newobject + s ..rePrint=newobject d newobject.%Close() + q newobject + q "" + +rePrintResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%rePrint'=$$$NULLOREF s sc=..rePrint.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%rePrint'=$$$oidPrimary(newvalue) $$$objModBit(##this,28)=1 s i%rePrint=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +rePrintSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%rePrint=newvalue q $$$OK + i r%rePrint'=$$$NULLOREF n temp $$$objReferenceListRemove(r%rePrint,%this,temp) d ..rePrint.%Close() + s:(r%rePrint'=newvalue)!((newvalue=$$$NULLOREF)&(i%rePrint'="")) $$$objModBit(##this,28)=1 + s r%rePrint=newvalue,i%rePrint=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%rePrint,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +rePrintSetModified(%this,newvalue) ; + s $$$objModBit(##this,28)=''newvalue + QUIT $$$OK + q "" + +rePrintSetObject(%this,newvalue) ; + i r%rePrint=$$$NULLOREF s:i%rePrint'=$$$oidPrimary(newvalue) $$$objModBit(##this,28)=1 s i%rePrint=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..rePrint.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,28)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%rePrint,%this,temp) do ..rePrint.%Close() s r%rePrint=$$$NULLOREF s i%rePrint=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +rePrintSetObjectId(%this,newid) ; + q ..rePrintSetObject($$$oidForm(newid)) + +rePrintUnSwizzle(%this) ; + q:r%rePrint=$$$NULLOREF + n sc s sc=..rePrintResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%rePrint,%this,temp) d ..rePrint.%Close() s r%rePrint=$$$NULLOREF QUIT $$$OK + q "" + +tvBrowserGet(%this) ; + i r%tvBrowser'=$$$NULLOREF q r%tvBrowser + n oid,oref s oid=i%tvBrowser + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMTreeView).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%tvBrowser=oref + q r%tvBrowser + q "" + +tvBrowserGetObject(%this,force) s force=$g(force,0) + q:r%tvBrowser=$$$NULLOREF $s(i%tvBrowser="":"",1:$lb(i%tvBrowser_"")) n oid q:$$$ISOK(..tvBrowser.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +tvBrowserGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..tvBrowserGetObject(force)) + +tvBrowserIsModified(%this) ; + q $$$objModBit(##this,29) + +#classmethod +tvBrowserIsValid(value) ; + q 1 +#endclassmethod + +tvBrowserNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMTreeView).%New("") i newobject=$$$NULLOREF q newobject + s ..tvBrowser=newobject d newobject.%Close() + q newobject + q "" + +tvBrowserResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%tvBrowser'=$$$NULLOREF s sc=..tvBrowser.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%tvBrowser'=$$$oidPrimary(newvalue) $$$objModBit(##this,29)=1 s i%tvBrowser=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +tvBrowserSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%tvBrowser=newvalue q $$$OK + i r%tvBrowser'=$$$NULLOREF n temp $$$objReferenceListRemove(r%tvBrowser,%this,temp) d ..tvBrowser.%Close() + s:(r%tvBrowser'=newvalue)!((newvalue=$$$NULLOREF)&(i%tvBrowser'="")) $$$objModBit(##this,29)=1 + s r%tvBrowser=newvalue,i%tvBrowser=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%tvBrowser,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +tvBrowserSetModified(%this,newvalue) ; + s $$$objModBit(##this,29)=''newvalue + QUIT $$$OK + q "" + +tvBrowserSetObject(%this,newvalue) ; + i r%tvBrowser=$$$NULLOREF s:i%tvBrowser'=$$$oidPrimary(newvalue) $$$objModBit(##this,29)=1 s i%tvBrowser=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..tvBrowser.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,29)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%tvBrowser,%this,temp) do ..tvBrowser.%Close() s r%tvBrowser=$$$NULLOREF s i%tvBrowser=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +tvBrowserSetObjectId(%this,newid) ; + q ..tvBrowserSetObject($$$oidForm(newid)) + +tvBrowserUnSwizzle(%this) ; + q:r%tvBrowser=$$$NULLOREF + n sc s sc=..tvBrowserResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%tvBrowser,%this,temp) d ..tvBrowser.%Close() s r%tvBrowser=$$$NULLOREF QUIT $$$OK + q "" + +txtOnLblGet(%this) ; + i r%txtOnLbl'=$$$NULLOREF q r%txtOnLbl + n oid,oref s oid=i%txtOnLbl + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMEdit).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%txtOnLbl=oref + q r%txtOnLbl + q "" + +txtOnLblGetObject(%this,force) s force=$g(force,0) + q:r%txtOnLbl=$$$NULLOREF $s(i%txtOnLbl="":"",1:$lb(i%txtOnLbl_"")) n oid q:$$$ISOK(..txtOnLbl.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +txtOnLblGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..txtOnLblGetObject(force)) + +txtOnLblIsModified(%this) ; + q $$$objModBit(##this,30) + +#classmethod +txtOnLblIsValid(value) ; + q 1 +#endclassmethod + +txtOnLblNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMEdit).%New("") i newobject=$$$NULLOREF q newobject + s ..txtOnLbl=newobject d newobject.%Close() + q newobject + q "" + +txtOnLblResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%txtOnLbl'=$$$NULLOREF s sc=..txtOnLbl.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%txtOnLbl'=$$$oidPrimary(newvalue) $$$objModBit(##this,30)=1 s i%txtOnLbl=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +txtOnLblSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%txtOnLbl=newvalue q $$$OK + i r%txtOnLbl'=$$$NULLOREF n temp $$$objReferenceListRemove(r%txtOnLbl,%this,temp) d ..txtOnLbl.%Close() + s:(r%txtOnLbl'=newvalue)!((newvalue=$$$NULLOREF)&(i%txtOnLbl'="")) $$$objModBit(##this,30)=1 + s r%txtOnLbl=newvalue,i%txtOnLbl=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%txtOnLbl,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +txtOnLblSetModified(%this,newvalue) ; + s $$$objModBit(##this,30)=''newvalue + QUIT $$$OK + q "" + +txtOnLblSetObject(%this,newvalue) ; + i r%txtOnLbl=$$$NULLOREF s:i%txtOnLbl'=$$$oidPrimary(newvalue) $$$objModBit(##this,30)=1 s i%txtOnLbl=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..txtOnLbl.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,30)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%txtOnLbl,%this,temp) do ..txtOnLbl.%Close() s r%txtOnLbl=$$$NULLOREF s i%txtOnLbl=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +txtOnLblSetObjectId(%this,newid) ; + q ..txtOnLblSetObject($$$oidForm(newid)) + +txtOnLblUnSwizzle(%this) ; + q:r%txtOnLbl=$$$NULLOREF + n sc s sc=..txtOnLblResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%txtOnLbl,%this,temp) d ..txtOnLbl.%Close() s r%txtOnLbl=$$$NULLOREF QUIT $$$OK + q "" + +txtOnRtnGet(%this) ; + i r%txtOnRtn'=$$$NULLOREF q r%txtOnRtn + n oid,oref s oid=i%txtOnRtn + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMEdit).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%txtOnRtn=oref + q r%txtOnRtn + q "" + +txtOnRtnGetObject(%this,force) s force=$g(force,0) + q:r%txtOnRtn=$$$NULLOREF $s(i%txtOnRtn="":"",1:$lb(i%txtOnRtn_"")) n oid q:$$$ISOK(..txtOnRtn.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +txtOnRtnGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..txtOnRtnGetObject(force)) + +txtOnRtnIsModified(%this) ; + q $$$objModBit(##this,31) + +#classmethod +txtOnRtnIsValid(value) ; + q 1 +#endclassmethod + +txtOnRtnNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMEdit).%New("") i newobject=$$$NULLOREF q newobject + s ..txtOnRtn=newobject d newobject.%Close() + q newobject + q "" + +txtOnRtnResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%txtOnRtn'=$$$NULLOREF s sc=..txtOnRtn.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%txtOnRtn'=$$$oidPrimary(newvalue) $$$objModBit(##this,31)=1 s i%txtOnRtn=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +txtOnRtnSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%txtOnRtn=newvalue q $$$OK + i r%txtOnRtn'=$$$NULLOREF n temp $$$objReferenceListRemove(r%txtOnRtn,%this,temp) d ..txtOnRtn.%Close() + s:(r%txtOnRtn'=newvalue)!((newvalue=$$$NULLOREF)&(i%txtOnRtn'="")) $$$objModBit(##this,31)=1 + s r%txtOnRtn=newvalue,i%txtOnRtn=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%txtOnRtn,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +txtOnRtnSetModified(%this,newvalue) ; + s $$$objModBit(##this,31)=''newvalue + QUIT $$$OK + q "" + +txtOnRtnSetObject(%this,newvalue) ; + i r%txtOnRtn=$$$NULLOREF s:i%txtOnRtn'=$$$oidPrimary(newvalue) $$$objModBit(##this,31)=1 s i%txtOnRtn=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..txtOnRtn.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,31)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%txtOnRtn,%this,temp) do ..txtOnRtn.%Close() s r%txtOnRtn=$$$NULLOREF s i%txtOnRtn=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +txtOnRtnSetObjectId(%this,newid) ; + q ..txtOnRtnSetObject($$$oidForm(newid)) + +txtOnRtnUnSwizzle(%this) ; + q:r%txtOnRtn=$$$NULLOREF + n sc s sc=..txtOnRtnResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%txtOnRtn,%this,temp) d ..txtOnRtn.%Close() s r%txtOnRtn=$$$NULLOREF QUIT $$$OK + q "" + +txtSearchForGet(%this) ; + i r%txtSearchFor'=$$$NULLOREF q r%txtSearchFor + n oid,oref s oid=i%txtSearchFor + s oid=$$$oidForm(oid) + s oref=##class(%Library.TMEdit).%Open(oid) i oref=$$$NULLOREF q $$$NULLOREF + $$$objReferenceListAdd(oref,%this) + s r%txtSearchFor=oref + q r%txtSearchFor + q "" + +txtSearchForGetObject(%this,force) s force=$g(force,0) + q:r%txtSearchFor=$$$NULLOREF $s(i%txtSearchFor="":"",1:$lb(i%txtSearchFor_"")) n oid q:$$$ISOK(..txtSearchFor.%GetSwizzleObject(force,.oid)) oid q "" + q "" + +txtSearchForGetObjectId(%this,force) s force=$g(force,0) + q $$$oidPrimary(..txtSearchForGetObject(force)) + +txtSearchForIsModified(%this) ; + q $$$objModBit(##this,32) + +#classmethod +txtSearchForIsValid(value) ; + q 1 +#endclassmethod + +txtSearchForNewObject(%this) ; + n newobject + s newobject=##class(%Library.TMEdit).%New("") i newobject=$$$NULLOREF q newobject + s ..txtSearchFor=newobject d newobject.%Close() + q newobject + q "" + +txtSearchForResetObject(%this,force) s force=$g(force,0) + n sc,newvalue i r%txtSearchFor'=$$$NULLOREF s sc=..txtSearchFor.%GetSwizzleObject(force,.newvalue) q:$$$ISERR(sc) sc s:i%txtSearchFor'=$$$oidPrimary(newvalue) $$$objModBit(##this,32)=1 s i%txtSearchFor=$$$oidPrimary(newvalue) + QUIT $$$OK + q "" + +txtSearchForSet(%this,newvalue) ; + i newvalue'=$$$NULLOREF,'$$$objExists(newvalue) q $$$ERROR($$$OrefInvalid,newvalue) + i newvalue'=$$$NULLOREF,r%txtSearchFor=newvalue q $$$OK + i r%txtSearchFor'=$$$NULLOREF n temp $$$objReferenceListRemove(r%txtSearchFor,%this,temp) d ..txtSearchFor.%Close() + s:(r%txtSearchFor'=newvalue)!((newvalue=$$$NULLOREF)&(i%txtSearchFor'="")) $$$objModBit(##this,32)=1 + s r%txtSearchFor=newvalue,i%txtSearchFor=$$$NULLOID + i newvalue=$$$NULLOREF QUIT $$$OK + $$$objReferenceListAdd(r%txtSearchFor,%this) $$$IncrementReferenceCount(newvalue) + QUIT $$$OK + q "" + +txtSearchForSetModified(%this,newvalue) ; + s $$$objModBit(##this,32)=''newvalue + QUIT $$$OK + q "" + +txtSearchForSetObject(%this,newvalue) ; + i r%txtSearchFor=$$$NULLOREF s:i%txtSearchFor'=$$$oidPrimary(newvalue) $$$objModBit(##this,32)=1 s i%txtSearchFor=$$$oidPrimary(newvalue) QUIT $$$OK + n sc,oid s sc=..txtSearchFor.%GetSwizzleObject(0,.oid) q:$$$ISERR(sc) sc + s:oid'=newvalue $$$objModBit(##this,32)=1 + i newvalue'="",oid=newvalue QUIT $$$OK + n temp $$$objReferenceListRemove(r%txtSearchFor,%this,temp) do ..txtSearchFor.%Close() s r%txtSearchFor=$$$NULLOREF s i%txtSearchFor=$$$oidPrimary(newvalue) QUIT $$$OK + q "" + +txtSearchForSetObjectId(%this,newid) ; + q ..txtSearchForSetObject($$$oidForm(newid)) + +txtSearchForUnSwizzle(%this) ; + q:r%txtSearchFor=$$$NULLOREF + n sc s sc=..txtSearchForResetObject() q:$$$ISERR(sc) sc + n temp $$$objReferenceListRemove(r%txtSearchFor,%this,temp) d ..txtSearchFor.%Close() s r%txtSearchFor=$$$NULLOREF QUIT $$$OK + q "" + +#endclasscontext UI.Utils.RtnFind.MainForm \ No newline at end of file Index: Stat/PR/StockAanpassing/1.mac.rou =================================================================== diff -u --- Stat/PR/StockAanpassing/1.mac.rou (revision 0) +++ Stat/PR/StockAanpassing/1.mac.rou (revision 1156) @@ -0,0 +1,825 @@ + ;Stat.PR.StockAanpassing.1 + ;(C)InterSystems, generated for class Stat.PR.StockAanpassing. Do NOT edit. 09/30/2002 11:52AM + ;;43612B14781CABB3;Stat.PR.StockAanpassing + q + ; +#classcontext Stat.PR.StockAanpassing + #; method code import packages begin + #import %Library + #import Stat.PR + #; method code import packages end + #; method code include files begin + #include %occExtent + #include %occInclude + #include %occTransaction + #; method code include files end + + +%AcquireLock(%this,locktype) ; + n %sc,id + s id=..%Id() QUIT:$g(id)="" $$$ERROR($$$NullId) + s %sc=$$$OK + i $g(locktype)="e" l +(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)):5 s:'$t %sc=$$$ERROR($$$LockFailedToAcquireExclusive) QUIT %sc + i $g(locktype)="s" l +(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type,$j)):5 s:'$t %sc=$$$ERROR($$$LockFailedToAcquireRead) QUIT %sc + QUIT $$$ERROR($$$LockTypeInvalid,locktype) + q "" + +#classmethod +%BuildIndices(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%CheckUnique(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%CheckUnique") + q "" +#endclassmethod + +%ClassName(%this,fullname) s fullname=$g(fullname,0) + q $s(fullname:"Stat.PR.StockAanpassing",1:"StockAanpassing") + +%Close(%this) ; + n a s a=$$$objReferenceCount(%this) q:'a $$$OK i a'>$ll($g($$$objReferenceList(%this))) q $$$ERROR($$$TooManyCallsToClose) + s $$$objReferenceCount(%this)=a-1 + i a>1 q:(a-1)>$ll($g($$$objReferenceList(%this))) $$$OK d q:'a $$$OK s $$$objReferenceCount(%this)=0 + . n checklist,checkobj,list,oreffrom,close,i s checklist=$lb(%this),close(%this)="" + . f s checkobj=$li(checklist) s checklist=$li(checklist,2,-1) d q:checklist=""!'a + . . s list=$g($$$objReferenceList(checkobj)),oreffrom="" f i=1:1:$ll(list) s oreffrom=$li(list,i) i '$d(close(oreffrom)) s:$$$objReferenceCount(oreffrom)=0 a=0 q:'a s:$$$objReferenceCount(oreffrom)>$ll($g($$$objReferenceList(oreffrom))) a=0 q:'a s close(oreffrom)="",checklist=checklist_$lb(oreffrom) + i ..%Concurrency=3 d ..%ReleaseLock("s") + i ..%Concurrency=4 d ..%ReleaseLock("e") + s a=$$$objOID(%this) + $$$DeleteObject(%this) + i a'="" $$$ActiveOidRemove(a,%this) + k $$$txLIST(%this),$$$txOIDASSIGNED(%this),$$$txMODIFIED(%this) + QUIT $$$OK + q "" + +#classmethod +%Delete(oid,concurrency) s oid=$g(oid,""),concurrency=$g(concurrency,$zu(115,10)) + n class,id,sc,traninit QUIT:oid="" $$$ERROR($$$NullOid) s id=$$$oidPrimary(oid) QUIT:id="" $$$ERROR($$$NullId) + s class=$$$oidClassName(oid) + i class'="" s class=$$$NormalizeClassname(class) + i class="" s sc=..%OnDetermineClass(oid,.class) q:$$$ISERR(sc) sc s oid=$$$oidInsertClassName(oid,class) + i "Stat.PR.StockAanpassing"'=class q $zobjclassmethod(class,"%Delete",oid) + s traninit=0 i $zu(115,9) s traninit=1 tstart + s sc=..%DeleteData(id,concurrency) +%DeleteEnd i traninit DO + . i $$$ISOK(sc) tcommit + . i $$$ISERR(sc) trollback + i $$$ISERR(sc) QUIT sc + n oref $$$ActiveOidModified(oid,oref) + QUIT sc + q "" +#endclassmethod + +#classmethod +%DeleteData(id,concurrency) ; + QUIT:id="" $$$ERROR($$$NullId) + n %kp1,%kp2,%kp3,%sc + s %sc=$$$ERROR($$$DeleteObjectNotFound) + s %kp1=$p(id,"||",1),%kp2=$p(id,"||",2),%kp3=$p(id,"||",3) + i concurrency>1 l +(^Stat.PR.StockAanpassingD(%kp1,%kp2,%kp3)):5 i '$t QUIT $$$ERROR($$$LockFailedToAcquireExclusive) + s:($d(^Stat.PR.StockAanpassingD(%kp1,%kp2,%kp3))) %sc=$$$OK + i $$$ISOK(%sc) DO + . k ^Stat.PR.StockAanpassingD(%kp1,%kp2,%kp3) + i concurrency>1 l -(^Stat.PR.StockAanpassingD(%kp1,%kp2,%kp3)) + QUIT %sc + q "" +#endclassmethod + +#classmethod +%DeleteExtent(concurrency,deletecount,instancecount) s concurrency=$g(concurrency,$zu(115,10)) + n atend,id,qh,row,rs,sc + s deletecount=0,instancecount=0 + s sc=..ExtentExecute(.qh) QUIT:$$$ISERR(sc) sc + f s sc=..ExtentFetch(.qh,.row,.atend) q:$s(row="":1,$$$ISERR(sc):1,1:0) s id=$lg(row) i id'="" s sc=..%Delete($lb(id),concurrency) s instancecount=instancecount+1 s:$$$ISOK(sc) deletecount=deletecount+1 q:atend + d ..ExtentClose(qh) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%DeleteId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + q ..%Delete($$$oidForm(id),concurrency) +#endclassmethod + +%DowngradeConcurrency(%this,concurrency) ; + n current,sc + s current=..%Concurrency + #; If the requested setting is greater than the current setting, then do nothing + If concurrency>current QUIT $$$OK + #; Locks are not retained for any setting less than 3 and if the old and new + #; setting are the same, nothing is to done except update the concurrency setting + i current<3!(current=concurrency) s:concurrency2 s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc + #; the following line releases the old lock which we know must be there + #; because we process and quit above for current<3 + Do ..%ReleaseLock($s(current=3:"s",1:"e")) + #; Update the concurrency setting: + s ..%Concurrency=concurrency + QUIT $$$OK + q "" + +#classmethod +%Exists(oid) s oid=$g(oid,"") + q ..%ExistsId($$$oidPrimary(oid)) +#endclassmethod + +#classmethod +%ExistsId(id) s id=$g(id,"") + QUIT:id="" $$$ERROR($$$NullId) + s %kp1=$p(id,"||",1),%kp2=$p(id,"||",2),%kp3=$p(id,"||",3) + i ($d(^Stat.PR.StockAanpassingD(%kp1,%kp2,%kp3))) Quit 1 + QUIT 0 + q "" +#endclassmethod + +%GetSwizzleObject(%this,force,oid) s force=$g(force,0) + n sc s oid="" i force=0 s oid=..%Oid() QUIT $$$OK + i force=2 s sc=..%Save(1) s:$$$ISOK(sc) oid=..%Oid() QUIT sc + s oid=..%Oid() QUIT:oid'="" $$$OK + s sc=..%Save(0) s:$$$ISOK(sc) oid=..%Oid() QUIT sc + q "" + +%Id(%this) ; + q $$$oidPrimary($$$objOID(##this)) + +%IdSet(%this,id) ; + n oid s oid=$$$oidCompose(id,"Stat.PR.StockAanpassing") + i $$$objOID(##this)'="",$$$objOID(##this)'=oid QUIT $$$ERROR($$$OidPreviouslyAssigned) + s $$$objOID(##this)=oid + $$$ActiveOidInsert(oid,##this) + QUIT $$$OK + q "" + +%IncrementCount(%this) ; + $$$IncrementReferenceCount(%this) q + q + +#classmethod +%IsA(isclass) ; + q "~Stat.PR.StockAanpassing~%Library.Persistent~%Library.RegisteredObject~"[("~"_$$$NormalizeClassname(isclass)_"~") +#endclassmethod + +%IsModified(%this) ; + q $$$objModAll(##this) + +#classmethod +%KillExtent() ; + n sc,subextent + s subextent="" f s subextent=$o($$$EXTSUBEXTENT($$$pEXT,"Stat.PR.StockAanpassing",subextent)) q:subextent="" s sc=$zobjclassmethod(subextent,"%KillExtent") + s sc=..%PurgeIndices() q:$$$ISERR(sc) sc + k ^Stat.PR.StockAanpassingD + QUIT $$$OK + q "" +#endclassmethod + +%Load(%this,id) ; + n sc s sc=..%IdSet(id) QUIT:$$$ISERR(sc) sc + s sc=..%LoadData(id) QUIT:$$$ISERR(sc) sc + QUIT $$$OK + q "" + +%LoadData(%this,id) ; + n %sc + s %sc=$$$ERROR($$$LoadObjectNotFound) + s i%Product=$p(id,"||",1),i%Datum=$p(id,"||",2),i%Type=$p(id,"||",3) + i ..%Concurrency=4 l +(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)):5 i '$t QUIT $$$ERROR($$$LockFailedToAcquireExclusive) + i ..%Concurrency'=4,..%Concurrency>1 l +(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type,$j)):5 i '$t QUIT $$$ERROR($$$LockFailedToAcquireRead) + i '$d(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)) s i%AantalLijnen="",i%AantalStuks="",i%Waarde="" + e DO + . n %s1 + . s %sc=$$$OK + . s %s1=$g(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)) + . s i%AantalLijnen=$lg(%s1,2),i%AantalStuks=$lg(%s1,3),i%Waarde=$lg(%s1,4) + i ..%Concurrency=2 l -(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type,$j)) + QUIT %sc + q "" + +#classmethod +%New(initvalue) ; + n %this,sc,oref +#endclassmethod + s %this=$$$CreateObject("Stat.PR.StockAanpassing") + s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" + s i%%Concurrency=$zu(115,10),i%%IsInSave=0,i%AantalLijnen="",i%AantalStuks="",i%Datum="" + s i%Product="",i%Type="",i%Waarde="" + $$$objModAllSet(##this,1) + QUIT %this +#classmethod + q "" +#endclassmethod + +%NormalizeObject(%this) ; + i i%AantalLijnen'="" s i%AantalLijnen=(..AantalLijnenNormalize(i%AantalLijnen)) + i i%AantalStuks'="" s i%AantalStuks=(..AantalStuksNormalize(i%AantalStuks)) + i i%Datum'="" s i%Datum=(..DatumNormalize(i%Datum)) + i i%Product'="" s i%Product=(..ProductNormalize(i%Product)) + i i%Type'="" s i%Type=(..TypeNormalize(i%Type)) + i i%Waarde'="" s i%Waarde=(..WaardeNormalize(i%Waarde)) + QUIT $$$OK + q "" + +%Oid(%this) ; + q $$$objOID(##this) + +#classmethod +%OnDetermineClass(oid,class) ; + n %o3,%o4,%o5,id,idclass + s id=$$$oidPrimary($g(oid)) QUIT:id="" $$$ERROR($$$NullId) + s %o4=$p(id,"||",1),%o3=$p(id,"||",2),%o5=$p(id,"||",3) + s idclass="Stat.PR.StockAanpassing" + s class=$s(idclass="":"Stat.PR.StockAanpassing",1:$p(idclass,$e(idclass),$l(idclass,$e(idclass))-1)) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%Open(oid,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + i $$$oidPrimary($g(oid))="" QUIT $$$NULLOREF + n sc,%this,class s class=$$$oidClassName(oid) + i class'="" s class=$$$NormalizeClassname(class) + i class="" s sc=..%OnDetermineClass(oid,.class) q:$$$ISERR(sc) $$$NULLOREF s oid=$$$oidInsertClassName(oid,class) + i "Stat.PR.StockAanpassing"'=class q $zobjclassmethod(class,"%Open",oid,concurrency) +#endclassmethod + $$$ActiveOidSearch(oid,%this) + i %this DO QUIT %this + . i concurrency>..%Concurrency i '..%UpgradeConcurrency(concurrency) s %this="" q + . $$$IncrementReferenceCount(%this) + s %this=$$$CreateObject("Stat.PR.StockAanpassing") + s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" + s i%%Concurrency="",..%Concurrency=concurrency + s sc=..%Load($$$oidPrimary(oid)) i $$$ISERR(sc) d ..%Close() QUIT $$$NULLOREF + s i%%IsInSave=0 + $$$objModAllSet(##this,0) + QUIT %this +#classmethod + q "" +#endclassmethod + +#classmethod +%OpenId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) + q ..%Open($$$oidForm(id),concurrency) +#endclassmethod + +%PackageName(%this) ; + q "Stat.PR" + +#classmethod +%PurgeIndices(idxlist) s idxlist=$g(idxlist,"") + QUIT $$$OK + q "" +#endclassmethod + +%ReleaseLock(%this,locktype) ; + n %sc,id + s id=..%Id() QUIT:$g(id)="" $$$ERROR($$$NullId) + s %sc=$$$OK + i $g(locktype)="e" l -(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)) QUIT $$$OK + i $g(locktype)="s" l -(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type,$j)) QUIT $$$OK + QUIT $$$ERROR($$$LockTypeInvalid,locktype) + q "" + +%ResetAllObject(%this,force) s force=$g(force,0) + q 1 + +%RollBack(%this) ; + n sc s sc=$$$OK + i $d($$$txMODIFIED(##this)) $$$objModStateRestore(##this,$$$txMODIFIED(##this)) + QUIT sc + q "" + +%Save(%this,related) s related=$g(related,1) + n id,oid,ok,sc,traninit s oid=..%Oid(),id=$$$oidPrimary(oid) i 'i%%IsInSave d s i%%IsInSave=0 QUIT sc + . s oid="",sc=$$$OK,traninit=0 + . i $$$txNOTINTRAN DO + . . s traninit=1 + . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot + . . i '$zu(115,9) s $$$txSTATUS=1 q + . . s $$$txSTATUS=2 tstart + . s:$$$txON $$$txLIST(##this)="" + . s i%%IsInSave=1 + . s sc=..%ValidateObject(related+1) i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . s sc=..%NormalizeObject() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . s sc=..%ResetAllObject(related+1) i $$$ISERR(sc) d i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . . s sc=..%SaveData(id) q:$$$ISERR(sc) + . . s sc=..%ResetAllObject(related+1) + . i ..%IsModified()!(related=0) s sc=..%SaveData(id) s:$$$ISOK(sc) oid=..%Oid() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q + . i ..%IsModified(),$$$txON $$$objModStateSave(##this,$$$txMODIFIED(##this)) + . $$$objModAllSet(##this,0) i traninit d i $$$ISERR(ok) s sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()),oid="" q + . . i $$$txOFF k $$$txSTATUS s ok=$$$OK q + . . tcommit + . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot + . . s ok=$$$OK,sc=$$$OK + . s:oid="" oid=..%Oid() + . q + QUIT:oid'="" $$$OK + s sc=..%ValidateObject(0) QUIT:$$$ISERR(sc) sc + i ..%ResetAllObject(0) + s sc=..%SaveData(id) i $$$ISOK(sc) QUIT $$$OK + QUIT sc + q "" + +%SaveData(%this,id) ; + n %sc,idassigned,idclass,insert + s %sc=$$$OK,id=..%Id() i id'="" s insert=0,idassigned=1 + e s insert=1,idassigned=0 + s idclass="" + n lock + s lock=0 + i 'insert,'(($d(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)))) s insert=1 + i insert DO + . i 'idassigned s id=i%Product_"||"_i%Datum_"||"_i%Type i 1 + . e i $s(i%Product'=$p(id,"||",1):1,i%Datum'=$p(id,"||",2):1,i%Type'=$p(id,"||",3):1,1:0) s %sc=$$$ERROR($$$OidPreviouslyAssigned) q + . i ..%Concurrency=4 l +(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)):5 e s %sc=$$$ERROR($$$LockFailedToAcquireExclusive) q + . i $d(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)) s %sc=$$$ERROR($$$IDKeyNotUnique) q + . i 'idassigned s %sc=..%IdSet(id) q:$$$ISERR(%sc) s:$$$txON $$$txOIDASSIGNED(##this)="" + . s ^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)=$lb("",i%AantalLijnen,i%AantalStuks,i%Waarde) + . i ..%Concurrency=3 l +(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type,$j)) + i 'insert DO + . i $s(i%Product'=$p(id,"||",1):1,i%Datum'=$p(id,"||",2):1,i%Type'=$p(id,"||",3):1,1:0) s %sc=$$$ERROR($$$OidPreviouslyAssigned) q + . i ..%Concurrency>1 l +(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)):5 s lock=$t e s %sc=$$$ERROR($$$LockFailedToAcquireExclusive) q + . s ^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)=$lb("",i%AantalLijnen,i%AantalStuks,i%Waarde) + i lock l -(^Stat.PR.StockAanpassingD(i%Product,i%Datum,i%Type)) + QUIT %sc + q "" + +#classmethod +%SortBegin(idxlist,excludeunique) s idxlist=$g(idxlist,""),excludeunique=$g(excludeunique,0) + QUIT $$$OK + q "" +#endclassmethod + +#classmethod +%SortEnd(idxlist,commit) s idxlist=$g(idxlist,""),commit=$g(commit,1) + QUIT $$$OK + q "" +#endclassmethod + +%UpgradeConcurrency(%this,concurrency) ; + n current,sc + #; Locks are not retained for any setting + #; less than 3 and if the old and new + #; setting are the same, nothing is to done! + s current=..%Concurrency + Quit:concurrencycurrent ..%Concurrency=concurrency QUIT $$$OK + #; Get the new lock + s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc + #; the following line releases the old lock + #; which must be a shared lock as that is the + #; only possible condition. + i current=3 d ..%ReleaseLock("s") + #; Update the concurrency setting: + s ..%Concurrency=concurrency + QUIT $$$OK + q "" + +%ValidateObject(%this,force) s force=$g(force,0) + #; VALIDATE=2, modified=3 + n iv i ..%IsModified() DO QUIT:'iv iv + . s iv=..%Concurrency i iv'="" s iv=(..%ConcurrencyIsValid(iv)) q:$$$ISERR(iv) + . s iv=..%IsInSave i iv'="" s iv=(..%IsInSaveIsValid(iv)) q:$$$ISERR(iv) + . s iv=..AantalLijnen i iv'="" s iv=(..AantalLijnenIsValid(iv)) q:$$$ISERR(iv) + . s iv=..AantalStuks i iv'="" s iv=(..AantalStuksIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Datum i iv="" s iv=$$$ERROR($$$PropertyRequired,"Datum") q + . s iv=(..DatumIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Product i iv="" s iv=$$$ERROR($$$PropertyRequired,"Product") q + . s iv=(..ProductIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Type i iv="" s iv=$$$ERROR($$$PropertyRequired,"Type") q + . s iv=(..TypeIsValid(iv)) q:$$$ISERR(iv) + . s iv=..Waarde i iv'="" s iv=(..WaardeIsValid(iv)) q:$$$ISERR(iv) + . s iv=$$$OK + QUIT $$$OK + q "" + +%ConcurrencyGet(%this) ; + q i%%Concurrency + +%ConcurrencyIsModified(%this) ; + q $$$objModBit(##this,1) + +#classmethod +%ConcurrencyIsValid(value) ; + q 1 +#endclassmethod + +%ConcurrencySet(%this,newvalue) ; + s:newvalue'=i%%Concurrency $$$objModBit(##this,1)=1 + s i%%Concurrency=newvalue QUIT $$$OK + q "" + +%ConcurrencySetModified(%this,newvalue) ; + s $$$objModBit(##this,1)=''newvalue + QUIT $$$OK + q "" + +%IsInSaveGet(%this) ; + q i%%IsInSave + +%IsInSaveIsModified(%this) ; + q $$$objModBit(##this,2) + +#classmethod +%IsInSaveIsValid(value) ; + q 1 +#endclassmethod + +%IsInSaveSet(%this,newvalue) ; + s:newvalue'=i%%IsInSave $$$objModBit(##this,2)=1 + s i%%IsInSave=newvalue QUIT $$$OK + q "" + +%IsInSaveSetModified(%this,newvalue) ; + s $$$objModBit(##this,2)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..AantalLijnen +#classmethod +AantalLijnenDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..AantalLijnen + +AantalLijnenGet(%this) ; + q i%AantalLijnen + +AantalLijnenIsModified(%this) ; + q $$$objModBit(##this,3) + +#classmethod +AantalLijnenIsValid(value) ; + q $s(..AantalLijnenIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockAanpassing.AantalLijnen")) +#endclassmethod + +#classcontext ..AantalLijnen +#classmethod +AantalLijnenIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..AantalLijnen + +#classcontext ..AantalLijnen +#classmethod +AantalLijnenLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..AantalLijnen + +#classcontext ..AantalLijnen +#classmethod +AantalLijnenNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..AantalLijnen + +AantalLijnenSet(%this,newvalue) ; + s:newvalue'=i%AantalLijnen $$$objModBit(##this,3)=1 + s i%AantalLijnen=newvalue QUIT $$$OK + q "" + +AantalLijnenSetModified(%this,newvalue) ; + s $$$objModBit(##this,3)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..AantalStuks +#classmethod +AantalStuksDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..AantalStuks + +AantalStuksGet(%this) ; + q i%AantalStuks + +AantalStuksIsModified(%this) ; + q $$$objModBit(##this,4) + +#classmethod +AantalStuksIsValid(value) ; + q $s(..AantalStuksIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockAanpassing.AantalStuks")) +#endclassmethod + +#classcontext ..AantalStuks +#classmethod +AantalStuksIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..AantalStuks + +#classcontext ..AantalStuks +#classmethod +AantalStuksLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..AantalStuks + +#classcontext ..AantalStuks +#classmethod +AantalStuksNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..AantalStuks + +AantalStuksSet(%this,newvalue) ; + s:newvalue'=i%AantalStuks $$$objModBit(##this,4)=1 + s i%AantalStuks=newvalue QUIT $$$OK + q "" + +AantalStuksSetModified(%this,newvalue) ; + s $$$objModBit(##this,4)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Datum +#classmethod +DatumDisplayToLogical(%val) ; + q $s(%val="":"",1:$zdh(%val,,,5,80,20,,,"")) +#endclassmethod +#endclasscontext ..Datum + +DatumGet(%this) ; + q i%Datum + +DatumIsModified(%this) ; + q $$$objModBit(##this,5) + +#classmethod +DatumIsValid(value) ; + q $s(..DatumIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockAanpassing.Datum")) +#endclassmethod + +#classcontext ..Datum +#classmethod +DatumIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumLogicalToDisplay(%val) ; + q $s(%val="":"",1:$zd(%val,,,4)) +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumLogicalToOdbc(%val) s %val=$g(%val,"") + q $s(%val="":"",1:$zd(%val,3)) +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..Datum + +#classcontext ..Datum +#classmethod +DatumOdbcToLogical(%val) s %val=$g(%val,"") + q $s(%val="":"",1:$zdh(%val,3,,,,,,,"error")) +#endclassmethod +#endclasscontext ..Datum + +DatumSet(%this,newvalue) ; + s:newvalue'=i%Datum $$$objModBit(##this,5)=1 + s i%Datum=newvalue QUIT $$$OK + q "" + +DatumSetModified(%this,newvalue) ; + s $$$objModBit(##this,5)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Product +#classmethod +ProductDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..Product + +ProductGet(%this) ; + q i%Product + +ProductIsModified(%this) ; + q $$$objModBit(##this,6) + +#classmethod +ProductIsValid(value) ; + q $s(..ProductIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockAanpassing.Product")) +#endclassmethod + +#classcontext ..Product +#classmethod +ProductIsValidDT(%val) ; + q $isvalidnum(%val,0,,) +#endclassmethod +#endclasscontext ..Product + +#classcontext ..Product +#classmethod +ProductLogicalToDisplay(%val) ; + q %val +#endclassmethod +#endclasscontext ..Product + +#classcontext ..Product +#classmethod +ProductNormalize(%val) ; + q %val\1 +#endclassmethod +#endclasscontext ..Product + +ProductSet(%this,newvalue) ; + s:newvalue'=i%Product $$$objModBit(##this,6)=1 + s i%Product=newvalue QUIT $$$OK + q "" + +ProductSetModified(%this,newvalue) ; + s $$$objModBit(##this,6)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Type +#classmethod +TypeDisplayToLogical(%val) ; + q:%val="Aankoop" "A" + q:%val="Verkoop" "V" + q:%val="Manueel" "M" + q:%val="Transfer" "T" + q "" + q "" +#endclassmethod +#endclasscontext ..Type + +TypeGet(%this) ; + q i%Type + +TypeIsModified(%this) ; + q $$$objModBit(##this,7) + +#classmethod +TypeIsValid(value) ; + q $s(..TypeIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockAanpassing.Type")) +#endclassmethod + +#classcontext ..Type +#classmethod +TypeIsValidDT(%val) ; + q (%val'[";")&(";A;V;M;T;"[(";"_%val_";")) +#endclassmethod +#endclasscontext ..Type + +#classcontext ..Type +#classmethod +TypeLogicalToDisplay(%val) ; + q:%val="A" "Aankoop" + q:%val="V" "Verkoop" + q:%val="M" "Manueel" + q:%val="T" "Transfer" + q "" + q "" +#endclassmethod +#endclasscontext ..Type + +#classcontext ..Type +#classmethod +TypeNormalize(%val) ; + q $e(%val,1,1) +#endclassmethod +#endclasscontext ..Type + +TypeSet(%this,newvalue) ; + s:newvalue'=i%Type $$$objModBit(##this,7)=1 + s i%Type=newvalue QUIT $$$OK + q "" + +TypeSetModified(%this,newvalue) ; + s $$$objModBit(##this,7)=''newvalue + QUIT $$$OK + q "" + +#classcontext ..Waarde +#classmethod +WaardeDisplayToLogical(%val) ; + q $in(%val,"","") +#endclassmethod +#endclasscontext ..Waarde + +WaardeGet(%this) ; + q i%Waarde + +WaardeIsModified(%this) ; + q $$$objModBit(##this,8) + +#classmethod +WaardeIsValid(value) ; + q $s(..WaardeIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"Stat.PR.StockAanpassing.Waarde")) +#endclassmethod + +#classcontext ..Waarde +#classmethod +WaardeIsValidDT(%val) ; + q $isvalidnum(%val,,,) +#endclassmethod +#endclasscontext ..Waarde + +#classcontext ..Waarde +#classmethod +WaardeLogicalToDisplay(%val) ; + q $s(%val="":"",1:$fn(%val,"",4)) +#endclassmethod +#endclasscontext ..Waarde + +#classcontext ..Waarde +#classmethod +WaardeNormalize(%val) ; + q +%val +#endclassmethod +#endclasscontext ..Waarde + +WaardeSet(%this,newvalue) ; + s:newvalue'=i%Waarde $$$objModBit(##this,8)=1 + s i%Waarde=newvalue QUIT $$$OK + q "" + +WaardeSetModified(%this,newvalue) ; + s $$$objModBit(##this,8)=''newvalue + QUIT $$$OK + q "" + +#classmethod +ExtentExecute(qHandle) ; + n %sc,SQLCODE + #sqlcompile select=RUNTIME + s %sc=$$$OK + s qHandle=$i(%objcn) +#EXECUTE s %msqlvar="%objcs(qHandle" + &sql(DECLARE Q13 CURSOR FOR + SELECT ID FROM Stat_PR.StockAanpassing) +#EXECUTE k %msqlvar + &sql(OPEN Q13) + i SQLCODE s %sc=$$$ERROR($$$QueryCannotInstantiate,"SQLCODE = "_SQLCODE) + QUIT %sc + q "" +#endclassmethod + +#classmethod +ExtentClose(qHandle) ; + n SQLCODE + &sql(CLOSE Q13) + k %objcsc(qHandle),%objcsp(qHandle),%objcss(qHandle),%objcst(qHandle),%objcsl(qHandle),%objcsR(qHandle),%objcsZ(qHandle),%objcsd(qHandle) + QUIT $s('SQLCODE:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentFetch(qHandle,Row,AtEnd) s AtEnd=$g(AtEnd,0) + n SQLCODE,c1 + s Row="",AtEnd=0 + &sql(FETCH Q13 INTO :c1) + i 'SQLCODE s Row=$lb(c1) i 1 + e s AtEnd=1 + QUIT $s('SQLCODE:$$$OK,SQLCODE=100:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentFetchRows(qHandle,FetchCount,RowSet,ReturnCount,AtEnd) s FetchCount=$g(FetchCount,0) + n done,i,SQLCODE,c1 + s done=0,RowSet="",ReturnCount=0,AtEnd=0 + f i=1:1 DO q:done + . &sql(FETCH Q13 INTO :c1) + . i 'SQLCODE s RowSet=RowSet_$lb(c1),ReturnCount=ReturnCount+1 s:ReturnCount=FetchCount done=1 s:($l(RowSet)+($l(RowSet)\ReturnCount))>24000 done=1 i 1 + . e s done=1,AtEnd=1 + QUIT $s('SQLCODE:$$$OK,SQLCODE=100:$$$OK,1:$$$ERROR($$$SQLError,SQLCODE_" "_$g(%msg))) + q "" +#endclassmethod + +#classmethod +ExtentGetInfo(colinfo,parminfo,idinfo,qHandle) ; + s parminfo="" + n clientinfo + s clientinfo=$g($$$QUERYclientinfo($$$pMAC,"Stat.PR.StockAanpassing","Extent")) + i clientinfo'="" s colinfo=$lg(clientinfo,1),parminfo=$lg(clientinfo,2),idinfo=$lg(clientinfo,3) QUIT $$$OK + n captions,exttypes,i,names,%sc + s colinfo="",parminfo="",idinfo=$lb(0) + s %sc=$$externaltype^%apiOLE("%Library.CacheString",.exttypes,"0") + QUIT:$$$ISERR(%sc) %sc + s names=$g($$$QUERYcolnames($$$pMAC,"Stat.PR.StockAanpassing","Extent")) + s captions=$g($$$QUERYcolcaptions($$$pMAC,"Stat.PR.StockAanpassing","Extent")) + f i=1:1:1 s colinfo=colinfo_$lb($lb($lg(names,i),$p(exttypes,",",i),$lg(captions,i))) + s idinfo=$lb(1) + s $$$QUERYclientinfo($$$pMAC,"Stat.PR.StockAanpassing","Extent")=$lb(colinfo,parminfo,idinfo) + QUIT $$$OK + q "" +#endclassmethod + +#endclasscontext Stat.PR.StockAanpassing \ No newline at end of file Index: UI/TNT/System.inc.rou =================================================================== diff -u --- UI/TNT/System.inc.rou (revision 0) +++ UI/TNT/System.inc.rou (revision 1156) @@ -0,0 +1,212 @@ + ; Key codes + #Define kcEnter "ENTER" + #Define kcTab "TAB" + #Define kcShiftTab "STAB" + #Define kcCom "COM" + #Define kcHelp "HELP" + #Define kcClose "CANC" + #Define kcCancel "CANC" + #Define kcSpec "SPEC" + #Define kcHome "HO" + #Define kcEnd "EN" + #Define kcNextPage "NP" + #Define kcPreviousPage "PP" + #Define kcBackSpace "BSP" + #Define kcDelete "WIS" + #Define kcInsert "INS" + #Define kcSpaceBar " " + #Define kcDown "DO" + #Define kcUp "UP" + #Define kcRight "RI" + #Define kcLeft "LE" + + ; Event address $LB(MethodORef,MethodName) + #Define MethodORef(%EventAddr) $$$objIntToOref($LI(%EventAddr,1)) + #Define MethodName(%EventAddr) $LI(%EventAddr,2) + #Define MethodParam(%EventAddr) $LG(%EventAddr,3) + + ; Special characters + #Define chVertBar $C(27,78,120) + #Define chHorzBar $C(27,78,113) + #Define chEllipsis $S(%Screen.Type=$$$ttVT520:$C(27,79,64),1:"~") + #Define chVink $S(%Screen.Type=$$$ttVT520:$C(27,79,86),1:"X") + #Define chEuro $C(27,78,113) + + ; Mouse buttons + #Define mbLeft "L" + #Define mbRight "R" + + ; Popup Key + #Define pkSeparator "#SEPARATOR#" + #Define pkSelectGeen "#SELECTGEEN#" + #Define pkSelectAlles "#SELECTALLES#" + + ; Exceptions + #Define EInvalidOperation 1 + #Define EInternalError 2 + + ; Resource strings + #Define SParentRequired "Control has no parent window" + #Define SCannotFocus "Cannot focus window or control" + #Define SCannotShowModal "Cannot make window modal" + + ; Verkortingen van UI.TNT.System + #Define SystemRtn UI.TNT.System + #Define GetParentForm(%c) $$GetParentForm^$$$SystemRtn(%c) + #Define GetDebugControlName(%c) $$GetDebugControlName^$$$SystemRtn(%c) + #Define PointInRect(%r,%c,%rc) $$PointInRect^$$$SystemRtn(%r,%c,%rc) + + #Define ShowMessageBox(%c,%m,%t) MessageBox^$$$SystemRtn(%c,%m,,%t) + + #Define MessageBoxSimple(%c,%m) $$MessageBox^$$$SystemRtn(%c,%m) + #Define MessageBox(%c,%m,%b) $$MessageBox^$$$SystemRtn(%c,%m,%b) + #Define MessageBoxFull(%c,%m,%b,%t,%d) $$MessageBox^$$$SystemRtn(%c,%m,%b,%t,%d) + + #Define InputBox(%c,%m,%b) $$InputBox^$$$SystemRtn(%c,%m,%b) + + ; Colors + ; Back and Foreground + #Define clBlack 1 + #Define clUltraDark 2 + #Define clDark 3 + #Define clMedDark 4 + #Define clMedLight 5 + #Define clLight 6 + #Define clUltraLight 7 + #Define clWhite 8 + + #Define clSelectDark 9 + #Define clSelectLight 10 + #Define clDarkGrey 11 + #Define clGrey 12 + #Define clRed 13 + #Define clBlue 14 + #Define clYellow 15 + #Define clGreen 16 + + ;Font style + #Define fsInvers "I" + #Define fsKnipper "K" + #Define fsBold "B" + #Define fsUnderline "U" + + #Define fsNoInvers "i" + #Define fsNoKnipper "k" + #Define fsNoBold "b" + #Define fsNoUnderline "u" + + ; Modal Results + #Define mrNone 0 + #Define mrOk 1 + #Define mrCancel 2 + #Define mrAbort 3 + #Define mrRetry 4 + #Define mrIgnore 5 + #Define mrYes 6 + #Define mrNo 7 + #Define mrAll 8 + #Define mrNoToAll 9 + #Define mrYesToAll 10 + #Define mrHelp 11 + + ;Buttons + #Define mbYes 1 + #Define mbNo 2 + #Define mbOk 3 + #Define mbCancel 4 + #Define mbAbort 5 + #Define mbRetry 6 + #Define mbIgnore 7 + #Define mbAll 8 + #Define mbNoToAll 9 + #Define mbYesToAll 10 + #Define mbHelp 11 + + ;Message types + #Define mtInformation 1 + #Define mtError 2 + + ;Button caption + #Define SMsgDlgYes "Yes" + #Define SMsgDlgNo "No" + #Define SMsgDlgOk "OK" + #Define SMsgDlgCancel "Cancel" + #Define SMsgDlgHelp "Help" + #Define SMsgDlgAbort "Abort" + #Define SMsgDlgRetry "Retry" + #Define SMsgDlgIgnore "Ignore" + #Define SMsgDlgAll "All" + #Define SMsgDlgNoToAll "No to All" + #Define SMsgDlgYesToAll "Yes to All" + + ;FormTypes + #Define ftMain 10 + #Define ftSub 20 + #Define ftDialog 30 + + ; FormSubTypes + #Define ftMainLijst 11 + #Define ftMainPopup 12 + #Define ftSubLijst 21 + #Define ftSubPopup 22 + #Define ftDialogLijst 31 + #Define ftDialogPopup 32 + + ; AddSubType + #Define ftAddLijst 1 + #Define ftAddPopup 2 + ; Menu is nog gelijk aan Popup + #Define ftAddMenu 2 + + ;FontSelects + #Define fsSelect 1 + #Define fsPopup 2 + #Define fsLabel 3 + #Define fsEdit 4 + #Define fsBackground 5 + #Define fsInvert 6 + #Define fsFocus 7 + #Define fsLijn 8 + #Define fsCheckBox 10 + #Define fsButton 11 + + ;Terminal Types + #Define ttVT520 1 + #Define ttVT420 2 + + ;Memo options + #Define moAllowTab "T" + #Define moShowParaSign "S" + #Define moAllowBold "B" + #Define moAllowUnderline "U" + #Define moAllowParameter "P" + #Define moConvertParameter "C" + + ;Special stringset + #Define ssNewLine $C(13,10) + + ;Align + #Define alLeft "L" + #Define alRight "R" + #Define alMiddle "M" + #Define alCenter "C" + #Define alFill "F" + + ;FormMode + #Define fmNone 1 + #Define fmFocused 2 + #Define fmHibernating 3 + + ;EditDataTypes + #Define edtInteger 1 + #Define edtFloat 2 + #Define edtWeek 4 + #Define edtDatum 3 + #Define edtMaand 5 + #Define edtJaar 6 + #Define edtTijd 7 + #Define edtTijdStip 8 + #Define edtString 0 + + ;List stuff + #Define lstEmptyFrame "WhenEmpty" \ No newline at end of file Index: ImageConverter/ImageConverter.inc.rou =================================================================== diff -u --- ImageConverter/ImageConverter.inc.rou (revision 0) +++ ImageConverter/ImageConverter.inc.rou (revision 1156) @@ -0,0 +1,10 @@ +#; Enum fileTypes +#define All 0 +#define Bmp 2 +#define Cmp 6 +#define Eps 3 +#define Gif 7 +#define Jpg 1 +#define Pdf 4 +#define Tif 5 + \ No newline at end of file