| 5357 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| wAddBuildStandard |
|
|
|
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
Response.Expires = 0
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/conf.asp"-->
|
|
|
14 |
<!--#include file="common/globals.asp"-->
|
|
|
15 |
<!--#include file="common/formating.asp"-->
|
|
|
16 |
<!--#include file="common/qstr.asp"-->
|
|
|
17 |
<!--#include file="common/common_subs.asp"-->
|
|
|
18 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
19 |
<%
|
|
|
20 |
'------------ ACCESS CONTROL ------------------
|
|
|
21 |
%>
|
|
|
22 |
<!--#include file="_access_control_general.asp"-->
|
|
|
23 |
<!--#include file="_access_control_login.asp"-->
|
|
|
24 |
<%
|
|
|
25 |
'------------ VARIABLE DEFINITION -------------
|
|
|
26 |
Dim rsQry
|
|
|
27 |
Dim sMessage
|
|
|
28 |
Dim GBE_BS
|
|
|
29 |
Dim GBE_BSA_NAME
|
|
|
30 |
Dim Query_String
|
|
|
31 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
32 |
'------------ VARIABLE INIT -------------------
|
| 5590 |
dpurdie |
33 |
sMessage = NULL
|
| 5357 |
dpurdie |
34 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
|
|
35 |
'------------ CONDITIONS ----------------------
|
|
|
36 |
'----------------------------------------------
|
|
|
37 |
%>
|
|
|
38 |
<%
|
|
|
39 |
' Populate a form selection with Build Standards
|
|
|
40 |
' sbm_id - Select this bm_id
|
|
|
41 |
sub getBuildStandardOptions( sbs_id )
|
|
|
42 |
Dim rsQry
|
|
|
43 |
Dim bs_id, bs_name, selected
|
|
|
44 |
|
|
|
45 |
Response.write("<option value="""">- Select One -</option>")
|
|
|
46 |
Set rsQry = OraDatabase.DbCreateDynaset( "SELECT * FROM BUILD_STANDARDS ORDER BY BS_NAME", ORADYN_DEFAULT )
|
|
|
47 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
48 |
bs_id = rsQry("BS_ID")
|
|
|
49 |
bs_name = rsQry("BS_NAME")
|
|
|
50 |
If bs_id = sbs_id Then
|
|
|
51 |
selected = " selected"
|
|
|
52 |
Else
|
|
|
53 |
selected = ""
|
|
|
54 |
End If
|
|
|
55 |
%>
|
|
|
56 |
<option value="<%=bs_id%>"<%=selected%>><%=bs_name%></option>
|
|
|
57 |
<%
|
|
|
58 |
rsQry.MoveNext()
|
|
|
59 |
Wend
|
|
|
60 |
rsQry.Close()
|
|
|
61 |
end sub
|
|
|
62 |
%>
|
|
|
63 |
<%
|
|
|
64 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
If CBool(Request("action")) Then
|
|
|
68 |
|
|
|
69 |
' Update an existing entry
|
|
|
70 |
If Request("bsa_id") <> "" Then
|
|
|
71 |
|
|
|
72 |
Query_String = _
|
|
|
73 |
" SELECT * FROM BUILD_STANDARDS_ADDENDUM WHERE BSA_ID <> " & Request("bsa_id") & " AND UPPER(BSA_NAME) = UPPER('"& Request("GBE_BSA_NAME") &"')"
|
|
|
74 |
|
|
|
75 |
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
76 |
|
|
|
77 |
If rsQry.RecordCount = 0 Then
|
|
|
78 |
|
|
|
79 |
OraDatabase.Parameters.Add "BSA_ID", Request("bsa_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
80 |
OraDatabase.Parameters.Add "BSA_NAME", Request("GBE_BSA_NAME"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
81 |
OraDatabase.Parameters.Add "BS_ID", Request("GBE_BS"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
82 |
|
| 5590 |
dpurdie |
83 |
objEH.ErrorRedirect = FALSE
|
| 5357 |
dpurdie |
84 |
objEH.TryORA ( OraSession )
|
|
|
85 |
On Error Resume Next
|
|
|
86 |
|
|
|
87 |
OraDatabase.ExecuteSQL _
|
|
|
88 |
"BEGIN UPDATE BUILD_STANDARDS_ADDENDUM SET BSA_NAME = :BSA_NAME, BS_ID = :BS_ID WHERE BSA_ID = :BSA_ID; END;"
|
|
|
89 |
|
|
|
90 |
objEH.CatchORA ( OraSession )
|
|
|
91 |
|
| 5952 |
dpurdie |
92 |
OraDatabase.Parameters.Remove "BSA_ID"
|
|
|
93 |
OraDatabase.Parameters.Remove "BSA_NAME"
|
| 5357 |
dpurdie |
94 |
OraDatabase.Parameters.Remove "BS_ID"
|
|
|
95 |
|
|
|
96 |
If objEH.Finally Then
|
|
|
97 |
Call OpenInParentWindow ("admin_gbe_buildstandard.asp")
|
|
|
98 |
Call CloseWindow()
|
|
|
99 |
End If
|
|
|
100 |
|
|
|
101 |
Else
|
|
|
102 |
sMessage = "A Build Standard Addendum of that name already exists"
|
|
|
103 |
End If
|
|
|
104 |
|
|
|
105 |
rsQry.Close
|
|
|
106 |
Set rsQry = nothing
|
|
|
107 |
|
|
|
108 |
Else
|
|
|
109 |
|
|
|
110 |
' Create a new entry
|
|
|
111 |
'
|
|
|
112 |
Query_String = _
|
|
|
113 |
" SELECT * FROM BUILD_STANDARDS_ADDENDUM WHERE UPPER(BSA_NAME) = UPPER('"& Request("GBE_BSA_NAME") &"')"
|
|
|
114 |
|
|
|
115 |
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
116 |
|
|
|
117 |
If rsQry.RecordCount = 0 Then
|
|
|
118 |
|
|
|
119 |
OraDatabase.Parameters.Add "BSA_NAME", Request("GBE_BSA_NAME"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
120 |
OraDatabase.Parameters.Add "BS_ID", Request("GBE_BS"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
121 |
|
| 5590 |
dpurdie |
122 |
objEH.ErrorRedirect = FALSE
|
| 5357 |
dpurdie |
123 |
objEH.TryORA ( OraSession )
|
|
|
124 |
On Error Resume Next
|
|
|
125 |
|
|
|
126 |
OraDatabase.ExecuteSQL _
|
|
|
127 |
"BEGIN INSERT INTO BUILD_STANDARDS_ADDENDUM (BSA_NAME, BS_ID) VALUES( :BSA_NAME, :BS_ID); END;"
|
|
|
128 |
|
|
|
129 |
objEH.CatchORA ( OraSession )
|
|
|
130 |
|
|
|
131 |
OraDatabase.Parameters.Remove "BSA_NAME"
|
| 5952 |
dpurdie |
132 |
OraDatabase.Parameters.Remove "BS_ID"
|
| 5357 |
dpurdie |
133 |
|
|
|
134 |
If objEH.Finally Then
|
|
|
135 |
Call OpenInParentWindow ("admin_gbe_buildstandard.asp")
|
|
|
136 |
Call CloseWindow()
|
|
|
137 |
End If
|
|
|
138 |
|
|
|
139 |
Else
|
|
|
140 |
sMessage = "A Build Standard Addendum of that name already exists"
|
|
|
141 |
End If
|
|
|
142 |
|
|
|
143 |
rsQry.Close
|
|
|
144 |
Set rsQry = nothing
|
|
|
145 |
|
|
|
146 |
End If
|
|
|
147 |
|
|
|
148 |
End If
|
|
|
149 |
|
|
|
150 |
|
|
|
151 |
'----------------------------------------------
|
|
|
152 |
%>
|
|
|
153 |
<html>
|
|
|
154 |
<head>
|
|
|
155 |
<title>Release Manager</title>
|
|
|
156 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
157 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
158 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6579 |
dpurdie |
159 |
<link href="images/release_manager_style.css?ver=<%=VixVerNum%>" rel="stylesheet" type="text/css">
|
|
|
160 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
161 |
</head>
|
|
|
162 |
|
| 5590 |
dpurdie |
163 |
<body leftmargin="0" topmargin="0" onLoad="self.focus();FormName.GBE_BSA_NAME.focus();">
|
| 5357 |
dpurdie |
164 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
|
|
165 |
<tr>
|
| 5590 |
dpurdie |
166 |
<td class="body_txt">
|
| 5357 |
dpurdie |
167 |
Add a new Build Standard or edit an existing Build Standard.
|
|
|
168 |
</td>
|
|
|
169 |
</tr>
|
|
|
170 |
<%
|
|
|
171 |
'-- FROM START --------------------------------------------------------------------------------------------------------------
|
|
|
172 |
objFormComponent.FormName = "FormName"
|
| 5590 |
dpurdie |
173 |
objFormComponent.FormClass = "form_tight"
|
| 5357 |
dpurdie |
174 |
objFormComponent.Action = ScriptName
|
|
|
175 |
objFormComponent.OnSubmit = "MM_validateForm(""GBE_BSA_NAME"",""Build Standard Addendum"",""RLength4:"",""GBE_BS"",""Build Standard"",""R"");return document.MM_returnValue"
|
|
|
176 |
Call objFormComponent.FormStart()
|
|
|
177 |
|
|
|
178 |
%>
|
|
|
179 |
<tr>
|
| 5590 |
dpurdie |
180 |
<td class="form_field_bg" >
|
|
|
181 |
<!-- LOCAL MESSAGES ++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
182 |
<%Call Messenger ( sMessage , 3, "100%" )%>
|
| 5357 |
dpurdie |
183 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
184 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
185 |
|
|
|
186 |
<table width="50%" border="0">
|
|
|
187 |
<%
|
|
|
188 |
GBE_BS = Request("GBE_BS")
|
|
|
189 |
GBE_BSA_NAME = Request("GBE_BSA_NAME")
|
|
|
190 |
|
|
|
191 |
If Request("bsa_id") <> "" Then
|
|
|
192 |
%>
|
|
|
193 |
<input type="hidden" name="bsa_id" value="<%=Request("bsa_id")%>">
|
|
|
194 |
<%
|
|
|
195 |
|
|
|
196 |
Dim rsTemp
|
|
|
197 |
|
|
|
198 |
Query_String = "SELECT * FROM BUILD_STANDARDS BS, BUILD_STANDARDS_ADDENDUM BSA WHERE BSA.BS_ID=BS.BS_ID(+) AND BSA_ID = " & Request("bsa_id")
|
|
|
199 |
|
|
|
200 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
201 |
|
|
|
202 |
GBE_BS = rsTemp("BS_ID")
|
|
|
203 |
GBE_BSA_NAME = rsTemp("BSA_NAME")
|
|
|
204 |
|
|
|
205 |
rsTemp.Close()
|
|
|
206 |
Set rsTemp = Nothing
|
|
|
207 |
End If
|
|
|
208 |
%>
|
|
|
209 |
<tr>
|
| 5590 |
dpurdie |
210 |
<td><span class="body_txt nowrap">Build Standard</span></td>
|
| 5357 |
dpurdie |
211 |
<td>
|
|
|
212 |
<select id="FRbs" name="GBE_BS" class="form_item">
|
|
|
213 |
<%getBuildStandardOptions(GBE_BS)%>
|
|
|
214 |
</select>
|
|
|
215 |
</td>
|
|
|
216 |
</tr>
|
|
|
217 |
|
|
|
218 |
<tr>
|
|
|
219 |
<td><span class="body_txt">Addendum</span></td>
|
|
|
220 |
<td><input name="GBE_BSA_NAME" type="text" class="body_txt" value="<%=GBE_BSA_NAME%>"></td>
|
|
|
221 |
</tr>
|
|
|
222 |
</tr>
|
|
|
223 |
</table>
|
|
|
224 |
</td>
|
|
|
225 |
</tr>
|
| 5590 |
dpurdie |
226 |
<tr>
|
|
|
227 |
<td>
|
|
|
228 |
<table class="full_table">
|
|
|
229 |
<tr>
|
|
|
230 |
<td><%=ProgressBar()%></td>
|
|
|
231 |
<td align="right">
|
|
|
232 |
<input name="btn" type="submit" class="form_btn" value="Add/Update">
|
|
|
233 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onclick="parent.closeIFrame();">
|
|
|
234 |
</td>
|
|
|
235 |
</tr>
|
|
|
236 |
</table>
|
|
|
237 |
</td>
|
|
|
238 |
</tr>
|
| 5357 |
dpurdie |
239 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
240 |
<input type="hidden" name="action" value="true">
|
|
|
241 |
|
|
|
242 |
<%
|
|
|
243 |
Call objFormComponent.FormEnd()
|
|
|
244 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
245 |
%>
|
|
|
246 |
</table>
|
|
|
247 |
</body>
|
|
|
248 |
</html>
|
|
|
249 |
<%
|
|
|
250 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
251 |
Set objFormCollector = Nothing
|
|
|
252 |
'----------------------------------------------
|
|
|
253 |
Call Destroy_All_Objects
|
|
|
254 |
%>
|
|
|
255 |
|
|
|
256 |
|