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

📄 addfinancialproject.asp

📁 办公自动化系统
💻 ASP
字号:
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<%
'判断用户是否登录
if isempty(Session("ID")) then
Response.Redirect "../login.asp"
end if
'判断用户是否具有财务管理员身份
if Session("IsFinancialManager")=False then
Response.Redirect "Finance.asp"
end if

Warning=false 
'添加新财务项目
if not IsEmpty(Request.Form("AddProject")) then
TheFinancialProjectName=Request.Form("FinancialProjectName")
FinancialManager=Request.Form("select")
TheAddDate=Date
'校验用户是否是财务部门的主管
if Session("Department")="财务部" and Session("Position")="主管" then
'从列表中选择新财务项目的负责人
if len(trim(theFinancialProjectName))=0 then
TheMessage="财务项目名称不能为空,请重填新财务项目名称"
Warning=true
else
'向数据库添加新财务项目
conn.Execute(" insert into FinancialProject (FinancialProjectName, AddDate, FinancialManager) "_
& "values (" _
& "'" & TheFinancialProjectName &"', '" & TheAddDate &"', '" & FinancialManager & "') ") 
TheMessage="财务项目已提交成功,请填写新财务项目"
Warning=false
end if
else
TheMessage="您不是财务部主管,无权添加财务项目"
Warning=true
end if
else
TheMessage = "请在下面填写新的财务项目"
end if
set RSPersons = conn.Execute("select Name from UserInfo order by Name")
set RSFinancialProjects=conn.Execute("select * from FinancialProject order by FinancialProjectName")
%>



<HTML>
<HEAD>
<TITLE>公司财务信息管理系统 </TITLE>
<META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">

</HEAD>

<BODY BGCOLOR="">

<table width=800 border=0 bgcolor=#9966FF cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td height="41"    valign=center bgcolor="#9966FF" ><div align="center"><strong><font color="#FFFFFF" size="4">企业办公自动化系统</font></strong></div></td>
</tr>
</table>


<table width=800 border=0 bgcolor=#9933FF cellspacing=1 cellpadding=2 align=center>
<tr><td colspan=3>
<P ALIGN="CENTER"><font color="white">公司信息管理系统->公司财务管理系统->添加财务记录>添加财务项目当前用户:
  <% response.write Session("Name") %>
</font>
</td></tr>
<tr bgcolor=white >
<td><a href=".././html/home.asp"><font color="#9900FF">返回主页</font></a></td>
<td  align=center>
 <% if Warning=false then %>
 <font color="#9900FF" ><% response.write TheMessage %></FONT>
 <% else %>
 <font color=Red ><% response.write TheMessage %></font>
 <% end if %>
 </td>
<td  align=right><a href="Addcaiwu.asp"><font color="#9933FF">返回上页</font></a></td>
</tr>
</table> 
<TABLE CELLPADDING=1 CELLSPACING=2 BORDER=1 bordercolor="#16A84D" WIDTH=800 align=center>   
<TR VALIGN="center" ALIGN="center">
<TD WIDTH=20% bgcolor=#B5EFC7><img src="../image/HomepagePicture1.jpg" width="250" height="173"></td>
<td>
<table width="520" border="0">
          <tr>
            <td width="88"><div align="center"><font color="#9966FF" size="2">ID号</font></div></td>
            <td width="110"><div align="center"><font color="#9966FF" size="2">项目名称</font></div></td>
            <td width="99"><div align="center"><font color="#9966FF" size="2">添加时间</font></div></td>
            <td width="99"><div align="center"><font color="#9966FF" size="2">项目主管</font></div></td>
            <td width="102"><div align="center"><font color="#9966FF" size="2">删除</font></div></td>
          </tr>
          <%Do Until RSFinancialProjects.eof%>
		  <tr>
            <td><div align="center"><font color="#9966FF" size="2"><%=RSFinancialProjects("FinancialProjectID")%></font></div></td>
            <td><div align="center"><font color="#9966FF" size="2"><%=RSFinancialProjects("FinancialProjectName")%></font></div></td>
            <td><div align="center"><font color="#9966FF" size="2"><%=RSFinancialProjects("AddDate")%></font></div></td>
            <td><div align="center"><font color="#9966FF" size="2"><%=RSFinancialProjects("FinancialManager")%></font></div></td>
            <td><div align="center"><font color="#9966FF" size="2"><a href="del.asp?id=<%=RSFinancialProjects("FinancialProjectID")%>">删除</a></font></div></td>
          </tr>
		  <%
RSFinancialProjects.movenext
loop
%>
      </table>
<FORM ACTION="Addxiang.asp"  METHOD=POST>

<table CELLPADDING=1 CELLSPACING=1 BORDER=1 bordercolor="#9966FF"align=center width=100%>
<tr><td width="109" ><div align="center"><font color="#990099">项目名称</font></div></td>
<td width="412"><INPUT TYPE="text"  NAME="FinancialProjectName" VALUE="" size=50> </td></tr>
<tr>
  <td><div align="center"><font color="#9C009C">主管姓名</font></div></td>
  <td><table width=100% border=1>
    <tr>
      <td>
        <SELECT NAME="select" >
          <%
Do Until RSPersons.EOF
%>
          <OPTION VALUE="<% Response.Write RSPersons("Name") %>">
          <% Response.Write RSPersons("Name") %>
          </OPTION>
          <%
RSPersons.Movenext
loop
%>
        </SELECT>
      </td>
    </tr>
  </table></td>
</tr>
<tr><td height="31" colspan="2"><div align="center">
  <input type="submit" name="AddProject" value="添加">
</div></td>
</tr>
</table>
</form>
</table>
</BODY>
</HTML>

⌨️ 快捷键说明

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