serial KeyCodesCNTs,PRGACNTs,UILibCtrlCNTs Default %Library.TMFormClass 0 %TMButton %TMButton %TMButton %TMComboBox %TMComboBox %TMComboBox %TMCheckBox %TMLabel %TMPanel %TMEdit %TMEdit %TMEdit %TMEdit %TMEdit %TMLabel %TMLabel %TMLabel %TMLabel %TMLabel %TMLabel %TMLabel %TMLabel Prod:Prod.GAData.Product,blnShowPrijs:%Boolean cache 0 document literal KadID:%String cache 0 document literal Product AS PRID INTO :ProdID FROM Prod_GAData.Item_Parameters WHERE (Item->Product >88000) AND (STRING(Item->Label, ISNULL(Parameters,'')) = :MatchString) ORDER BY Item->Product DESC) Quit $G(ProdID) /* SELECT TOP 1 Item->Product AS PRID INTO :ProdID FROM Prod_GAData.Item_Parameters WHERE (Item->Product BETWEEN 241 AND 250) and (STRING(Item->Label, ISNULL(Parameters,'')) = 'KADOBJ11093') ORDER BY Item->Product DESC */ ]]> Prod:Prod.GAData.Product cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal 0)&&($LF(Shift,$$$ssAlt)>0) Set:(..txtProdID.Text="") ..txtProdID.Text=..BLProductFromKadID(..txtKadID.Text) Do MApplication.ProcessMessages() Quit:(..txtProdID.Text="") d WLIP^vhDBG(97,"TreeViewViaProdID") ; Open GAData.Product Set MApplication.ScreenCursor=$$$crHourGlass Set %NoSa=$S(..chkCalcSchaduwPrijs.Checked="True":"S", 1:"") Set Prod=$$tvpOpenGADataProd(..txtProdID.Text) ; ##class(Prod.GAData.Product).OpenWithCalc(..txtProdID.Text) Do Prod.CalcAll() ; Om de arKDtls te kunnen bekijken. Kill %NoSa If 'Prod.ValidatePR(.arValidPR) Do ;Quit 0 . Do tvpInvalidPR . ;Set Prod="" . ;Set MApplication.ScreenCursor=$$$crDefault Set MApplication.ScreenCursor=$$$crDefault ; Else Do ..AppShowInTreeView(Prod,blnShowPrijs) Do ..BLUpdateFixed(Prod) Set Prod="" ;End of user code s Args=$lb(Sender) q ;============================================================================= tvpOpenGADataProd(ProdID) New PR,Result Set Result=##class(Prod.GAData.Product).SyncWithTempl(ProdID) Set PR=##class(Prod.GAData.Product).%OpenId(ProdID) Quit:('$IsObject(PR)) "" ; Else Do PR.TemplateTmpInit() Do PR.AutosFromTemplate() ;(Template,"FILL") ;Do PR.CalcAll() Quit PR tvpInvalidPR New msg Set msg=Prod.ValidPRArrayToText(.arValidPR) Do MApplication.MessageBox(msg,"Producten valideren",$$$MBICONEXCLAMATION) d ..TTrace(msg) Quit ]]> Args:%String cache 0 document literal Args:%String cache 0 document literal 30 %Library.TMForm %Library.String 1 1 Prod.GAData.Product %Library.Integer %Library.String %Library.String 0 %Library.String %Library.String %TMButton %TMButton %TMButton %TMButton %TMButton %TMButton %TMComboBox %Library.Integer %Library.Integer %TMLabel %TMPanel %TMEdit %TMEdit %TMLabel %TMLabel initvalue:%String cache 0 %Status document literal cache 0 document literal lbData format : $LB(RunMode, TemplateID, StartProductID, NewProductID, PRNr, Qty, KLNr)
lbData als .local doorgeven! ]]>
cache 0 document literal
cache 0 document literal lbData format : $LB(RunMode, TemplateID, StartProductID, NewProductID, PRNr, Qty, KLNr)

RunModes:
  • $LB($$$rmViewTemplate, TemplateID,,,,Qty)
  • $LB($$$rmEditTemplate, TemplateID,,,,Qty)
  • $LB($$$rmNewFromTemplate, TemplateID,,,,Qty)
  • $LB($$$rmNewFromProduct, , StartProductID,,,Qty)
  • $LB($$$rmViewProduct, , StartProductID,,,Qty)
  • $LB($$$rmEditProduct, , StartProductID,,,Qty) ]]> lbData:%List cache 0 %Library.Boolean document literal cache 0 document literal Uitwisselen van gegevens via "lbData" (als .local doorgeven!); lbData format : $LB(RunMode, TemplateID, StartProductID, NewProductID, PRNr, Qty, KLNr)
    Geeft de waarde van de ModalResult property terug

    RunModes:
  • $LB($$$rmViewTemplate, TemplateID,,,,Qty) ==> Returned lbData: [onveranderd]
  • $LB($$$rmEditTemplate, TemplateID,,,,Qty) ==> Returned lbData: [onveranderd]
  • $LB($$$rmNewFromTemplate, TemplateID,,,,Qty) ==> Returned lbData: $LB($$$rmNewFromTemplate, TemplateID, , NewProductID, PRNr, Qty)
  • $LB($$$rmNewFromProduct, , StartProductID,,,Qty) ==> Returned lbData: $LB($$$rmNewFromProduct, , StartProductID, NewProductID, PRNr, Qty)
  • $LB($$$rmViewProduct, , StartProductID,,,Qty) ==> Returned lbData: [onveranderd]
  • $LB($$$rmEditProduct, , StartProductID,,,Qty) ==> Returned lbData: [onveranderd] ]]> cache 0 %Library.Integer document literal cache 0 document literal cache 0 %Library.Boolean document literal -1:..cboToepassing.SelectedGetKey(), 1:%v) #define GetPT(%v) $S(..cboProfType.ItemIndex>-1:..cboProfType.SelectedGetKey(), 1:%v) #define GetVUL(%v) $S(..cboVulling.ItemIndex>-1:..cboVulling.SelectedGetKey(), 1:%v) New Toep,Vul,Mont,Verpak,KadObj,DItemKad Set Toep=$$$GetTOEP("KD") Set Vul=$$$GetVUL("FG") Do tnbMonteerVerpak(.Mont,.Verpak) Do:('$D(..Product.LookUp("PLItem"))) ..Product.BuildLookUp($LB("ICode")) ; "PLItem" is onderdeel van BuildLU("ICode") Set KadObj=##class(Prod.GADef.KaderDeur).%OpenId(11093) If $IsObject(KadObj) Do . Do tnbSetViaObj(KadObj) Else Do . Do tnbSetFromCtrls Do tnbSetViaProgLabel("QTY",1) Set sc=$$tnbSetDItemKadObj(KadObj) Do ..Product.BuildLookUp($LB("PL")) Quit tnbSetViaObj(KadObj) Do tnbSetViaProgLabel("TOEP",KadObj.Toepassing.ItemID) Do tnbSetViaProgLabel("PH",KadObj.Hoogte) Do tnbSetViaProgLabel("PB",KadObj.Breedte) Do tnbSetViaProgLabel("PT",KadObj.ProfType.ItemID) Do tnbSetViaProgLabel("PA",KadObj.ProfAfw.ItemID ) If $IsObject(KadObj.Vulling.Vulling) Do . Do tnbSetViaProgLabel("VULCODE",KadObj.Vulling.Vulling.ItemID) . Do tnbSetViaProgLabel("LVE",$LB("HARD","FOL","RP","ZAND") ) ; $$ObjectListToLB^vhLib(KadObj.Vulling.VullingExtra)) . Do tnbSetViaProgLabel("VULOPP",KadObj.VulOpp()) . Do tnbSetViaProgLabel("VULOMTREK",KadObj.VulOmtrek()) Do tnbSetViaProgLabel("OPH",KadObj.OphangPlaats.ItemID) Do tnbSetViaProgLabel("LBSL","") Do tnbSetViaProgLabel("LBSL2","") Do tnbSetViaProgLabel("LBOR","") Do tnbSetViaProgLabel("MON",KadObj.Gemonteerd) Do tnbSetViaProgLabel("VPK",KadObj.Verpakking) Do tnbSetViaProgLabel("DOSNR",KadObj.Dossier) Do tnbSetViaProgLabel("PROFKS",KadObj.ProfAfwKostSpecial) Do tnbSetViaProgLabel("VULKS",KadObj.VullingKostSpecial) Do tnbSetViaProgLabel("CONSKS",KadObj.ConstructKostSpecial) Do tnbSetViaProgLabel("GEWICHT",KadObj.Gewicht()) Do tnbSetViaProgLabel("PWIJZE",$S(1:KadObj.ProductieWijzeGetObjectId(), ..cboLosProfDeel.ItemIndex>-1:"LPR", 1:"")) ;Do tnbSetViaProgLabel("ODEEL",$LB(..cboLosProfDeel.SelectedGetKey())) Quit tnbSetFromCtrls Do tnbSetViaProgLabel("TOEP",Toep) Do tnbSetViaProgLabel("PH",950) Do tnbSetViaProgLabel("PB",550) Do tnbSetViaProgLabel("PT",$$$GetPT("PBG")) Do tnbSetViaProgLabel("PA","EV") Do tnbSetViaProgLabel("VUL",Vul) Do tnbSetViaProgLabel("LVE","") Do tnbSetViaProgLabel("OPH","L") Do tnbSetViaProgLabel("LBSL","") Do tnbSetViaProgLabel("LBSL2","") Do tnbSetViaProgLabel("LBOR","") Do tnbSetViaProgLabel("MON",Mont) Do tnbSetViaProgLabel("VPK",Verpak) Do tnbSetViaProgLabel("PWIJZE",$S(..cboLosProfDeel.ItemIndex>-1:"LPR", 1:"")) Do tnbSetViaProgLabel("ODEEL",$LB(..cboLosProfDeel.SelectedGetKey())) ;Do tnbSetViaProgLabel("PUITZ","") ;Do tnbSetViaProgLabel("OPM","") Quit tnbSetViaProgLabel(ProgLabel,Val) Do ..Product.SetItemValByPL(ProgLabel,Val) Quit tnbSetDItemKadObj(KadObj) #define NodePLItem "PLItem" New Item,ProgLabel Set ProgLabel="KADOBJ" Set Item=$G(..Product.LookUp($$$NodePLItem,ProgLabel,"IOref")) Quit:('$IsObject(Item)) $$$ERROR($$$GeneralError,"No Item Object") Set Item.FixedKeys=$LB("Object") ; Temporary set key fixed, else it will be cleared before Re-CalcAll() Quit Item.SetObject(KadObj) Quit $$$OK tnbMonteerVerpak(Mont,Verpak) Set Mont=..txtMonteren.Text Set Verpak=..txtVerpakking.Text ; "Alleen Glas" is steeds ongemonteerd en Krimp ; Met vulling is steeds gemonteerd en Krimp ; Kader zonder vulling: ongemonteerd en los verpakt Set:(Mont = "") Mont=$S(Toep="GL":"L", $L(Vul):"KV", 1:"L") Set:(Verpak?1(1"",1"K",1"L")) Verpak=$CASE(Mont, "L":$S(Toep="GL":"K", 1:"L"), "K":"K", "KV":"K", :"") Quit ; -------------------------------------------------------- tnbInvalidPR New msg Set msg=..Product.ValidPRArrayToText(.arValidPR) Do MApplication.MessageBox(msg,"Producten valideren",$$$MBICONEXCLAMATION) d ..TTrace(msg) Quit ]]> cache 0 %Library.Boolean document literal cache 0 document literal cache 0 %Library.Integer document literal 0) Quit:('bln) Set bln=(..txtBreedte.Text>0) Quit:('bln) Set bln=(..txtAantal.Text>0) Quit:('bln) Quit ]]> cache 0 document literal Args:%String cache 0 document literal 0) COS.%Close() ;If $L(..WBrCheckDigits) Kill:(..WBrCheckDigits=$P($G(^Hulp(..WBrKey,"I")),"\",1)) ^Hulp(..WBrKey) ;Else Kill ^Hulp(..WBrKey) If ..frmView Do . Do ..frmView.tvProduct.CloseProgram() . Do ..frmView.Form.Close() . Set ..frmView.Form="" . Do ..frmView.%Close() . Set ..frmView="" ;If ..frmWBrowser Do ;. Do ..frmWBrowser.Form.Close() ;. Do ..frmWBrowser.%Close() ;Do ..blTBox.%Close() Do ..TTrace("Close Form"_$C(13,10)) ;End of user code s Args=$lb(Sender,Action) q ]]> cache 0 document literal initvalue:%String cache 0 MApplication document literal cache 0 document literal cache 0 document literal initvalue:%String cache 0 %Library.Status document literal 0) COS.Form.Show() q $$$OK ; ##class(UI.Lib.Ctrl.TComboBox). ; ##class(UI.Lib.Ctrl.TTreeViewEx2) ]]> Zie method AppShowWithParams() cache 0 %Library.Integer document literal Msg:%String cache 0 document literal Validatie van de groep + toegang wijzigen. CtrlOref moet verwijzen naar een groep (GroupBox) of naar een bepalende control in een GroupBox. cache 0 document literal parameter: Enabled: "True"/"False" ]]> Enabled:%Boolean cache 0 document literal cache 0 %Library.Boolean document literal Args:%String cache 0 document literal 0) ]]> Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal 0)&&($LF(Shift,$$$ssAlt)>0) Set %NoSa=$S(..chkCalcSchaduwPrijs.Checked="True":"S", 1:"") Quit:('..BLConsistencyCheck()) Do:(%NoSa'="") MApplication.MessageBox($$$msg,MApplication.Title, $$$MBICONWARNING) Set IsValid=..BLCompleteProduct() Kill %NoSa ; Globale variabele onmiddellijk verwijderen na calculatie product Do ..AppShowInTreeView(..Product,blnShowPrijs) ;new TotKost ;Set TotKost=..Product.Cumuls("KPrijs") ;d ..TTrace("Totale prijs van de Kaderdeur: "_$J(TotKost,0,2)_" EUR") ;End of user code s Args=$lb(Sender,Button,Shift,X,Y) q ]]> Args:%String cache 0 document literal "http://192.168.1.67/csp/admin1/PRGAProduct.csp?KEY="_Key_"&CHK="_CheckDigits Do ..frmWBrowser.ocBrowser.Navigate(URL) Do ..frmWBrowser.Form.Show() Quit ]]> Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal %Library.CacheSerialState "%Library.TMFormClass" Address Form Product Qty RunMode StandAlone WBrCheckDigits WBrKey btnAanmaken btnAllesWissen btnCancel btnOpties btnToonBox btnXMLView cboDesign frmView frmWBrowser lblAantalTxt pnlButtons txtAantal zzLabel1 txtLengteGreep zzLabel10 Label1 Label2 cboProfType cboToepassing txtBreedte txtHoogte Label3 cboVulling Label4 Label5 txtMonteren txtVerpakking Label6 cboLosProfDeel chkCalcSchaduwPrijs zzLabel11 zzLabel2 zzLabel3 zzLabel4 zzLabel5 zzLabel6 btnTreeViewViaProdID txtKadID txtProdID zzLabel7 zzLabel8 btnWisGADataID btnRecalcKadPrijs lblPrijsCompare pnlCompareCalc