Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0    ' always load the page, dont store
%>
<%
'=====================================================
'                                       Additional Note
'=====================================================
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/formating.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/common_dbedit.asp"-->
<!--#include file="common/_popup_window_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------
Dim parPv_id
Dim parNote_id
Dim rsQry
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parNote_id = Request("note_id")
parPv_id = Request("pv_id")
'----------------------------------------------
%>
<%
Sub Get_Additional_Note ( nNote_id, nPv_id, OOrs )
        Dim Query_String
        Query_String = _
        " SELECT an.note_title, an.note_body"&_
        "   FROM ADDITIONAL_NOTES an"&_
        "  WHERE an.note_id = "& nNote_id &_
        "    AND an.PV_ID = "& nPv_id
        Set OOrs = OraDatabase.CreateDynaset( Query_String, cint(0))
End Sub

Sub Update_Additional_Note ( nNote_id, nPv_id, sNote_Title, sNote_Body, nUser_Id )
        Dim retErrCode
        OraDatabase.Parameters.Add "NOTE_ID",           nNote_id,               ORAPARM_INPUT,  ORATYPE_NUMBER
        OraDatabase.Parameters.Add "PV_ID",             nPv_id,                 ORAPARM_INPUT,  ORATYPE_NUMBER
        OraDatabase.Parameters.Add "NOTE_TITLE",        sNote_Title,    ORAPARM_INPUT,  ORATYPE_VARCHAR2
        OraDatabase.Parameters.Add "NOTE_BODY",         sNote_Body,     ORAPARM_INPUT,  ORATYPE_VARCHAR2
        OraDatabase.Parameters.Add "USER_ID",           nUser_Id,               ORAPARM_INPUT,  ORATYPE_NUMBER
        OraDatabase.Parameters.Add "ERRCODE",           0,                              ORAPARM_OUTPUT, ORATYPE_NUMBER
        
        OraSession.BeginTrans
        OraDatabase.ExecuteSQL _
        "BEGIN Update_Additional_Note  ( :NOTE_ID,"&_
        "                                    :PV_ID,"&_
        "                                    :NOTE_TITLE,"&_
        "                                    :NOTE_BODY,"&_
        "                                    :USER_ID,"&_
        "                                    :ERRCODE ); END;"
        
        retErrCode = OraDatabase.Parameters("ERRCODE").Value 
        
        If retErrCode <> 0 Then
                OraSession.RollBack
                Call RaiseMsg ( enum_MSG_DUPLICATE_AN, sNote_Title )
        Else
                OraSession.CommitTrans
        End If
        
End Sub
%>
<%
'Process submition
If CBool(Request("action")) AND objAccessControl.UserLogedIn  Then
        Call Update_Additional_Note ( parNote_id, parPv_id, Request("note_title"), Request("note_body"), objAccessControl.UserId )
        Call OpenInParentWindow ("fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
        Call CloseWindow
        
End If
Call Get_Additional_Note ( parNote_id, parPv_id, rsQry )
%>
<html>
<head>
<title>Release Manager</title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
<link rel="stylesheet" href="images/navigation.css" type="text/css">
<script language="JavaScript" src="images/common.js"></script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();document.additionalnote.note_title.focus();">
<form name="additionalnote" method="post" action="<%=scriptName%>" onSubmit="MM_validateForm('note_title','Note Title','R','note_body','Note Body','maxLength:4000');return document.MM_returnValue;">
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
    <tr> 
      <td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_additional_notes_off.gif" width="26" height="20" hspace="5" border="0"></td>
      <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">&nbsp;Additional 
        Note </td>
      <td background="images/lbox_bg_blue.gif" align="right" width="50%"> 
        <input type="submit" name="btn" value="Submit" class="form_btn_comp">
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
      </td>
      <td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap> 
        <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
    </tr>
    <tr> 
      <td height="100%" width="1%">&nbsp;</td>
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif"> 
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
          <tr> 
            <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
            <td width="1%" nowrap class="form_group" valign="bottom"></td>
            <td nowrap width="100%">&nbsp; </td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Note Title</td>
            <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><input name="note_title" type="text" class="form_item" id="note_title" value="<%=rsQry("note_title")%>" size="80" maxlength="50"> 
            </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td width="1%" valign="top" background="images/bg_form_lightbluedark.gif" class="form_field">Note Body</td>
            <td width="100%" valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><textarea cols="80" rows="20" name="note_body" class="form_item" id="note_body"><%=rsQry("note_body")%></textarea> 
            </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
            <td nowrap width="100%"> <p>&nbsp;</p></td>
          </tr>
        </table> </td>
    </tr>
    <tr>
      <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
    </tr>
  </table>
  <input type="hidden" name="note_id" value="<%=parNote_id%>">
  <input type="hidden" name="pv_id" value="<%=parPv_id%>">
  <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
  <input type="hidden" name="action" value="true">
</form>
</body>
</html>


<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->