<%@LANGUAGE="VBSCRIPT"%> <% '===================================================== '| | '| wAddProdGetVersion | '| | '===================================================== %> <% Option explicit Response.Expires = 0 %> <% '------------ ACCESS CONTROL ------------------ %> <% '------------ VARIABLE DEFINITION ------------- Dim rsQry Dim parPkg_id_list Dim objPopupMenuVersions Dim aProductNames Dim numOfRows Dim rowNum '------------ CONSTANTS DECLARATION ----------- '------------ VARIABLE INIT ------------------- parBom_id = Request("bom_id") parPkg_id_list = Request("pkg_id_list") parOs_id = Request("os_id") '------------ CONDITIONS ---------------------- 'Set objPopupMenuVersions = New PopupMenuControl '---------------------------------------------- %> <% '-------------------------------------------------------------------------------------------------------------------------- Sub GetProductNames ( sPkg_id_list, outProductNames ) Dim rsQry, query query = _ " SELECT pkg.pkg_id, pkg.pkg_name "&_ " FROM PACKAGES pkg"&_ " WHERE pkg.pkg_id IN ("& sPkg_id_list &")"&_ " ORDER BY UPPER(pkg.pkg_name)" Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT ) If rsQry.RecordCount > 0 Then outProductNames = rsQry.GetRows() End If End Sub '-------------------------------------------------------------------------------------------------------------------------- Function GetVersions ( nPkg_id ) Dim rsQry, query query = _ " SELECT pv.pv_id, pv.pkg_version "&_ " FROM PACKAGE_VERSIONS pv"&_ " WHERE pv.pkg_id = :PKG_ID"&_ " ORDER BY UPPER(pv.pkg_version)" OraDatabase.Parameters.Add "PKG_ID", nPkg_id, ORAPARM_INPUT, ORATYPE_NUMBER Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT ) If rsQry.RecordCount > 0 Then GetVersions = rsQry.GetRows() Else GetVersions = NULL End If OraDatabase.Parameters.Remove "PKG_ID" End Function '-------------------------------------------------------------------------------------------------------------------------- Sub RunRequirement () On Error Resume Next objEH.ErrorRedirect = TRUE objEH.Try If Request("pkg_id_list") = "" Then Err.Raise 8, "Please select at least one Product.", "" End If objEH.Catch End Sub '-------------------------------------------------------------------------------------------------------------------------- %> <% '------------ RUN BEFORE PAGE RENDER ---------- objPMod.PersistInQryString ( Array("base_env_id") ) Call RunRequirement() '---------------------------------------------- %> Deployment Manager <% '-- FROM START --------------------------------------------------------------------------------------------------------- objFormComponent.FormName = "FormVersion" objFormComponent.Action = "_AddProd.asp" objFormComponent.OnSubmit = "ShowProgress();" Call objFormComponent.FormStart() %> <%=objPMod.ComposeHiddenTags()%> <% Call objFormComponent.FormEnd() '-- FROM END ---------------------------------------------------------------------------------------------------------------- %>
 Add Product

<%=ProgressBar()%>   
Enter Product Version, optional Installation Comments and click Add. <% Call GetProductNames ( parPkg_id_list, aProductNames ) numOfRows = UBound( aProductNames, 2 ) For rowNum = 0 To numOfRows %> <% Next %>
Product Name <%=aProductNames( 1, rowNum )%>
Version <%=objFormComponent.ComboWithText ( "pkgid"& aProductNames( 0, rowNum ), NULL, GetVersions( aProductNames( 0, rowNum ) ), "class='form_ivalue'" )%>
Installation Comments <%=objFormComponent.TextArea ( "comments"& aProductNames( 0, rowNum ), NULL, 5, 60, "class='form_ivalue'" )%>


<% '------------ RUN AFTER PAGE RENDER ----------- 'Set objFormCollector = Nothing Set objFormComponent = Nothing '---------------------------------------------- %>