| 5357 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| wAddMachClass |
|
|
|
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_MACHCLASS
|
|
|
29 |
Dim Query_String
|
|
|
30 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
31 |
'------------ VARIABLE INIT -------------------
|
|
|
32 |
sMessage = NULL
|
|
|
33 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
|
|
34 |
'------------ CONDITIONS ----------------------
|
|
|
35 |
'----------------------------------------------
|
|
|
36 |
%>
|
|
|
37 |
<%
|
|
|
38 |
|
|
|
39 |
%>
|
|
|
40 |
<%
|
|
|
41 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
42 |
|
|
|
43 |
If Request("type") = "delete" Then
|
|
|
44 |
On Error Resume Next
|
|
|
45 |
OraDatabase.Parameters.Add "BM_ID", Request("BM_ID"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
46 |
objEH.TryORA ( OraSession )
|
|
|
47 |
OraDatabase.ExecuteSQL _
|
|
|
48 |
"BEGIN PK_BUILDAPI.REMOVE_BUILDMACHINE ( :BM_ID ); END;"
|
|
|
49 |
objEH.CatchORA ( OraSession )
|
|
|
50 |
OraDatabase.Parameters.Remove "BM_ID"
|
|
|
51 |
|
|
|
52 |
Call OpenInWindow ("admin_gbe_machclass.asp")
|
|
|
53 |
|
|
|
54 |
ElseIf CBool(Request("action")) Then
|
| 5590 |
dpurdie |
55 |
' Update an existing entry
|
| 5357 |
dpurdie |
56 |
If Request("bm_id") <> "" Then
|
|
|
57 |
Query_String = _
|
| 5590 |
dpurdie |
58 |
" SELECT * FROM BUILD_MACHINES WHERE BM_ID <> " & Request("bm_id") & " AND UPPER(BM_NAME) = UPPER('"& Request("BM_NAME") &"')"
|
| 5357 |
dpurdie |
59 |
|
|
|
60 |
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
61 |
|
|
|
62 |
If rsQry.RecordCount = 0 Then
|
|
|
63 |
|
|
|
64 |
OraDatabase.Parameters.Add "BM_ID", Request("BM_ID"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
65 |
OraDatabase.Parameters.Add "BM_NAME", Request("BM_NAME"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
66 |
|
| 5590 |
dpurdie |
67 |
objEH.ErrorRedirect = FALSE
|
| 5357 |
dpurdie |
68 |
objEH.TryORA ( OraSession )
|
|
|
69 |
On Error Resume Next
|
|
|
70 |
|
|
|
71 |
OraDatabase.ExecuteSQL _
|
|
|
72 |
"BEGIN PK_BUILDAPI.UPDATE_BUILDMACHINE(:BM_ID, :BM_NAME); END;"
|
|
|
73 |
|
|
|
74 |
objEH.CatchORA ( OraSession )
|
|
|
75 |
|
|
|
76 |
OraDatabase.Parameters.Remove "BM_NAME"
|
|
|
77 |
OraDatabase.Parameters.Remove "BM_ID"
|
|
|
78 |
|
|
|
79 |
If objEH.Finally Then
|
|
|
80 |
Call OpenInParentWindow ("admin_gbe_machclass.asp")
|
|
|
81 |
Call CloseWindow()
|
|
|
82 |
End If
|
|
|
83 |
|
|
|
84 |
Else
|
|
|
85 |
sMessage = "A Machine Type of that name already exists"
|
|
|
86 |
End If
|
|
|
87 |
|
|
|
88 |
rsQry.Close
|
|
|
89 |
Set rsQry = nothing
|
|
|
90 |
Else
|
|
|
91 |
|
|
|
92 |
' Create a new entry
|
|
|
93 |
'
|
|
|
94 |
Query_String = _
|
| 5590 |
dpurdie |
95 |
" SELECT * FROM BUILD_MACHINES WHERE UPPER(BM_NAME) = UPPER('"& Request("BM_NAME") &"')"
|
| 5357 |
dpurdie |
96 |
|
|
|
97 |
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
98 |
|
|
|
99 |
If rsQry.RecordCount = 0 Then
|
|
|
100 |
|
|
|
101 |
OraDatabase.Parameters.Add "BM_NAME", Request("BM_NAME"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
102 |
|
| 5590 |
dpurdie |
103 |
objEH.ErrorRedirect = FALSE
|
| 5357 |
dpurdie |
104 |
objEH.TryORA ( OraSession )
|
|
|
105 |
On Error Resume Next
|
|
|
106 |
|
|
|
107 |
OraDatabase.ExecuteSQL _
|
|
|
108 |
"BEGIN PK_BUILDAPI.ADD_BUILDMACHINE(:BM_NAME); END;"
|
|
|
109 |
|
|
|
110 |
objEH.CatchORA ( OraSession )
|
|
|
111 |
|
|
|
112 |
OraDatabase.Parameters.Remove "BM_NAME"
|
|
|
113 |
|
|
|
114 |
If objEH.Finally Then
|
|
|
115 |
Call OpenInParentWindow ("admin_gbe_machclass.asp")
|
|
|
116 |
Call CloseWindow()
|
|
|
117 |
End If
|
|
|
118 |
|
|
|
119 |
Else
|
|
|
120 |
sMessage = "A Machine Type of that name already exists"
|
|
|
121 |
End If
|
|
|
122 |
|
|
|
123 |
rsQry.Close
|
|
|
124 |
Set rsQry = nothing
|
|
|
125 |
|
|
|
126 |
End If
|
|
|
127 |
|
|
|
128 |
End If
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
'----------------------------------------------
|
|
|
132 |
%>
|
|
|
133 |
<html>
|
|
|
134 |
<head>
|
|
|
135 |
<title>Release Manager</title>
|
|
|
136 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
137 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
138 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
139 |
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
|
|
|
140 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
141 |
</head>
|
|
|
142 |
|
| 5590 |
dpurdie |
143 |
<body leftmargin="0" topmargin="0" onLoad="self.focus();FormName.BM_NAME.focus();">
|
| 5357 |
dpurdie |
144 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
|
|
145 |
<tr>
|
| 5590 |
dpurdie |
146 |
<td class="body_txt">
|
| 5357 |
dpurdie |
147 |
Add a new Machine Type or edit an existing Machine Type.
|
|
|
148 |
</td>
|
|
|
149 |
</tr>
|
|
|
150 |
<%
|
|
|
151 |
'-- FROM START --------------------------------------------------------------------------------------------------------------
|
|
|
152 |
objFormComponent.FormName = "FormName"
|
| 5590 |
dpurdie |
153 |
objFormComponent.FormClass = "form_tight"
|
| 5357 |
dpurdie |
154 |
objFormComponent.Action = ScriptName
|
|
|
155 |
objFormComponent.OnSubmit = "MM_validateForm(""BM_NAME"",""Machine Type"",""RisCleanStrinLength4:"");return document.MM_returnValue"
|
|
|
156 |
Call objFormComponent.FormStart()
|
|
|
157 |
%>
|
|
|
158 |
<tr>
|
| 5590 |
dpurdie |
159 |
<td class="form_field_bg" >
|
| 5357 |
dpurdie |
160 |
<!-- NEW PRODUCT +++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
161 |
<%Call Messenger ( sMessage , 1, "100%" )%>
|
|
|
162 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
163 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
164 |
|
|
|
165 |
<table width="50%" border="0">
|
|
|
166 |
<%
|
|
|
167 |
GBE_MACHCLASS = Request("BM_NAME")
|
|
|
168 |
|
|
|
169 |
If Request("bm_id") <> "" AND GBE_MACHCLASS = "" Then
|
|
|
170 |
%>
|
|
|
171 |
<input type="hidden" name="bm_id" value="<%=Request("bm_id")%>">
|
|
|
172 |
<%
|
|
|
173 |
|
|
|
174 |
Dim rsTemp
|
|
|
175 |
|
|
|
176 |
Query_String = "SELECT * FROM BUILD_MACHINES BM WHERE BM_ID = "& Request("bm_id")
|
|
|
177 |
|
|
|
178 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
179 |
|
|
|
180 |
GBE_MACHCLASS = rsTemp("BM_NAME")
|
|
|
181 |
|
|
|
182 |
rsTemp.Close()
|
|
|
183 |
Set rsTemp = Nothing
|
|
|
184 |
End If
|
|
|
185 |
%>
|
|
|
186 |
<tr>
|
| 5590 |
dpurdie |
187 |
<td><span class="body_txt nowrap">Machine Type</span></td>
|
| 5357 |
dpurdie |
188 |
<td><input name="BM_NAME" type="text" class="body_txt" value="<%=GBE_MACHCLASS%>"></td>
|
|
|
189 |
</tr>
|
| 5590 |
dpurdie |
190 |
</table>
|
|
|
191 |
</td>
|
|
|
192 |
</tr>
|
|
|
193 |
<tr>
|
|
|
194 |
<td>
|
|
|
195 |
<table class="full_table">
|
| 5357 |
dpurdie |
196 |
<tr>
|
| 5590 |
dpurdie |
197 |
<td><%=ProgressBar()%></td>
|
|
|
198 |
<td align="right">
|
|
|
199 |
<input name="btn" type="submit" class="form_btn" value="Add/Update">
|
|
|
200 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onclick="parent.closeIFrame();">
|
|
|
201 |
</td>
|
| 5357 |
dpurdie |
202 |
</tr>
|
|
|
203 |
</table>
|
|
|
204 |
</td>
|
|
|
205 |
</tr>
|
|
|
206 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
207 |
<input type="hidden" name="action" value="true">
|
|
|
208 |
<%
|
|
|
209 |
Call objFormComponent.FormEnd()
|
|
|
210 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
211 |
%>
|
|
|
212 |
</table>
|
|
|
213 |
</body>
|
|
|
214 |
</html>
|
|
|
215 |
<%
|
|
|
216 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
217 |
Set objFormCollector = Nothing
|
|
|
218 |
'----------------------------------------------
|
|
|
219 |
Call Destroy_All_Objects
|
|
|
220 |
%>
|
|
|
221 |
|
|
|
222 |
|