{"id":29878,"date":"2023-02-10T10:34:51","date_gmt":"2023-02-10T09:34:51","guid":{"rendered":"https:\/\/help.qualiware.it\/qw-help\/?p=29878"},"modified":"2023-02-10T10:34:51","modified_gmt":"2023-02-10T09:34:51","slug":"creazione-variabili-di-processo-task","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/creazione-variabili-di-processo-task\/","title":{"rendered":"Creazione variabili di processo in un task"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">' Il seguente snippet pu\u00f2 essere utilizzato in un task per creare le variabili e gli attributi del piano di controllo da utilizzare nel processo di produzione relativo ad una commessa\r\n\r\ndim form = new System.Dynamic.ExpandoObject() ' Oggetto dinamico usato per \"riprodurre\" l'oggetto form\r\nform.Session=new AssocArray\r\nform.Session(\"QWSess\")= DB.QWSession ' Emulazione della sessione\r\n\r\ndim form_state = new System.Dynamic.ExpandoObject() ' Oggetto dinamico usato per \"riprodurre\" l'oggetto form_state di processi_controlli.aspx.vb\r\nform_state.dmd_ref=New processo_controlliDataModule(form.GetDataBase())  ' Questa classe \u00e8 definita in processi_controlli.aspx.vb\r\n\r\ndim ncomm as integer=&lt;numero commessa&gt;\r\ndim nsottocomm as integer=&lt;numero sotto-commessa&gt;\r\n\r\nif form_state.dmd_ref.COMMESSE.rowset.findkey(ncomm,nsottocomm)\r\n   ' Crea le variabili di processo\r\n   Crea_Variabili_Processo(form, form_state)  ' Questa procedura \u00e8 definita in commesse.vb\r\nEnd If\r\n\r\nform_state.dmd_ref.dispose()\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8216; Il seguente snippet pu\u00f2 essere utilizzato in un task per creare le variabili e gli attributi del piano di controllo da utilizzare nel processo di produzione relativo ad una commessa dim form = new System.Dynamic.ExpandoObject() &#8216; Oggetto dinamico usato per &#8220;riprodurre&#8221; l&#8217;oggetto form form.Session=new AssocArray form.Session(&#8220;QWSess&#8221;)= DB.QWSession &#8216; Emulazione della sessione dim form_state =&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":[82],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/29878"}],"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=29878"}],"version-history":[{"count":1,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/29878\/revisions"}],"predecessor-version":[{"id":29879,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/29878\/revisions\/29879"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=29878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=29878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=29878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}