| 62 |
rsolanki |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| RequestProductLocation |
|
|
|
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
Response.Expires = 0
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/globals.asp"-->
|
|
|
14 |
<!--#include file="common/config.asp"-->
|
|
|
15 |
<!--#include file="common/common_subs.asp"-->
|
|
|
16 |
<%
|
|
|
17 |
'------------ VARIABLE DEFINITION -------------
|
|
|
18 |
Dim rsQry
|
|
|
19 |
Dim IsProductInNewBom
|
|
|
20 |
Dim bgColor
|
|
|
21 |
Dim QueryName
|
|
|
22 |
Dim parBomId
|
|
|
23 |
Dim objWSH
|
|
|
24 |
Dim rsPkg, pkgName, pkgVersion, pkgId
|
|
|
25 |
Dim rsProj, projName, branchName
|
|
|
26 |
Dim rsOS, OSName
|
|
|
27 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
28 |
'------------ VARIABLE INIT -------------------
|
|
|
29 |
parBomId = Request("bom_id")
|
|
|
30 |
'------------ CONDITIONS ----------------------
|
|
|
31 |
'----------------------------------------------
|
|
|
32 |
%>
|
|
|
33 |
<%
|
|
|
34 |
'--------------------------------------------------------------------------------------------------------------
|
|
|
35 |
'--------------------------------------------------------------------------------------------------------------
|
|
|
36 |
%>
|
|
|
37 |
<%
|
|
|
38 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
39 |
'If (Request("change_type") = "R") Then
|
|
|
40 |
' QueryName = "BomRemovedProductLocation.sql"
|
|
|
41 |
' IsProductInNewBom = FALSE
|
|
|
42 |
|
|
|
43 |
'ElseIf (Request("change_type") = "U") Then
|
|
|
44 |
' QueryName = "BomUpdatedProductLocation.sql"
|
|
|
45 |
' IsProductInNewBom = FALSE
|
|
|
46 |
'Else
|
|
|
47 |
|
|
|
48 |
QueryName = "BomAddedProductLocation.sql"
|
|
|
49 |
' IsProductInNewBom = TRUE
|
|
|
50 |
|
|
|
51 |
'End If
|
|
|
52 |
'----------------------------------------------
|
|
|
53 |
%>
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
<table width="100%" border="0" cellspacing="3" cellpadding="0">
|
|
|
57 |
<%
|
|
|
58 |
OraDatabase.Parameters.Add "BOM_ID", Request("bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
59 |
OraDatabase.Parameters.Add "COMPARE_BOM_ID", Request("compare_bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
60 |
OraDatabase.Parameters.Add "PROD_ID", Request("prod_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
61 |
OraDatabase.Parameters.Add "PKG_ID", Request("pkg_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
62 |
|
|
|
63 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ( QueryName ), ORADYN_DEFAULT )
|
|
|
64 |
|
|
|
65 |
bgColor = NULL
|
|
|
66 |
|
|
|
67 |
If rsQry.RecordCount < 1 Then
|
|
|
68 |
%>
|
|
|
69 |
<tr>
|
|
|
70 |
<td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">Product not found.
|
|
|
71 |
</td>
|
|
|
72 |
</tr>
|
|
|
73 |
<%
|
|
|
74 |
End If
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
78 |
|
|
|
79 |
If IsNull( bgColor ) Then
|
|
|
80 |
bgColor = "bgcolor='#F5F5F5'"
|
|
|
81 |
Else
|
|
|
82 |
bgColor = NULL
|
|
|
83 |
End If
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
If Request("bom_id") <> "" AND Request("prod_id") <> "" Then
|
|
|
87 |
|
|
|
88 |
Set rsPkg = OraDatabase.DbCreateDynaset( "select * from package_versions pv, packages pkg where pv.pv_id = "&Request("new_prod_id")&" and pkg.pkg_id = pv.pkg_id", cint(0))
|
|
|
89 |
|
|
|
90 |
pkgName = rsPkg("pkg_name")
|
|
|
91 |
pkgVersion = rsPkg("pkg_version")
|
|
|
92 |
pkgId = rsPkg("pkg_id")
|
|
|
93 |
|
|
|
94 |
rsPkg.Close()
|
|
|
95 |
Set rsPkg = nothing
|
|
|
96 |
|
|
|
97 |
Set rsProj = OraDatabase.DbCreateDynaset( "select br.branch_name, prj.proj_name from boms bm, branches br, dm_projects prj where bm.bom_id = "&Request("bom_id")&" and br.BRANCH_ID = bm.RTAG_ID_FK and prj.PROJ_ID = br.PROJ_ID", cint(0))
|
|
|
98 |
|
|
|
99 |
projName = rsProj("proj_name")
|
|
|
100 |
branchName = rsProj("branch_name")
|
|
|
101 |
|
|
|
102 |
rsProj.Close()
|
|
|
103 |
Set rsProj = nothing
|
|
|
104 |
|
|
|
105 |
|
|
|
106 |
Set rsOS = OraDatabase.DbCreateDynaset( "select bt.bos_type from os_base_env obe, base_env be, bos_types bt where obe.OS_ID = "&rsQry("os_id")&" and be.BASE_ENV_ID = obe.BASE_ENV_ID and bt.BOS_ID = be.BOS_ID", cint(0))
|
|
|
107 |
|
|
|
108 |
OSName = rsOS("bos_type")
|
|
|
109 |
|
|
|
110 |
If OSName = "Windows" OR OSName = "MOS" Then
|
|
|
111 |
OSName = "win32"
|
|
|
112 |
Else
|
|
|
113 |
OSName = "sparc"
|
|
|
114 |
End If
|
|
|
115 |
|
|
|
116 |
rsOS.Close()
|
|
|
117 |
Set rsOS = nothing
|
|
|
118 |
|
|
|
119 |
End If
|
|
|
120 |
|
|
|
121 |
%>
|
|
|
122 |
<tr>
|
|
|
123 |
<td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">
|
|
|
124 |
<%'If IsProductInNewBom Then%>
|
|
|
125 |
<img hspace="4" src="icons/<%=rsQry("node_icon")%>" align="absmiddle" border="0"><a href="NodeDefault.asp?node_id=<%=rsQry("node_id")%>&bom_id=<%=parBomId%>" class="body_link"><%=rsQry("node_name")%></a>
|
|
|
126 |
/ <a href="OsDefault.asp?os_id=<%=rsQry("os_id")%>&bom_id=<%=parBomId%>" class="body_link"><%=rsQry("os_name") %></a>
|
|
|
127 |
/ <%=rsQry("pkg_name") &" "& rsQry("pkg_version")%>
|
|
|
128 |
<%'Else%>
|
|
|
129 |
|
|
|
130 |
<a href="javascript:;" onClick="popup = window.open('LogDownload.asp?url=http://auperaunx26/releases/<%=projName%>/<%=branchName%>/<%=pkgName%>/<%=OSName%>/<%=pkgVersion%>/<%=pkgName%>-<%=pkgVersion%>-<%=OSName%>.zip&pkg_id=<%=pkgId%>&pkg_version=<%=pkgVersion%>', 'Download Version', 'height=440,width=600,scrollbars=yes,resizable=yes'); return false" target="_blank" class="body_link">Download Version: <%=Request("new_version") %></a>
|
|
|
131 |
<%'End If%>
|
|
|
132 |
|
|
|
133 |
</td>
|
|
|
134 |
</tr>
|
|
|
135 |
<%
|
|
|
136 |
rsQry.MoveNext
|
|
|
137 |
WEnd
|
|
|
138 |
|
|
|
139 |
OraDatabase.Parameters.Remove "BOM_ID"
|
|
|
140 |
OraDatabase.Parameters.Remove "PROD_ID"
|
|
|
141 |
OraDatabase.Parameters.Remove "PKG_ID_ID"
|
|
|
142 |
|
|
|
143 |
|
|
|
144 |
rsQry.Close
|
|
|
145 |
Set rsQry = Nothing
|
|
|
146 |
%>
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
</table>
|
|
|
150 |
|
|
|
151 |
|
|
|
152 |
|
|
|
153 |
<%
|
|
|
154 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
155 |
'----------------------------------------------
|
|
|
156 |
%><!--#include file="common/globals_destructor.asp"-->
|