Subversion Repositories DevTools

Rev

Rev 37 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37 Rev 4215
Line 74... Line 74...
74
 
74
 
75
   '/* Get Latest From Release Manager */
75
   '/* Get Latest From Release Manager */
76
   OraDatabase.Parameters.Add "BOM_ID",  parBom_id,                           ORAPARM_INPUT, ORATYPE_NUMBER
76
   OraDatabase.Parameters.Add "BOM_ID",  parBom_id,                           ORAPARM_INPUT, ORATYPE_NUMBER
77
   OraDatabase.Parameters.Add "RTAG_ID", objFormCollector.Item("rtag_id_fk"), ORAPARM_INPUT, ORATYPE_NUMBER
77
   OraDatabase.Parameters.Add "RTAG_ID", objFormCollector.Item("rtag_id_fk"), ORAPARM_INPUT, ORATYPE_NUMBER
78
 
78
 
-
 
79
 
79
   Query_String = ReadFile( rootPath & "queries\CompareBomWithLatestFromRM.sql" )
80
   Query_String = ReadFile( rootPath & "queries\CompareBomWithLatestFromRM.sql" )
80
   If objFormCollector.Item ("product_state_used") =  "Y"   Then
81
   If objFormCollector.Item ("product_state_used") =  "Y"   Then
81
      Query_String = Replace( Query_String, "/* AND rc.PRODUCT_STATE = 3 */", " AND rc.PRODUCT_STATE = 3")
82
      Query_String = Replace( Query_String, "/* AND rc.PRODUCT_STATE = 3 */", " AND rc.PRODUCT_STATE = 3")
82
   End If
83
   End If
83
 
84
 
Line 85... Line 86...
85
 
86
 
86
 
87
 
87
   '-- Get Rows
88
   '-- Get Rows
88
   If rsQry.RecordCount > 0 Then
89
   If rsQry.RecordCount > 0 Then
89
      aDiffList = rsQry.GetRows()
90
      aDiffList = rsQry.GetRows()
90
 
-
 
91
   Else
91
   Else
92
      '-- No differencses with Release Manager, hence exit
92
      '-- No differencses with Release Manager, hence exit
93
      OraDatabase.Parameters.Remove "BOM_ID"
93
      OraDatabase.Parameters.Remove "BOM_ID"
94
      OraDatabase.Parameters.Remove "RTAG_ID"
94
      OraDatabase.Parameters.Remove "RTAG_ID"
95
      Exit Sub
95
      Exit Sub
96
 
-
 
97
   End If
96
   End If
98
 
97
 
99
   ' Get the project id so we can filter out PopulateSBOMField() for SSW later.
98
   ' Get the project id so we can filter out PopulateSBOMField() for SSW later.
100
   Dim rsProjId, proj_id
99
   Dim rsProjId, proj_id
101
   Set rsProjId = OraDatabase.DbCreateDynaset("SELECT proj_id FROM branches br, boms b WHERE br.branch_id = b.branch_id AND b.bom_id = " & parBom_id, cint(0))
100
   Set rsProjId = OraDatabase.DbCreateDynaset("SELECT proj_id FROM branches br, boms b WHERE br.branch_id = b.branch_id AND b.bom_id = " & parBom_id, cint(0))
102
   proj_id = rsProjId("proj_id")
101
   proj_id = rsProjId("proj_id")
103
   rsProjId.Close()
102
   rsProjId.Close()
104
   Set rsProjId = nothing
103
   Set rsProjId = nothing
105
 
104
 
106
   '/* Update Versions */
105
   '/* Update Versions */
107
   'On Error Resume Next
-
 
108
 
106
 
109
   OraDatabase.Parameters.Add "OLD_PROD_ID", 0,                       ORAPARM_INPUT, ORATYPE_NUMBER
107
   OraDatabase.Parameters.Add "OLD_PROD_ID", 0,                       ORAPARM_INPUT, ORATYPE_NUMBER
110
   OraDatabase.Parameters.Add "NEW_PROD_ID", 0,                       ORAPARM_INPUT, ORATYPE_NUMBER
108
   OraDatabase.Parameters.Add "NEW_PROD_ID", 0,                       ORAPARM_INPUT, ORATYPE_NUMBER
111
   OraDatabase.Parameters.Add "OS_ID",       0,                       ORAPARM_INPUT, ORATYPE_NUMBER
109
   OraDatabase.Parameters.Add "OS_ID",       0,                       ORAPARM_INPUT, ORATYPE_NUMBER
112
   OraDatabase.Parameters.Add "USER_ID",     objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
110
   OraDatabase.Parameters.Add "USER_ID",     objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
113
 
111
 
114
   Set OraParameter = OraDatabase.Parameters
112
   Set OraParameter = OraDatabase.Parameters
115
 
113
 
116
 
-
 
-
 
114
   '    Try the database operations
-
 
115
   '    Must have On Error Resume Next in effect in order for the objEH.CatchORA to operate
117
 
116
   '
118
   objEH.TryORA ( OraSession )
117
   objEH.TryORA ( OraSession )
-
 
118
   On Error Resume Next
119
 
119
 
120
   numOfRows = UBound( aDiffList, 2 )
120
   numOfRows = UBound( aDiffList, 2 )
121
 
121
 
122
   For rowNum = 0 To numOfRows
122
   For rowNum = 0 To numOfRows
123
 
123
 
124
      If Request("update_"& aDiffList( os_id_column, rowNum ) &"_"& aDiffList( old_prod_id_column, rowNum ) ) <> "" Then
124
      If Request("update_"& aDiffList( os_id_column, rowNum ) &"_"& aDiffList( old_prod_id_column, rowNum ) ) <> "" Then
125
         OraParameter("OLD_PROD_ID").Value = aDiffList( old_prod_id_column, rowNum )
125
         OraParameter("OLD_PROD_ID").Value = aDiffList( old_prod_id_column, rowNum )
126
         OraParameter("NEW_PROD_ID").Value = Request("update_"& aDiffList( os_id_column, rowNum ) &"_"& aDiffList( old_prod_id_column, rowNum ) )
126
         OraParameter("NEW_PROD_ID").Value = Request("update_" & aDiffList( os_id_column, rowNum ) &"_"& aDiffList( old_prod_id_column, rowNum ) )
127
         OraParameter("OS_ID").Value = aDiffList( os_id_column, rowNum )
127
         OraParameter("OS_ID").Value = aDiffList( os_id_column, rowNum )
128
 
128
 
129
'******************************************************************************
129
'******************************************************************************
130
' This is causing problems for SSW, VTK and SEA and they don't use it, so it
130
' This is causing problems for SSW, VTK and SEA and they don't use it, so it
131
' has been disabled for those projects until a fix is found.
131
' has been disabled for those projects until a fix is found.
Line 367... Line 367...
367
%>
367
%>
368
<%
368
<%
369
'------------ RUN BEFORE PAGE RENDER ----------
369
'------------ RUN BEFORE PAGE RENDER ----------
370
Call GetFormDetails ( parBom_id, objFormCollector )
370
Call GetFormDetails ( parBom_id, objFormCollector )
371
 
371
 
-
 
372
 
-
 
373
 
372
If Request("action") <> "" Then
374
If Request("action") <> "" Then
373
   ' --- Form is Valid ---
375
   ' --- Form is Valid ---
374
   Call UpdateProducts()
376
   Call UpdateProducts()
375
 
377
 
376
   Call AddPatches()
378
   Call AddPatches()
Line 745... Line 747...
745
</body>
747
</body>
746
</html>
748
</html>
747
<%
749
<%
748
'------------ RUN AFTER PAGE RENDER -----------
750
'------------ RUN AFTER PAGE RENDER -----------
749
'----------------------------------------------
751
'----------------------------------------------
-
 
752
%>
750
%><!--#include file="common/globals_destructor.asp"-->
753
<!--#include file="common/globals_destructor.asp"-->