| 62 |
rsolanki |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| wBomRejectNote |
|
|
|
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
Response.Expires = 0
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/globals.asp"-->
|
|
|
14 |
<!--#include file="common/config.asp"-->
|
|
|
15 |
<!--#include file="common/common_subs.asp"-->
|
|
|
16 |
<!--#include file="common/_popup_window_common.asp"-->
|
|
|
17 |
<%
|
|
|
18 |
'------------ ACCESS CONTROL ------------------
|
|
|
19 |
%>
|
|
|
20 |
<!--#include file="_access_control_general.asp"-->
|
|
|
21 |
<%
|
|
|
22 |
'------------ VARIABLE DEFINITION -------------
|
|
|
23 |
Dim objFormCollector
|
|
|
24 |
Dim parReject_seq
|
|
|
25 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
26 |
'------------ VARIABLE INIT -------------------
|
|
|
27 |
parBom_id = Request("bom_id")
|
|
|
28 |
parReject_seq = Request("reject_seq")
|
|
|
29 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
|
|
30 |
'------------ CONDITIONS ----------------------
|
|
|
31 |
'----------------------------------------------
|
|
|
32 |
%>
|
|
|
33 |
<%
|
|
|
34 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
35 |
Sub GetFormDetails ( nBom_id, nReject_seq, ByRef outobjDetails )
|
|
|
36 |
Dim rsQry, query
|
|
|
37 |
OraDatabase.Parameters.Add "ENTITY_ID", nBom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
38 |
OraDatabase.Parameters.Add "REJECT_SEQ", nReject_seq,ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
39 |
OraDatabase.Parameters.Add "ENUM_ENTITY_TYPE", "enumENTITY_TYPE_BOM", ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
40 |
|
|
|
41 |
query = _
|
|
|
42 |
" SELECT rt.COMMENTS"&_
|
|
|
43 |
" FROM REJECTION_TRAIL rt "&_
|
|
|
44 |
" WHERE rt.ENUM_ENTITY_TYPE = GET_SYSTEM_VALUE( :ENUM_ENTITY_TYPE ) "&_
|
|
|
45 |
" AND rt.ENTITY_ID = :ENTITY_ID "&_
|
|
|
46 |
" AND rt.REJECT_SEQ = :REJECT_SEQ "
|
|
|
47 |
|
|
|
48 |
Set rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
outobjDetails.Item ("comments") = NULL
|
|
|
52 |
If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
|
|
|
53 |
outobjDetails.Item ("comments") = rsQry("comments")
|
|
|
54 |
|
|
|
55 |
End If
|
|
|
56 |
|
|
|
57 |
OraDatabase.Parameters.Remove "ENTITY_ID"
|
|
|
58 |
OraDatabase.Parameters.Remove "REJECT_SEQ"
|
|
|
59 |
OraDatabase.Parameters.Remove "ENUM_ENTITY_TYPE"
|
|
|
60 |
|
|
|
61 |
rsQry.Close
|
|
|
62 |
Set rsQry = Nothing
|
|
|
63 |
End Sub
|
|
|
64 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
65 |
Sub BomRejectNote ()
|
|
|
66 |
On Error Resume Next
|
|
|
67 |
|
|
|
68 |
OraDatabase.Parameters.Add "BOM_ID", Request("bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
69 |
OraDatabase.Parameters.Add "REJECT_SEQ", Request("reject_seq"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
70 |
OraDatabase.Parameters.Add "COMMENTS", Request("reject_note"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
71 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId,ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
objEH.TryORA ( OraSession )
|
|
|
75 |
|
|
|
76 |
OraDatabase.ExecuteSQL _
|
|
|
77 |
"BEGIN pk_Bom.Accept_Reject_Comments ( :BOM_ID, :REJECT_SEQ, :COMMENTS, :USER_ID ); END;"
|
|
|
78 |
|
|
|
79 |
objEH.CatchORA ( OraSession )
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
OraDatabase.Parameters.Remove "BOM_ID"
|
|
|
83 |
OraDatabase.Parameters.Remove "REJECT_SEQ"
|
|
|
84 |
OraDatabase.Parameters.Remove "COMMENTS"
|
|
|
85 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
86 |
|
|
|
87 |
End Sub
|
|
|
88 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
89 |
%>
|
|
|
90 |
<%
|
|
|
91 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
92 |
' --- Get Form details from DB ---
|
|
|
93 |
Call GetFormDetails ( parBom_id, parReject_seq, objFormCollector )
|
|
|
94 |
|
|
|
95 |
' --- Load Validation Rules ---
|
|
|
96 |
Call objForm.LoadValidationRules ( Array("reject_note"), OraDatabase ) ' Load Validation Rules
|
|
|
97 |
|
|
|
98 |
' --- Enter Form Validation Rule Changes here... ----
|
|
|
99 |
'----------------------------------------------------
|
|
|
100 |
|
|
|
101 |
If CBool(Request("action")) Then
|
|
|
102 |
If objForm.IsValidOnPostBack Then
|
|
|
103 |
' --- Form is Valid ---
|
|
|
104 |
Call BomRejectNote()
|
|
|
105 |
|
|
|
106 |
If objEH.Finally Then
|
|
|
107 |
Call OpenInParentWindow ( Request("rfile") &"?UPDATED=OK"& objPMod.ComposeURLWithout("rfile") )
|
|
|
108 |
Call CloseWindow()
|
|
|
109 |
End If
|
|
|
110 |
|
|
|
111 |
End If
|
|
|
112 |
End If
|
|
|
113 |
|
|
|
114 |
'----------------------------------------------
|
|
|
115 |
%>
|
|
|
116 |
<html>
|
|
|
117 |
<head>
|
|
|
118 |
<title>Deployment Manager</title>
|
|
|
119 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
120 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
121 |
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
|
|
|
122 |
<script language="JavaScript" src="scripts/common.js"></script>
|
|
|
123 |
</head>
|
|
|
124 |
|
|
|
125 |
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.reject_note.focus();">
|
|
|
126 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
|
|
127 |
<tr>
|
|
|
128 |
<td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> Note</span> <br>
|
|
|
129 |
Enter note details and click submit.
|
|
|
130 |
</td>
|
|
|
131 |
</tr>
|
|
|
132 |
<form name="FormName" method="post" action="<%=SCRIPT_NAME%>" onSubmit="ShowProgress();">
|
|
|
133 |
<tr>
|
|
|
134 |
<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
135 |
<tr>
|
|
|
136 |
<td><%=ProgressBar%></td>
|
|
|
137 |
<td align="right"><input name="btn" type="submit" class="form_btn" value="Submit">
|
|
|
138 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
|
|
|
139 |
</tr>
|
|
|
140 |
</table></td>
|
|
|
141 |
</tr>
|
|
|
142 |
<tr>
|
|
|
143 |
<td><table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
144 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
145 |
<%If NOT objEH.Finally Then%>
|
|
|
146 |
<tr>
|
|
|
147 |
<td class="form_iname"> </td>
|
|
|
148 |
<td>
|
|
|
149 |
<%objEH.DisplayMessage()%>
|
|
|
150 |
</td>
|
|
|
151 |
<td class="val_err"></td>
|
|
|
152 |
</tr>
|
|
|
153 |
<%End If%>
|
|
|
154 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
155 |
<tr>
|
|
|
156 |
<td valign="top" nowrap class="form_iname">Note</td>
|
|
|
157 |
<td valign="top"><textarea name="reject_note" cols="80" rows="16" class="form_ivalue"><%=objForm.GetValue( "reject_note", objFormCollector.Item("comments")) %></textarea></td>
|
|
|
158 |
<td valign="top">
|
|
|
159 |
<%=objForm.Validate ("reject_note")%>
|
|
|
160 |
</td>
|
|
|
161 |
</tr>
|
|
|
162 |
<tr>
|
|
|
163 |
<td width="10%" class="form_iname"> </td>
|
|
|
164 |
<td width="1%"> </td>
|
|
|
165 |
<td width="90%" class="val_err"></td>
|
|
|
166 |
</tr>
|
|
|
167 |
</table></td>
|
|
|
168 |
</tr>
|
|
|
169 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
170 |
<input type="hidden" name="reject_seq" value="<%=parReject_seq%>">
|
|
|
171 |
<input type="hidden" name="action" value="true">
|
|
|
172 |
</form>
|
|
|
173 |
</table>
|
|
|
174 |
</body>
|
|
|
175 |
</html>
|
|
|
176 |
<%
|
|
|
177 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
178 |
Set objFormCollector = Nothing
|
|
|
179 |
'----------------------------------------------
|
|
|
180 |
%><!--#include file="common/globals_destructor.asp"-->
|