/AC/Admin/SysMn/m018e0328.asp
ASP | 96 lines | 94 code | 2 blank | 0 comment | 7 complexity | b23bdf3909eb1468e3c86bdb69c320fd MD5 | raw file
- <%@language="JAVASCRIPT"%>
- <!--#include file="../../inc/ASPUtility.inc" -->
- <!--#include file="../../Connections/cnnASP02.asp" -->
- <!--#include file="../../inc/ASPCheckAdminLogin.inc" -->
- <%
- var MM_editAction = Request.ServerVariables("URL");
- if (Request.QueryString) {
- MM_editAction += "?" + Request.QueryString;
- }
- if (String(Request("MM_update")) == "true") {
- var Description = String(Request.Form("Description")).replace(/'/g, "''");
- var IsActive = ((Request.Form("IsActive")=="1") ? "1":"0");
- var rsFundingSource = Server.CreateObject("ADODB.Recordset");
- rsFundingSource.ActiveConnection = MM_cnnASP02_STRING;
- rsFundingSource.Source = "{call dbo.cp_Funding_Source3("+ Request.Form("MM_recordId") + ",'" + Description + "'," + IsActive + ",0,'E',0)}";
- rsFundingSource.CursorType = 0;
- rsFundingSource.CursorLocation = 2;
- rsFundingSource.LockType = 3;
- rsFundingSource.Open();
- Response.Redirect("m018q0328.asp");
- }
- var rsFundingSource = Server.CreateObject("ADODB.Recordset");
- rsFundingSource.ActiveConnection = MM_cnnASP02_STRING;
- rsFundingSource.Source = "{call dbo.cp_funding_source3("+Request.QueryString("insFunding_source_id")+",'',0,1,'Q',0)}";
- rsFundingSource.CursorType = 0;
- rsFundingSource.CursorLocation = 2;
- rsFundingSource.LockType = 3;
- rsFundingSource.Open();
- %>
- <html>
- <head>
- <title>Update Funding Source Lookup</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <link rel="stylesheet" href="../../css/MyStyle.css" type="text/css">
- <script language="Javascript" src="../../js/MyFunctions.js"></script>
- <script for="document" event="onkeyup()" language="JavaScript">
- if (window.event.ctrlKey) {
- switch (window.event.keyCode) {
- case 83 :
- //alert("S");
- Save();
- break;
- case 85:
- //alert("U");
- document.frm0328.reset();
- break;
- case 76 :
- //alert("L");
- history.back();
- break;
- }
- }
- </script>
- <script language="Javascript">
- function Save(){
- if (Trim(document.frm0328.Description.value)==""){
- alert("Enter Description.");
- document.frm0328.Description.focus();
- return ;
- }
- document.frm0328.submit();
- }
- </script>
- </head>
- <body onLoad="document.frm0328.Description.focus();">
- <form name="frm0328" method="POST" action="<%=MM_editAction%>">
- <h5>Update Funding Source Lookup</h5>
- <hr>
- <table cellpadding="1" cellspacing="1">
- <tr>
- <td>Description:</td>
- <td><input type="text" name="Description" value="<%=(rsFundingSource.Fields.Item("chvfunding_source_name").Value)%>" tabindex="1" accesskey="F"></td>
- </tr>
- <tr>
- <td>Is Active:</td>
- <td><input type="checkbox" name="IsActive" <%=((rsFundingSource.Fields.Item("bitactive").Value == 1)?"CHECKED":"")%> value="1" tabindex="2" accesskey="L" class="chkstyle"></td>
- </tr>
- </table>
- <hr>
- <table cellpadding="1" cellspacing="1">
- <tr>
- <td><input type="button" value="Save" tabindex="3" onClick="Save();" class="btnstyle"></td>
- <td><input type="reset" value="Undo Changes" tabindex="4" class="btnstyle"></td>
- <td><input type="button" value="Close" tabindex="5" onClick="history.back()" class="btnstyle"></td>
- </tr>
- </table>
- <input type="hidden" name="MM_update" value="true">
- <input type="hidden" name="MM_recordId" value="<%= rsFundingSource.Fields.Item("insFunding_source_id").Value %>">
- </form>
- </body>
- </html>
- <%
- rsFundingSource.Close();
- %>