Subversion Repositories DevTools

Rev

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

Rev 13 Rev 15
Line 79... Line 79...
79
Sub AddBomFrom ()
79
Sub AddBomFrom ()
80
	On Error Resume Next
80
	On Error Resume Next
81
	
81
	
82
	OraDatabase.Parameters.Add "FROM_BOM_ID", 	Request("from_bom_id"), 	ORAPARM_INPUT, ORATYPE_NUMBER 
82
	OraDatabase.Parameters.Add "FROM_BOM_ID", 	Request("from_bom_id"), 	ORAPARM_INPUT, ORATYPE_NUMBER 
83
	OraDatabase.Parameters.Add "BRANCH_ID", 	Request("branch_id"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
83
	OraDatabase.Parameters.Add "BRANCH_ID", 	Request("branch_id"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
-
 
84
	OraDatabase.Parameters.Add "BOM_VERSION", 	Request("bom_version"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2		
-
 
85
	OraDatabase.Parameters.Add "BOM_LIFECYCLE", 	Request("bom_lifecycle"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2
84
	OraDatabase.Parameters.Add "BOM_COMMENTS", 	Request("bom_comments"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2
86
	OraDatabase.Parameters.Add "BOM_COMMENTS", 	Request("bom_comments"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2
85
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
87
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
86
	
88
	
87
	objEH.TryORA ( OraSession )
89
	objEH.TryORA ( OraSession )
88
	
90
 
89
	'Response.write Request("from_bom_id") &"-"& Request("branch_id") 
91
	'Response.write Request("from_bom_id") &"-"& Request("branch_id") 
90
	OraDatabase.ExecuteSQL _
92
	OraDatabase.ExecuteSQL _
91
	"BEGIN   pk_Bom.Add_Bom ( NULL, :BOM_COMMENTS, :BRANCH_ID, :FROM_BOM_ID, :USER_ID );   END;"
93
	"BEGIN   pk_Bom.Add_Bom (NULL, :BOM_VERSION, :BOM_LIFECYCLE, :BOM_COMMENTS, :BRANCH_ID, :FROM_BOM_ID, :USER_ID );   END;"
92
	
94
	
93
	objEH.CatchORA ( OraSession )
95
	objEH.CatchORA ( OraSession )
94
	
96
	
95
	
97
	
-
 
98
 
-
 
99
	OraDatabase.Parameters.Remove "BOM_VERSION"
-
 
100
	OraDatabase.Parameters.Remove "BOM_LIFECYCLE"			
96
	OraDatabase.Parameters.Remove "FROM_BOM_ID"
101
	OraDatabase.Parameters.Remove "FROM_BOM_ID"
97
	OraDatabase.Parameters.Remove "BRANCH_ID"
102
	OraDatabase.Parameters.Remove "BRANCH_ID"
98
	OraDatabase.Parameters.Remove "BOM_COMMENTS"
103
	OraDatabase.Parameters.Remove "BOM_COMMENTS"
99
	OraDatabase.Parameters.Remove "USER_ID"
104
	OraDatabase.Parameters.Remove "USER_ID"
100
End Sub
105
End Sub
Line 104... Line 109...
104
'------------ RUN BEFORE PAGE RENDER ----------
109
'------------ RUN BEFORE PAGE RENDER ----------
105
' --- Get Form details from DB ---
110
' --- Get Form details from DB ---
106
Call GetFormDetails ( parFrom_Bom_id, objFormCollector )
111
Call GetFormDetails ( parFrom_Bom_id, objFormCollector )
107
 
112
 
108
' --- Load Validation Rules ---
113
' --- Load Validation Rules ---
109
Call objForm.LoadValidationRules ( Array("bom_comments"), OraDatabase )		' Load Validation Rules
-
 
110
 
114
 
-
 
115
Call objForm.LoadValidationRules ( Array("bom_comments"), OraDatabase )		' Load Validation Rules
-
 
116
Call objForm.LoadValidationRules ( Array("bom_version"), OraDatabase )		' Load Validation Rules
-
 
117
Call objForm.LoadValidationRules ( Array("bom_lifecycle"), OraDatabase )		' Load Validation Rules
111
' --- Enter Form Validation Rule Changes here... ----
118
' --- Enter Form Validation Rule Changes here... ----
112
'----------------------------------------------------
119
'----------------------------------------------------
113
 
120
 
114
' --- RUN onPostBack ---
121
' --- RUN onPostBack ---
115
If Request("action") <> "" Then
122
If Request("action") <> "" Then
116
	If objForm.IsValidOnPostBack Then
123
	If objForm.IsValidOnPostBack Then
117
		' --- Form is Valid ---
124
		' --- Form is Valid ---
-
 
125
	Set rsQry = OraDatabase.DbCreateDynaset( "SELECT * FROM BOMS WHERE BOM_VERSION='"& Request("bom_version") &"' AND BRANCH_ID = "& Request("branch_id") &" AND BOM_LIFECYCLE='"& Request("bom_lifecycle") &"'" , ORADYN_DEFAULT )
-
 
126
	
-
 
127
	If rsQry.RecordCount = 0 Then
118
		Call AddBomFrom()
128
		Call AddBomFrom()
119
		
129
		
120
		If objEH.Finally Then
130
		If objEH.Finally Then
121
			Call OpenInWindow ( Request("rfile") &"?DONE=OK"& objPMod.ComposeURLWithout("rfile") )
131
			Call OpenInWindow ( Request("rfile") &"?DONE=OK"& objPMod.ComposeURLWithout("rfile") )
122
		End If
132
		End If
-
 
133
	Else
-
 
134
		Call Messenger ("Cannot create SBOM! The selected sbom version and lifecycle exists in this branch.", 1, "100%")
-
 
135
		rsQry.Close
-
 
136
		Set rsQry = nothing	
-
 
137
	End If
123
		
138
		
124
	End If
139
	End If
125
Else
140
Else
126
	'-- Check if can create bom from this version
141
	'-- Check if can create bom from this version
127
	Call AddBomRequirements ()
142
	Call AddBomRequirements ()
128
	
143
	
-
 
144
 
-
 
145
 
129
End If
146
End If
130
 
147
 
-
 
148
 
131
'----------------------------------------------
149
'----------------------------------------------
132
%>
150
%>
133
<html>
151
<html>
134
<head>
152
<head>
135
<title>Deployment Manager</title>
153
<title>Deployment Manager</title>
Line 137... Line 155...
137
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
155
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
138
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
156
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
139
<script language="JavaScript" src="scripts/common.js"></script>
157
<script language="JavaScript" src="scripts/common.js"></script>
140
 
158
 
141
</head>
159
</head>
142
<body background="images/bg_lite_blue.gif" leftmargin="0" topmargin="0" onLoad="FormName.bom_comments.focus();">
160
<body background="images/bg_lite_blue.gif" leftmargin="0" topmargin="0" onLoad="FormName.bom_version.focus();">
143
<!-- HEADER ++++++++++++++++ -->
161
<!-- HEADER ++++++++++++++++ -->
144
<!--#include file="_header.asp"-->
162
<!--#include file="_header.asp"-->
145
<!-- +++++++++++++++++++++++ -->
163
<!-- +++++++++++++++++++++++ -->
146
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
164
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
147
<%
165
<%
Line 178... Line 196...
178
					<table width="100%"  border="0" cellspacing="2" cellpadding="0">
196
					<table width="100%"  border="0" cellspacing="2" cellpadding="0">
179
					  <tr>
197
					  <tr>
180
				        <td nowrap class="form_iname" valign="top">BOM Name </td>
198
				        <td nowrap class="form_iname" valign="top">BOM Name </td>
181
				        <td valign="top" nowrap><%=objFormComponent.TextBox ( "bom_name", objFormCollector.Item("bom_name"), "class='form_ivalue' size='60' disabled" )%></td>
199
				        <td valign="top" nowrap><%=objFormComponent.TextBox ( "bom_name", objFormCollector.Item("bom_name"), "class='form_ivalue' size='60' disabled" )%></td>
182
				        <td valign="top"></td>
200
				        <td valign="top"></td>
183
				      </tr>
201
				      </tr>		  
-
 
202
					  <tr>
-
 
203
				        <td nowrap class="form_iname" valign="top">BOM Version </td>
-
 
204
				        <td valign="top" nowrap><%=objFormComponent.TextBox ( "bom_version", Request("bom_version") , "class='form_ivalue' size='60' " )%></td>
-
 
205
						<td valign="top"><%=objForm.Validate ("bom_version")%></td>
-
 
206
				      </tr>					  
-
 
207
					  <tr>
-
 
208
				        <td nowrap class="form_iname" valign="top">BOM Lifecycle </td>
-
 
209
				        <td valign="top" nowrap><%=objFormComponent.TextBox ( "bom_lifecycle", Request("bom_lifecycle") , "class='form_ivalue' size='60' " )%></td>
-
 
210
						<td valign="top"><%=objForm.Validate ("bom_lifecycle")%></td>
-
 
211
				      </tr>					  
184
				      <tr>
212
				      <tr>
185
				        <td valign="top" nowrap class="form_iname">Comments</td>
213
				        <td valign="top" nowrap class="form_iname">Comments</td>
186
				        <td valign="top"><%=objFormComponent.TextArea ( "bom_comments", Request("bom_comments"), 10, 60, "class='form_ivalue'" )%></td>
214
				        <td valign="top"><%=objFormComponent.TextArea ( "bom_comments", Request("bom_comments"), 10, 60, "class='form_ivalue'" )%></td>
187
						<td valign="top"><%=objForm.Validate ("bom_comments")%></td>
215
						<td valign="top"><%=objForm.Validate ("bom_comments")%></td>
188
				      </tr>
216
				      </tr>