Subversion Repositories DevTools

Rev

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

Rev 13 Rev 4534
Line 25... Line 25...
25
Dim i
25
Dim i
26
Dim LastRow
26
Dim LastRow
27
Dim aStateCollector
27
Dim aStateCollector
28
Dim parAction
28
Dim parAction
29
Dim parState_id
29
Dim parState_id
-
 
30
Dim creatorAllocatedCount
-
 
31
 
30
'------------ CONSTANTS DECLARATION -----------
32
'------------ CONSTANTS DECLARATION -----------
31
'------------ VARIABLE INIT -------------------
33
'------------ VARIABLE INIT -------------------
32
parAction = Request("action")
34
parAction = Request("action")
33
parState_id = Request("state_id")
35
parState_id = Request("state_id")
34
'------------ CONDITIONS ----------------------
36
'------------ CONDITIONS ----------------------
Line 53... Line 55...
53
	Set rsQry = Nothing
55
	Set rsQry = Nothing
54
	OraDatabase.Parameters.Remove "PROJ_ID"
56
	OraDatabase.Parameters.Remove "PROJ_ID"
55
End Sub
57
End Sub
56
'--------------------------------------------------------------------------------------------------------------------------------
58
'--------------------------------------------------------------------------------------------------------------------------------
57
Sub RenderStateTypesCombo( nStateType ) 
59
Sub RenderStateTypesCombo( nStateType ) 
58
	Dim aStateTypes, LastState, i, Selected
60
	Dim aStateTypes, i, Selected, xx
59
	
61
	
60
	'--- Get State Types from collector
62
	'--- Get State Types from collector
61
	aStateTypes = oEnumStateTypeNames.Keys
63
	aStateTypes = oEnumStateTypeNames.Keys
62
	
-
 
63
	
64
 
64
	Response.write "<select name='state_type_enum' class='form_iname' >"
65
	Response.write "<select name='state_type_enum' class='form_iname' >"
65
	
-
 
66
	
66
 
67
	LastState = UBound( aStateTypes )
67
	For i = 0 To UBound( aStateTypes )
68
	
68
 
69
	For i = 0 To LastState
69
        ' Select the currently selected entry
-
 
70
        ' Disable the "BOM CREATORS" if it has already been selected
70
		Selected = ""
71
        Selected = ""
71
		If aStateTypes(i) = nStateType Then Selected = "selected"
72
        If aStateTypes(i) = nStateType Then 
-
 
73
            Selected = " selected"
-
 
74
        ElseIf creatorAllocatedCount > 0  AND CInt(aStateTypes(i)) = enumDB_STATE_TYPE_BOM_CREATOR Then
-
 
75
            Selected = " disabled"
-
 
76
        End If
72
		
77
        
73
		Response.write "<option value='"& aStateTypes(i) &"' "& Selected &">"& oEnumStateTypeNames.Item ( aStateTypes(i) )  &"</option>"
78
        Response.write "<option value='"& aStateTypes(i) &"'" & Selected & ">"&_
74
		
-
 
-
 
79
                            oEnumStateTypeNames.Item ( aStateTypes(i) )  &_
-
 
80
                       "</option>"
75
	Next
81
    Next
76
	
-
 
77
	
82
    
78
	Response.write "</select>"
83
    Response.write "</select>"
79
	
84
        
80
End Sub
85
End Sub
81
'--------------------------------------------------------------------------------------------------------------------------------
86
'--------------------------------------------------------------------------------------------------------------------------------
82
Sub RenderStateSeqCombo( nProj_id, nState_seq ) 
87
Sub RenderStateSeqCombo( nProj_id, nState_seq ) 
83
	Dim rsQry, Selected
88
	Dim rsQry, Selected
84
	
89
	
Line 111... Line 116...
111
End Sub
116
End Sub
112
'--------------------------------------------------------------------------------------------------------------------------------
117
'--------------------------------------------------------------------------------------------------------------------------------
113
Sub AddState ()
118
Sub AddState ()
114
	On Error Resume Next
119
	On Error Resume Next
115
	
120
	
116
	OraDatabase.Parameters.Add "STATE_NAME", 	  Request("state_name"),	ORAPARM_INPUT, ORATYPE_VARCHAR2
121
	OraDatabase.Parameters.Add "STATE_NAME", 	  Request("state_name"),	    ORAPARM_INPUT, ORATYPE_VARCHAR2
117
	OraDatabase.Parameters.Add "PROJ_ID", 		  Request("proj_id"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
122
	OraDatabase.Parameters.Add "PROJ_ID", 		  Request("proj_id"), 		    ORAPARM_INPUT, ORATYPE_NUMBER 
118
	OraDatabase.Parameters.Add "STATE_TYPE_ENUM", Request("state_type_enum"), 	ORAPARM_INPUT, ORATYPE_NUMBER 
123
	OraDatabase.Parameters.Add "STATE_TYPE_ENUM", Request("state_type_enum"), 	ORAPARM_INPUT, ORATYPE_NUMBER 
119
	
124
	
120
	
125
	
121
	objEH.TryORA ( OraSession )
126
	objEH.TryORA ( OraSession )
122
	
127
	
Line 136... Line 141...
136
	On Error Resume Next
141
	On Error Resume Next
137
	
142
	
138
	OraDatabase.Parameters.Add "STATE_ID", 			Request("state_id"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
143
	OraDatabase.Parameters.Add "STATE_ID", 			Request("state_id"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
139
	OraDatabase.Parameters.Add "STATE_NAME", 		Request("state_name"),		ORAPARM_INPUT, ORATYPE_VARCHAR2
144
	OraDatabase.Parameters.Add "STATE_NAME", 		Request("state_name"),		ORAPARM_INPUT, ORATYPE_VARCHAR2
140
	OraDatabase.Parameters.Add "STATE_SEQ", 		Request("state_seq"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
145
	OraDatabase.Parameters.Add "STATE_SEQ", 		Request("state_seq"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
141
	OraDatabase.Parameters.Add "STATE_TYPE_ENUM", 	Request("state_type_enum"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
146
	OraDatabase.Parameters.Add "STATE_TYPE_ENUM", 	Request("state_type_enum"), ORAPARM_INPUT, ORATYPE_NUMBER 
142
	
147
	
143
	
148
	
144
	
149
	
145
	objEH.TryORA ( OraSession )
150
	objEH.TryORA ( OraSession )
146
	
151
	
Line 259... Line 264...
259
        </table></td>
264
        </table></td>
260
        </tr>
265
        </tr>
261
      <tr>
266
      <tr>
262
        <td>&nbsp;</td>
267
        <td>&nbsp;</td>
263
        <td><br><br>
268
        <td><br><br>
-
 
269
        <!-- Page Warnings --------------------------------------------------------------------- -->
-
 
270
        <%
-
 
271
		  Call GetStates ( aStateCollector, parProj_id )
-
 
272
        '--- Need to ensure that we have ( and only one ) "BOM CREATORS"
-
 
273
        '    Scan all states and determine if it has been allocated
-
 
274
        creatorAllocatedCount = 0
-
 
275
        Dim xx
-
 
276
        For xx = LBound(aStateCollector,2) to UBound(aStateCollector,2)
-
 
277
            If CInt(aStateCollector(3,xx)) = enumDB_STATE_TYPE_BOM_CREATOR Then
-
 
278
                creatorAllocatedCount = creatorAllocatedCount + 1 
-
 
279
            End If
-
 
280
        Next
-
 
281
 
-
 
282
        If creatorAllocatedCount = 0 Then
-
 
283
            %><p class="msg_warning">Warning: At least one state must have a 'type' of BOM CREATOR to allow the creation of new BOMs</p><%
-
 
284
        ElseIf creatorAllocatedCount > 1 Then
-
 
285
            %><p class="msg_warning">Warning: Multiple states with 'type' of BOM CREATOR</p><%
-
 
286
        End If
-
 
287
 
-
 
288
        %>
264
		  <!-- PAGE DETAILS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
289
		  <!-- PAGE DETAILS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
265
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
290
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
266
		  <form name="FormName" method="post" action="<%=SCRIPT_NAME%>" onSubmit="ShowProgress();">
291
		  <form name="FormName" method="post" action="<%=SCRIPT_NAME%>" onSubmit="ShowProgress();">
267
		  <%
-
 
268
		  Call GetStates ( aStateCollector, parProj_id )
-
 
269
		  
-
 
270
		  
-
 
271
		  %>
-
 
272
            <tr>
292
            <tr>
273
              <td background="images/bg_bage_0a.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
293
              <td background="images/bg_bage_0a.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
274
                <tr>
294
                <tr>
275
                  <td width="1" background="images/bg_bage_0.gif"></td>
295
                  <td width="1" background="images/bg_bage_0.gif"></td>
276
                  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>Release Sequence</td>
296
                  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>Release Sequence</td>