Subversion Repositories DevTools

Rev

Rev 5506 | Rev 6579 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5506 Rev 5590
Line 40... Line 40...
40
 
40
 
41
If CBool(Request("action")) Then
41
If CBool(Request("action")) Then
42
 
42
 
43
   If Request("LICENCE_NAME") = "" Then
43
   If Request("LICENCE_NAME") = "" Then
44
 
44
 
45
      Call RaiseMsg ( enum_MSG_ERROR, "Cannot add an empty string as a licence name" )
45
      sMessage = "Cannot add an empty string as a licence name"
46
 
46
 
47
   Else
47
   Else
48
      Query_String = _
48
      Query_String = _
49
      "   SELECT * FROM licences WHERE name = '"& Request("LICENCE_NAME") &"'"
49
      "   SELECT * FROM licences WHERE UPPER(name) = UPPER('"& Request("LICENCE_NAME") &"')"
50
 
50
 
51
      Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
51
      Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
52
 
52
 
53
      If rsQry.RecordCount = 0 Then
53
      If rsQry.RecordCount = 0 Then
54
 
54
 
55
         Query_Stringx = _
55
         Query_Stringx = _
56
         "   SELECT seq_gbe_id.NEXTVAL FROM DUAL"
56
            "SELECT seq_gbe_id.NEXTVAL FROM DUAL"
57
 
57
 
58
         Set dual = OraDatabase.DbCreateDynaset(Query_Stringx,cint(0))
58
         Set dual = OraDatabase.DbCreateDynaset(Query_Stringx,cint(0))
59
         LICENCE_ID = dual("NEXTVAL")
59
         LICENCE_ID = dual("NEXTVAL")
60
         dual.Close()
60
         dual.Close()
61
         Set dual = Nothing
61
         Set dual = Nothing
62
 
62
 
63
         OraDatabase.Parameters.Add "LICENCE", LICENCE_ID, ORAPARM_INPUT, ORATYPE_NUMBER
63
         OraDatabase.Parameters.Add "LICENCE", LICENCE_ID, ORAPARM_INPUT, ORATYPE_NUMBER
64
         OraDatabase.Parameters.Add "NAME",    Request("LICENCE_NAME"),   ORAPARM_INPUT, ORATYPE_VARCHAR2
64
         OraDatabase.Parameters.Add "NAME",    Request("LICENCE_NAME"),   ORAPARM_INPUT, ORATYPE_VARCHAR2
65
 
65
 
-
 
66
         objEH.ErrorRedirect = FALSE
66
         objEH.TryORA ( OraSession )
67
         objEH.TryORA ( OraSession )
67
         On Error Resume Next
68
         On Error Resume Next
68
         OraDatabase.ExecuteSQL ("begin INSERT INTO licences (licence, name) VALUES (:LICENCE, :NAME); end;")
69
         OraDatabase.ExecuteSQL ("begin INSERT INTO licences (licence, name) VALUES (:LICENCE, :NAME); end;")
69
         objEH.CatchORA ( OraSession )
70
         objEH.CatchORA ( OraSession )
70
 
71
 
Line 75... Line 76...
75
            Call OpenInParentWindow ("admin_licences.asp")
76
            Call OpenInParentWindow ("admin_licences.asp")
76
            Call CloseWindow()
77
            Call CloseWindow()
77
         End If
78
         End If
78
 
79
 
79
      Else
80
      Else
80
         Call RaiseMsg ( enum_MSG_LICENCE_EXISTS, Request("LICENCE_ID") )
81
         sMessage = "Licence already exists"
81
      End If
82
      End If
82
 
83
 
83
      rsQry.Close
84
      rsQry.Close
84
      Set rsQry = nothing
85
      Set rsQry = nothing
85
   End If
86
   End If
Line 94... Line 95...
94
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
95
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
95
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
96
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
96
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
97
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
97
<script language="JavaScript" src="scripts/common.js"></script>
98
<script language="JavaScript" src="scripts/common.js"></script>
98
</head>
99
</head>
99
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.LICENCE_NAME.focus();">
100
<body leftmargin="0" topmargin="0" onLoad="self.focus();FormName.LICENCE_NAME.focus();">
100
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
101
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
101
   <tr>
102
   <tr>
102
      <td bgcolor="#FFFFFF" class="body_txt">
-
 
103
         <span class="body_h1">
103
      <td class="body_txt">
104
            <img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;Add Licence
-
 
105
         </span>
-
 
106
         <br>
-
 
107
         Add a new licence.
104
         Add a new licence.
108
      </td>
105
      </td>
109
   </tr>
106
   </tr>
110
   <%
107
   <%
111
   '-- FROM START --------------------------------------------------------------------------------------------------------------
108
   '-- FROM START --------------------------------------------------------------------------------------------------------------
112
   objFormComponent.FormName = "FormName"
109
   objFormComponent.FormName = "FormName"
-
 
110
   objFormComponent.FormClass = "form_tight"
113
   objFormComponent.Action = ScriptName
111
   objFormComponent.Action = ScriptName
114
   objFormComponent.OnSubmit = "ShowProgress();"
112
   objFormComponent.OnSubmit = "ShowProgress();"
115
   Call objFormComponent.FormStart()
113
   Call objFormComponent.FormStart()
116
   %>
114
   %>
117
   <tr>
115
   <tr>
118
      <td background="images/bg_login.gif">
116
      <td class="form_field_bg" >
119
         <table width="50%"  border="0" cellspacing="0" cellpadding="0">
-
 
120
            <tr>
-
 
121
               <td><%=ProgressBar()%></td>
-
 
122
               <td align="right"><input name="btn" type="submit" class="form_btn" value="Add">
-
 
123
                  <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
-
 
124
               </td>
-
 
125
            </tr>
-
 
126
         </table>
-
 
127
      </td>
-
 
128
   </tr>
-
 
129
   <tr>
-
 
130
      <td>
-
 
131
         <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
117
         <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
132
         <%Call Messenger ( sMessage , 3, "100%" )%>
118
         <%Call Messenger ( sMessage , 3, "100%" )%>
133
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
119
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
134
         <!--#include file="messages/_msg_inline.asp"-->
120
         <!--#include file="messages/_msg_inline.asp"-->
135
         <table width="70%" border="0">
121
         <table width="70%" border="0">
136
            <tr>
122
            <tr>
137
               <td><span class="body_txt">Licence Name</span></td>
123
               <td><span class="body_txt nowrap">Licence Name</span></td>
138
               <td><input name="LICENCE_NAME" type="text" class="body_txt" value="<%=LICENCE_NAME%>" size=70 maxlength=50></td>
124
               <td><input name="LICENCE_NAME" type="text" class="body_txt" value="<%=LICENCE_NAME%>" size=70 maxlength=50></td>
139
            </tr>
125
            </tr>
-
 
126
         </table>
-
 
127
      </td>
-
 
128
   </tr>
-
 
129
   <tr>
-
 
130
      <td>
-
 
131
         <table class="full_table">
140
            <tr>
132
            <tr>
-
 
133
               <td><%=ProgressBar()%></td>
141
               <td>&nbsp;</td>
134
               <td align="right">
-
 
135
                    <input name="btn" type="submit" class="form_btn" value="Add">
-
 
136
                    <input name="btn" type="reset" class="form_btn" value="Cancel" onclick="parent.closeIFrame();">
142
               <td>&nbsp;</td>
137
               </td>
143
            </tr>
138
            </tr>
144
         </table>
139
         </table>
145
      </td>
140
      </td>
146
   </tr>
141
   </tr>
147
   <%=objPMod.ComposeHiddenTags()%>
142
   <%=objPMod.ComposeHiddenTags()%>