{"id":25441,"date":"2019-01-26T14:34:22","date_gmt":"2019-01-26T13:34:22","guid":{"rendered":"http:\/\/help.qualiware.it\/qw-help\/?p=25441"},"modified":"2019-01-26T14:35:05","modified_gmt":"2019-01-26T13:35:05","slug":"ridefinizione-della-lista-di-ricerca-che-si-attiva-con-il-tasto-lista-della-toolbar","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/ridefinizione-della-lista-di-ricerca-che-si-attiva-con-il-tasto-lista-della-toolbar\/","title":{"rendered":"Ridefinizione della lista di ricerca che si attiva con il tasto &#8220;Lista&#8221; della toolbar"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">' Il seguente frammento di codice mostra come ridefinire la lista di ricerca che si attiva con il tasto \"Lista\" della toolbar\r\n' Nella fattispecie, viene ridefinito la lista dei progeti nella scheda PROGETTI.ASPX\r\n' Va inserito nello \"Script Creazione\" di un qualsiasi oggetto della scheda, e, come si pu\u00f2 vedere, ridefinisce la query di ricerca e richiama la procedura ListaArchivio per visualizzare la lista.\r\n' Il valore di ritorno viene gestito nella procedura LISTAPROG_DialogClose di PROGETTI.ASPX che in questo caso non viene ridefinita.\r\n\r\ndim QWSess as QWSession=this.page.GetSession()\r\nDim form As PROGETTIFORM = this.page\r\nDim c as QWWebControls.QWWebPushbutton = CType(this.page, QWWebControls.QWWebPage).FindControl2(\"LISTAPROG\")\r\ndim q as QWTable\r\n\r\nremovehandler c.Click, addressof form.LISTAPROG_Click\r\n\r\nAddHandler c.Click,\r\nSub(ByVal sender As Object, ByVal arg As String)\r\n   \r\n   form.form_state.dmd_ref.PROGETTI_SEARCH.active = False\r\n\r\n\tdim sql as string \r\n\t\r\n\tsql= \"select p.CODICE,p.DENOMINAZIONE,p.CODCLI,p.RAGSOCCLI,c.DESCRIZION , \"\r\n\tsql= sql + \"case stato \"\r\n\tsql= sql + \"when 0 then 'Definizione commessa' \"\r\n\tsql= sql + \"when 1 then 'Proposta rifiutata' \" \r\n\tsql= sql + \"when 10 then 'Piano in Redazione\/Revisione - Attivit\u00e0 avviata' \"\r\n\tsql= sql + \"when 11 then 'Sospesa' \"\r\n\tsql= sql + \"when 20 then 'Commessa chiusa' \"\r\n\tsql= sql + \"end as STATO_DECOD1 \"\r\n\tsql= sql + \"from PROGETTI p \"\r\n\tsql= sql + \"left join CAUSPAR c on c.codice=p.CAUSTIPO \"\r\n\tsql= sql + \"order by p.CODICE\"\r\n\r\n   form.form_state.dmd_ref.PROGETTI_SEARCH.sql=sql\r\n   form.form_state.dmd_ref.PROGETTI_SEARCH.active = True\r\n   \r\n   ListaArchivio(this,\"Lista Progetti\",form.form_state.dmd_ref.PROGETTI_SEARCH,New DBArray( _\r\n        New DBArray(form.form_state.dmd_ref.PROGETTI_SEARCH.Rowset.Fields(\"CODICE\"), 80, \"Cod. Progetto\"), _\r\n        New DBArray(form.form_state.dmd_ref.PROGETTI_SEARCH.Rowset.Fields(\"DENOMINAZIONE\"), 250, \"Descrizione\"), _\r\n        New DBArray(form.form_state.dmd_ref.PROGETTI_SEARCH.Rowset.Fields(\"CODCLI\"), 80,\"-\"), _\r\n        New DBArray(form.form_state.dmd_ref.PROGETTI_SEARCH.Rowset.Fields(\"RAGSOCCLI\"), 250,\"Cliente\"), _\r\n\t\tNew DBArray(form.form_state.dmd_ref.PROGETTI_SEARCH.Rowset.Fields(\"STATO_DECOD1\"), 200,\"Stato Progetto\"), _\r\n        New DBArray(form.form_state.dmd_ref.PROGETTI_SEARCH.Rowset.Fields(\"DESCRIZION\"), 80, \"Tipo\") _ \r\n           ), 600,900, 20,True)   \r\n   \r\nEnd Sub   \r\n\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8216; Il seguente frammento di codice mostra come ridefinire la lista di ricerca che si attiva con il tasto &#8220;Lista&#8221; della toolbar &#8216; Nella fattispecie, viene ridefinito la lista dei progeti nella scheda PROGETTI.ASPX &#8216; Va inserito nello &#8220;Script Creazione&#8221; di un qualsiasi oggetto della scheda, e, come si pu\u00f2 vedere, ridefinisce la query di&hellip;<\/p>\n","protected":false},"author":1,"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":[78],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/25441"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/comments?post=25441"}],"version-history":[{"count":0,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/25441\/revisions"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=25441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=25441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=25441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}