'Trovo il fornitore e collezzione
dim sql as String="Select * from RICCI.RCC_ARTIC_ALTRI_DATI "
sql = Sql & " WHERE TIPO_ARTICOLO=" & e.cDoPage("RIGHEORD")("T").QueryStringValue
sql = Sql & " AND COD_ARTICOLO=" & e.cDoPage("RIGHEORD")("CODICE").QueryStringValue
Dim Dt as DataTable=e.cDoConnect.ExecuteQuery(sql)
Dim Mastr_Fornit as string=""
Dim Partit_Fornit as string=""
Dim Cod_Collez as string=""
If Not Dt is Nothing andalso Dt.Rows.Count=1 Then
Mastr_Fornit = Dt.Rows(0)("MASTRO_FORNIT").Tostring
Partit_Fornit = Dt.Rows(0)("PARTIT_FORNIT").Tostring
Cod_Collez = Dt.Rows(0)("COD_COLLEZ").Tostring
end if
'apro la finestra di ricerca e imposto i parametri che conosco
Dim SearchPage as CdoPage = e.cDoPage.LoadcDoPage("RICERCA_ARTICOLI")
SearchPage("##MASTERFILTER##")("PARTIT_FORNIT").Value = Partit_Fornit
SearchPage("##MASTERFILTER##")("COLLEZIONE").Value = Cod_Collez
Dim UseBasket as Boolean=False
dim RetDt as Object=e.cDoConnect.ShowSearchPage(SearchPage,UseBasket)
if Not RetDt is Nothing Then
'l'utente ha selezionato un articolo... continuo
Dim DestinationcDoPage as CdoPage = e.cDoPage.LoadcDoPage("ASS122")
DestinationcDoPage.CdoStartValues("INSERT_FLAG").Value ="M"
DestinationcDoPage.ShowDialog
end if