Subversion Repositories DevTools

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 rsolanki 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|			          wAddApplication			 	 |
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
'------------ CONSTANTS DECLARATION -----------
25
'------------ VARIABLE INIT -------------------
26
Set objFormCollector = CreateObject("Scripting.Dictionary")
27
'------------ CONDITIONS ----------------------
28
'----------------------------------------------
29
%>
30
<%
31
'--------------------------------------------------------------------------------------------------------------------------
32
Sub AddApplication ()
33
	On Error Resume Next
34
 
35
	OraDatabase.Parameters.Add "APP_NAME", 	Request("app_name"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2
36
	OraDatabase.Parameters.Add "APP_ACR", 	Request("app_acr"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2 
37
 
38
 
39
	objEH.TryORA ( OraSession )
40
 
41
	OraDatabase.ExecuteSQL _
42
	"BEGIN pk_Application.Add_Application ( :APP_NAME, :APP_ACR ); END;"	
43
 
44
	objEH.CatchORA ( OraSession )
45
 
46
 
47
	OraDatabase.Parameters.Remove "APP_NAME"
48
	OraDatabase.Parameters.Remove "APP_ACR"
49
 
50
End Sub
51
'--------------------------------------------------------------------------------------------------------------------------
52
%>
53
<%
54
'------------ RUN BEFORE PAGE RENDER ----------
55
' --- Get Form details from DB (for edit forms only) ---
56
'-------------------------------------------------------
57
 
58
' --- Load Validation Rules ---
59
Call objForm.LoadValidationRules ( Array("app_name","app_acr"), OraDatabase )		' Load Validation Rules
60
 
61
 
62
' --- Enter Form Validation Rule Changes here... ----
63
'----------------------------------------------------
64
If Request("action") <> "" Then
65
	If objForm.IsValidOnPostBack Then
66
		' --- Form is Valid ---
67
		Call AddApplication()
68
 
69
		If objEH.Finally Then
70
			Call OpenInParentWindow ( Request("rfile") &"?"& objPMod.ComposeURL() )
71
			Call CloseWindow()
72
		End If
73
 
74
	End If
75
End If
76
'----------------------------------------------
77
%>
78
<html>
79
<head>
80
<title>Access Manager</title>
81
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
82
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
83
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
84
<script language="JavaScript" src="scripts/common.js"></script>
85
</head>
86
 
87
<body background="images/bg_bage_pane.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.app_name.focus();">
88
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
89
  <tr>
90
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="images/i_application_lrg.gif" width="18" height="18" hspace="0" align="absmiddle" border="0" >&nbsp;New Application </span> <br>
91
    Enter Application name and Acronym. 
92
    </td>
93
  </tr>
94
  <form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
95
  <tr>
96
    <td background="images/bg_drk_bage_pane.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
97
      <tr>
98
        <td>&nbsp;</td>
99
        <td align="right"><input name="btn" type="submit" class="form_btn" value="Create">
100
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
101
      </tr>
102
    </table></td>
103
  </tr>
104
 
105
  <tr>
106
    <td background="images/bg_form.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
107
      <tr>
108
        <td width="1%"><img src="images/spacer.gif" width="60" height="200"></td>
109
        <td width="100%"><table width="100%"  border="0" cellspacing="2" cellpadding="0">
110
          <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
111
          <%If NOT objEH.Finally Then%>
112
          <tr>
113
            <td class="form_iname">&nbsp;</td>
114
            <td>
115
              <%objEH.DisplayMessage()%>
116
            </td>
117
            <td class="val_err"></td>
118
          </tr>
119
          <%End If%>
120
          <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
121
          <tr>
122
            <td nowrap class="form_iname" valign="top">Application Name </td>
123
            <td valign="top"><input name="app_name" type="text" class="form_ivalue" size="60" value="<%=Request("app_name")%>"></td>
124
            <td valign="top"> <%=objForm.Validate ("app_name")%> </td>
125
          </tr>
126
		  <tr>
127
            <td nowrap class="form_iname" valign="top">Application Acronym </td>
128
            <td valign="top"><input name="app_acr" type="text" class="form_ivalue" size="10" maxlength="3" value="<%=Request("app_acr")%>"></td>
129
            <td valign="top"> <%=objForm.Validate ("app_acr")%> </td>
130
          </tr>
131
          <tr>
132
            <td width="10%" class="form_iname">&nbsp;</td>
133
            <td width="1%">&nbsp;</td>
134
            <td width="90%" class="val_err"></td>
135
          </tr>
136
        </table></td>
137
      </tr>
138
    </table></td>
139
  </tr>
140
  <%=objPMod.ComposeHiddenTags()%>
141
  <input type="hidden" name="action" value="true">
142
  </form>
143
</table>
144
</body>
145
</html>
146
<%
147
'------------ RUN AFTER PAGE RENDER -----------
148
Set objFormCollector = Nothing
149
'----------------------------------------------
150
%>
151
<!--#include file="common/globals_destructor.asp"-->