Rev 68 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| RequestProductLocation |'| |'=====================================================%><%Option explicitResponse.Expires = 0%><!--#include file="common/globals.asp"--><!--#include file="common/config.asp"--><!--#include file="common/common_subs.asp"--><%'------------ VARIABLE DEFINITION -------------Dim IsProductInNewBomDim QueryName' parameters refering to production BOM itemsDim parProdBomIdDim parProdBomProdId' parameters refering this BOM itemsDim parThisBomIdDim parThisProdIdDim parThisPkgIdDim parThisVersion'------------ CONSTANTS DECLARATION -----------'------------ VARIABLE INIT -------------------parProdBomId = Request("bom_id")parProdBomProdId = Request("prod_id")parThisBomId = Request("compare_bom_id")parThisProdId = Request("new_prod_id")parThisPkgId = Request("pkg_id")parThisVersion = Request("new_version")'------------ CONDITIONS ----------------------'----------------------------------------------%><%'--------------------------------------------------------------------------------------------------------------'--------------------------------------------------------------------------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------'If (Request("change_type") = "R") Then' QueryName = "BomRemovedProductLocation.sql"' IsProductInNewBom = FALSE'ElseIf (Request("change_type") = "U") Then' QueryName = "BomUpdatedProductLocation.sql"' IsProductInNewBom = FALSE'ElseQueryName = "BomAddedProductLocation.sql"' IsProductInNewBom = TRUE'End If'----------------------------------------------%><table width="100%" border="0" cellspacing="3" cellpadding="0"><tr><td background="images/bg_form_lightgray.gif" nowrap class="body_txt"><SPAN id="IMG_EXPAND_PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>" style="display:block;"><a href="javascript:;" class="menu_link" onClick="RequestProductNotes('?prod_id=<%=parProdBomProdId%>&new_prod_id=<%=parThisProdId%>', '<%=parThisBomId%>_<%=parThisProdId%>');"><img src="icons/i_plus.gif" border="0" align="absmiddle" hspace="3"><img src="icons/i_product.gif" border="0" align="absmiddle" hspace="3">Product Notes</a></SPAN><SPAN id="IMG_COLLAPSE_PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>" style="display:none;"><a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>', 'IMG_EXPAND_PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>', 'IMG_COLLAPSE_PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>');"><img src="icons/i_minus.gif" border="0" align="absmiddle" hspace="3"><img src="icons/i_product.gif" border="0" align="absmiddle" hspace="3">Product Notes</a></SPAN></td></tr><tr><td nowrap valign="top" class="body_row" colspan="3"><DIV id="PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>" name="PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>" style="display:none;"><%=enumLOADING%></DIV></td></tr><%' parThisBomId is the ID of the BOM under which exists the package version that was clicked that led to this file being processed.' It is not the production BOM, which is referred to by parProdBomId.' parThisProdId is the ID of the product in the BOM refered to by parThisBomId' parThisPkgId is the ID of the package of which the product is just one instance (version) of.OraDatabase.Parameters.Add "BOM_ID", parThisBomId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "PROD_ID", parThisProdId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "PKG_ID", parThisPkgId, ORAPARM_INPUT, ORATYPE_NUMBERDim rsQryThisBomSet rsQryThisBom = OraDatabase.DbCreateDynaset( GetQuery ( QueryName ), ORADYN_DEFAULT )Dim bgColorbgColor = NULLIf rsQryThisBom.RecordCount < 1 Then%><tr><td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">Product not found.</td></tr><%End IfWhile (NOT rsQryThisBom.BOF) AND (NOT rsQryThisBom.EOF)If IsNull( bgColor ) ThenbgColor = "bgcolor='#F5F5F5'"ElsebgColor = NULLEnd IfIf parProdBomId <> "" AND parThisProdId <> "" Then' Get information from package_versions table for this productDim rsQryThisBomPkgVer, ThisBomPkgName, ThisBomPkgVersion, ThisBomPkgIdSet rsQryThisBomPkgVer = OraDatabase.DbCreateDynaset( "select * from package_versions pv, packages pkg where pv.pv_id = "&parThisProdId&" and pkg.pkg_id = pv.pkg_id", cint(0))ThisBomPkgName = rsQryThisBomPkgVer("pkg_name")ThisBomPkgVersion = rsQryThisBomPkgVer("pkg_version")ThisBomPkgId = rsQryThisBomPkgVer("pkg_id")rsQryThisBomPkgVer.Close()Set rsQryThisBomPkgVer = nothing' Get the project and branch name for the production BOMDim rsQryProdBom, ProdBomProjName, ProdBomBranchNameSet rsQryProdBom = OraDatabase.DbCreateDynaset( "select br.branch_name, prj.proj_name from boms bm, branches br, dm_projects prj where bm.bom_id = "&parProdBomId&" and br.BRANCH_ID = bm.RTAG_ID_FK and prj.PROJ_ID = br.PROJ_ID", cint(0))ProdBomProjName = rsQryProdBom("proj_name")ProdBomBranchName = rsQryProdBom("branch_name")rsQryProdBom.Close()Set rsQryProdBom = nothing' Get the OS nameDim rsOS, OSNameSet rsOS = OraDatabase.DbCreateDynaset( "select bt.bos_type from os_base_env obe, base_env be, bos_types bt where obe.OS_ID = "&rsQryThisBom("os_id")&" and be.BASE_ENV_ID = obe.BASE_ENV_ID and bt.BOS_ID = be.BOS_ID", cint(0))OSName = rsOS("bos_type")If OSName = "Windows" OR OSName = "MOS" ThenOSName = "win32"ElseOSName = "sparc"End IfrsOS.Close()Set rsOS = nothingEnd If' Now display the information we have gathered%><tr><td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2"> <%'If IsProductInNewBom Then%><img hspace="4" src="icons/<%=rsQryThisBom("node_icon")%>" align="absmiddle" border="0"><a href="NodeDefault.asp?node_id=<%=rsQryThisBom("node_id")%>&bom_id=<%=parThisBomId%>" class="body_link"><%=rsQryThisBom("node_name")%></a> / <a href="OsDefault.asp?os_id=<%=rsQryThisBom("os_id")%>&bom_id=<%=parThisBomId%>" class="body_link"><%=rsQryThisBom("os_name") %></a> / <%=rsQryThisBom("pkg_name") &" "& rsQryThisBom("pkg_version")%><%'Else%><%If InStr(APP_ROOT, "DEPLOYMAN_WWW") > 0 Then%> <a href="LogDownload.asp?url=http://bms:8002/manager_suite/production_manager/downloads/<%=ThisBomPkgName%>-<%=ThisBomPkgVersion%>-<%=OSName%>.zip&pkg_id=<%=ThisBomPkgId%>&pkg_version=<%=ThisBomPkgVersion%>" target="_blank" class="body_link">Download Version: <%=Request("new_version") %></a> <%Else%> <a href="LogDownload.asp?url=http://bms:8002/releases/<%=ProdBomProjName%>/<%=ProdBomBranchName%>/<%=ThisBomPkgName%>/<%=OSName%>/<%=ThisBomPkgVersion%>/<%=ThisBomPkgName%>-<%=ThisBomPkgVersion%>-<%=OSName%>.zip&pkg_id=<%=ThisBomPkgId%>&pkg_version=<%=ThisBomPkgVersion%>" target="_blank" class="body_link">Download Version: <%=parThisVersion %></a> <%End If%><%'End If%></td></tr><%rsQryThisBom.MoveNextWEndOraDatabase.Parameters.Remove "BOM_ID"OraDatabase.Parameters.Remove "PROD_ID"OraDatabase.Parameters.Remove "PKG_ID"rsQryThisBom.CloseSet rsQryThisBom = Nothing%></table><%'------------ RUN AFTER PAGE RENDER -----------'----------------------------------------------%><!--#include file="common/globals_destructor.asp"-->