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

📄 leaveview1.asp

📁 设置员工上下班时间
💻 ASP
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查询请假申请</title>
</head><!--#include file="connection.asp"-->
<%
	
	Set rs=Server.CreateObject("ADODB.Recordset")
	LeaveDateS=trim(Request("LeaveDateS")+"")
	LeaveDateE=trim(Request("LeaveDateE")+"")
	Employee=trim(Request("Employee")+"")
		
	strsql="select a.*,(select name "
	strsql =strsql +"from employee where keyid=a.employeeid) as emplname "	
	strsql=strsql+" ,iif(ischeck ='1', '同意' , '不同意') as ischekced "
	strsql=strsql+" from leave a where 1=1 "
	if len(Employee)>=1 then 
		strsql=strsql+" and employeeid=" +Employee 
	end if
	if len(LeaveDateS)>=1 then 
		strsql=strsql+" and  DateValue(leave_sdate)>=#" +LeaveDateS +"#  "
	end if
	if len(LeaveDateE)>=1 then 
		strsql=strsql+" and  DateValue(leave_edate)<=#" +LeaveDateE +"#  "
	end if
	strsql=strsql+" order by leave_sdate desc"
	rs.Open  strsql,con
	
	Set empl_rs=Server.CreateObject("ADODB.Recordset")		
	strsql="select * from employee"
	empl_rs.Open  strsql,con	
%>
<body>
<form name="form1" method="post" action="">
	<input name="IsPostBack" type="hidden" value="PostBack">
  <table width="100%" border="0">
    <tr>
	  <td  >员工: 
        <input type="text" name="Employee" value="<%=session("name")%>" readonly></td>
      <td >请假日期:从<input type="text" name="LeaveDateS"  value="<%=LeaveDateS%>">
	  到<input type="text" name="LeaveDateE"  value="<%=LeaveDateE%>"></td>
	</tr>
	<tr>
	  <td ><font color="red" ><%=msgErr %></font></td>
      <td align="right" >
	  	<input type="submit" name="SubmitQuery" value="查询">
	  </td>
    </tr>
  </table>
  <table width="100%" border="1">
    <tr>
	  <td align="center" width="20%">员工姓名</td>
      <td align="center" width="20%">开始时间</td>
      <td align="center" width="20%">结束时间</td>
	  <td align="center" width="10%">是否审核</td>

    </tr>
	<%do while not rs.EOF %>
    <tr>
     
	  	<td>
	  	<%=trim(rs("emplname")) %></td>
      <td><%=trim(rs("leave_sdate")) %></td>
	  <td><%=trim(rs("leave_edate")) %></td>
	   <td><%=trim(rs("ischekced")) %></td>
	    
    </tr>
	<% rs.MoveNext
	loop 
	rs.Close
	con.Close%>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

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