{"id":29703,"date":"2022-11-25T15:03:58","date_gmt":"2022-11-25T14:03:58","guid":{"rendered":"https:\/\/help.qualiware.it\/qw-help\/?p=29703"},"modified":"2022-11-25T15:04:47","modified_gmt":"2022-11-25T14:04:47","slug":"libreria-per-campionamento-custom","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/libreria-per-campionamento-custom\/","title":{"rendered":"Libreria per campionamento custom"},"content":{"rendered":"<p>Il seguente frammento di codice pu\u00f2 essere inserito in una libreria per definire i campionamenti custom da usare nei Controlli Qualit\u00e0.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"visualbasic\">Delegate Sub tCampionamento_Custom(ByVal QWSess As QWSession, ByVal dmd_ref As Object, ByVal Alias_Variabile As QWRowset, ByVal Cod_Art As String, ByVal Cod_For As String, ByRef primaforn As Boolean, ByRef schema As DBArray, ByRef nuovotipo_stat As Integer, ByRef numcamp_nonstat As Double)\r\n\r\nsub InitCampionamento()\r\n    QWSession.Campionamenti_Custom = New AssocArray\r\n            \r\n    Dim cf1 As tCampionamento_Custom\r\n    cf1 = AddressOf _CMS_Campionamento_CF1\r\n    QWSession.Campionamenti_Custom(\"Camp.CF1\") = cf1\r\n\r\n    Dim cf2 As tCampionamento_Custom\r\n    cf2 = AddressOf _CMS_Campionamento_CF2\r\n    QWSession.Campionamenti_Custom(\"Camp.CF2\") = cf2\r\n            \r\n    Dim cf3 As tCampionamento_Custom\r\n    cf3 = AddressOf _CMS_Campionamento_CF3\r\n    QWSession.Campionamenti_Custom(\"Camp.CF3\") = cf3\r\nEnd Sub\r\n\r\nsub _CMS_Campionamento_CF1(ByVal QWSess As QWSession, ByVal dmd_ref As Object, ByVal Alias_Variabile As QWRowset, ByVal Cod_Art As String, ByVal Cod_For As String, ByRef primaforn As Boolean, ByRef schema As DBArray, ByRef nuovotipo_stat As Integer, ByRef numcamp_nonstat As Double)\r\n\r\nend sub\r\n\r\nsub _CMS_Campionamento_CF2(ByVal QWSess As QWSession, ByVal dmd_ref As Object, ByVal Alias_Variabile As QWRowset, ByVal Cod_Art As String, ByVal Cod_For As String, ByRef primaforn As Boolean, ByRef schema As DBArray, ByRef nuovotipo_stat As Integer, ByRef numcamp_nonstat As Double)\r\n\r\nend sub    \r\n\r\nsub _CMS_Campionamento_CF3(ByVal QWSess As QWSession, ByVal dmd_ref As Object, ByVal Alias_Variabile As QWRowset, ByVal Cod_Art As String, ByVal Cod_For As String, ByRef primaforn As Boolean, ByRef schema As DBArray, ByRef nuovotipo_stat As Integer, ByRef numcamp_nonstat As Double)\r\n\r\nend sub\r\n<\/pre>\n<p>La libreria \u00e8 utilizzabile in un task, inizializzando il campionamento nel seguente modo:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"visualbasic\">Dim QWSess as QWSession=DB.QWSession\r\n\r\nQWSess.Global.InitCampionamento()\r\n\r\n........<\/pre>\n<p>In uno script personalizzato associato a CORPOINIZ.ASPX, \u00e8 poi possibile inizializzare la libreria per l&#8217;utilizzo dall&#8217;interfaccia, con le seguenti righe di codice:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"visualbasic\">Dim QWSess as QWSession=page.session(\"QWSess\")\r\n\r\nQWSess.Global.InitCampionamento()\r\n\r\n........<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Il seguente frammento di codice pu\u00f2 essere inserito in una libreria per definire i campionamenti custom da usare nei Controlli Qualit\u00e0. Delegate Sub tCampionamento_Custom(ByVal QWSess As QWSession, ByVal dmd_ref As Object, ByVal Alias_Variabile As QWRowset, ByVal Cod_Art As String, ByVal Cod_For As String, ByRef primaforn As Boolean, ByRef schema As DBArray, ByRef nuovotipo_stat As Integer,&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[65],"tags":[246],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/29703"}],"collection":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/comments?post=29703"}],"version-history":[{"count":2,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/29703\/revisions"}],"predecessor-version":[{"id":29705,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/29703\/revisions\/29705"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=29703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=29703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=29703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}