⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exchangeedit.asp

📁 财务管理系统 报账等基本功能实现 有完整的实现
💻 ASP
字号:
<!--#include file="../conndb.asp"-->
<html>
<head>
<title>编辑收付款信息</title>
<link rel="stylesheet" href="../style.css">
<Script Language="JavaScript">
//域校验
function CheckFlds(){
  if (document.form1.custid.selectedIndex<0){
   alert("请选择客户名称!");
   form1.custid.focus;
   return false;
  } 
  if (document.form1.type.selectedIndex<0){
   alert("请选择收付款类型!");
   form1.type.focus;
   return false;
  }  
  if (document.form1.esum.value==""){
   alert("请输入收付款金额!");
   form1.esum.focus;
   return false;
  } 
  if (document.form1.edate.value==""){
   alert("请输入收付款日期!");
   form1.edate.focus;
   return false;
  } 
  return true;
}
</Script>
</head>
<%
  Dim TypeId,ExeId,CustId,ExcSum,ExcDate,Memo,nType
  Dim Action,rs
  '变量初始化
  ExcSum = 0
  ExcDate = Date()
  '读取参数action\eid\ntype
  Action = Request.QueryString("action")
  ExeId = Request.QueryString("eid") 
  nType = Request.QueryString("ntype")  
  Set rs = Server.CreateObject("ADODB.RecordSet")
  '编辑问题记录
  If Action = "edit" Then
    '设置SELECT语句,读取记录数据
    sql = "SELECT * FROM Exchange WHERE ExcId=" & ExcId & " AND nType=" & nType
    rs.Open sql,conn,1,3
    If Not rs.EOF Then
      CustId = rs("CustId")
      TypeId = rs("TypeId")
      ExcSum = rs("ExcSum")
      ExcDate = rs("ExcDate")
      Memo = rs("Memo")
   End If
   rs.Close()
  End If
%>
<body leftmargin="1" topmargin="0">
<form name="form1" method="POST" action="ExchangeSave.asp?action=<%=Action%>&eid=<%=ExcId%>" onsubmit="return CheckFlds()">
<br>
 <table align="center" border="1" cellspacing="0" width="95%" bordercolor="#64B9E1" bordercolorlight="#64B9E1" bordercolordark="#FFFFFF">
    <tr>
      <td bgcolor="#FFFFFF" colspan="4" background="pic/exchange.jpg" height="90" width="100%">
      <p align="center"><b><font face="华文彩云" color="#000080" size="6">收付款信息</font></b></p>
      </td>
    </tr>
    <tr>
      <td width="25%" bgcolor="#CEE7FF">选择客户名称</td>
      <td width="25%"><select size="1" name="custid">
      <%
        sql = "Select * From Customer ORDER BY CustId" 
        rs.Open sql,conn,1,3
        Do While Not rs.EOF
          If rs("CustId")=CustId Then         
        %>
          <option selected value="<%=rs("CustId")%>"><%=rs("CustName")%></option>
          <%Else%>
          <option value="<%=rs("CustId")%>"><%=rs("CustName")%></option>
          <%End If
          rs.MoveNext()
        Loop
        rs.Close()%>
         </select></td>
      <td width="25%" bgcolor="#CEE7FF">收付款类型</td>
      <td width="25%"><select size="1" name="type">
      <%sql = "Select * From Types Where Flag=11 ORDER BY TypeId" 
        rs.Open sql,conn,1,1
        Do While Not rs.EOF
          If rs("TypeId")=TypeId Then         
        %>
          <option selected value="<%=rs("TypeId")%>"><%=rs("TypeName")%></option>
          <%Else%>
          <option value="<%=rs("TypeId")%>"><%=rs("TypeName")%></option>
          <%End If
          rs.MoveNext()
        Loop
        rs.Close()%>
         </select></td>
    </tr>
    <tr>
      <td bgcolor="#CEE7FF">收付款金额</td>
      <td><input type="text" name="esum" size="16" value="<%=ExcSum%>">&nbsp;</td>
      <td bgcolor="#CEE7FF">收付款日期</td>
      <td><input type="text" name="edate" size="16" value="<%=ExcDate%>">&nbsp;</td>
    </tr>
    <tr>
      <td bgcolor="#CEE7FF">备注</td>
      <td colspan="3"><textarea rows="4" name="memo" cols="50"><%=Memo%></textarea>&nbsp;</td>
    </tr>
  </table><input type="hidden" name="ntype" size="16" value="<%=nType%>">
  <p align=center><input type="submit" value=" 提 交 " name="B1">
  <input type="reset" value=" 重 写 " name="B2"></p>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -