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

📄 infoquery2.asp

📁 工资管理系统功能齐全包括工人工资信息查询.
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="StudentConn.asp" -->
<%
Dim Recordset1__MMColParam, strStudentNum, strName, strClass
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_StudentConn_STRING
strStudentNum= Request("StudentNum")
strName=Request("Name")
strGrade=Request("GradeID")
strClass=Request("ClassID")
if Request.QueryString<>"" then Session("strQureyString")=Request.QueryString
if Request.Form<>"" then Session("strQureyString")=Request.Form
if strStudentNum <> "" then
  Recordset1__MMColParam =strStudentNum
  Recordset1.Source = "SELECT *  FROM StudentInfo  WHERE StudentNum like '%" & Recordset1__MMColParam & "%'  ORDER BY StudentNum"
else
if strName<>"" then
  Recordset1__MMColParam =strName
  Recordset1.Source = "SELECT *  FROM StudentInfo  WHERE Name like '%" & Recordset1__MMColParam & "%'  ORDER BY StudentNum"
else
if strClass<>"" and strGrade<>"" then
  if strClass="All" then strClass=""
  Recordset1__MMColParam =strClass
  Recordset1__Grade=strGrade
  Recordset1.Source = "SELECT *  FROM StudentInfo  WHERE ClassID like '%" & Recordset1__MMColParam & "%' and GradeID like '%" & Recordset1__Grade &"%'  ORDER BY StudentNum"
end if
end if
end if
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""
For Each Item In Request.QueryString
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
  End If
Next
For Each Item In Request.Form
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
  End If
Next
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "")  Then MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
Dim Recordset1_total
Dim Recordset1_first
Dim Recordset1_last
Recordset1_total = Recordset1.RecordCount
If (Recordset1_numRows < 0) Then
  Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
  Recordset1_numRows = 1
End If
Recordset1_first = 1
Recordset1_last  = Recordset1_first + Recordset1_numRows - 1
If (Recordset1_total <> -1) Then
  If (Recordset1_first > Recordset1_total) Then
    Recordset1_first = Recordset1_total
  End If
  If (Recordset1_last > Recordset1_total) Then
    Recordset1_last = Recordset1_total
  End If
  If (Recordset1_numRows > Recordset1_total) Then
    Recordset1_numRows = Recordset1_total
  End If
End If
%>
<%
If (Recordset1_total = -1) Then
  Recordset1_total=0
  While (Not Recordset1.EOF)
    Recordset1_total = Recordset1_total + 1
    Recordset1.MoveNext
  Wend
  If (Recordset1.CursorType > 0) Then
    Recordset1.MoveFirst
  Else
    Recordset1.Requery
  End If
  If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
    Recordset1_numRows = Recordset1_total
  End If
  Recordset1_first = 1
  Recordset1_last = Recordset1_first + Recordset1_numRows - 1
  
  If (Recordset1_first > Recordset1_total) Then
    Recordset1_first = Recordset1_total
  End If
  If (Recordset1_last > Recordset1_total) Then
    Recordset1_last = Recordset1_total
  End If
End If
%>
<%
	Dim Recordset2
	Set Recordset2=Server.CreateObject("ADODB.Recordset")
	Recordset2.ActiveConnection=MM_StudentConn_STRING
	if not Recordset1.eof Then
	Recordset2.Source="Select * from Class Where ClassID='" & Recordset1("ClassID") & "' and GradeID='" & Recordset1("GradeID") & "'"
	Recordset2.CursorType = 0
	Recordset2.CursorLocation = 3
	Recordset2.LockType = 3
	Recordset2.Open()
	End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>修改/删除人员信息</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" Name=GENERATOR>
<link rel="stylesheet" href="home.css" type="text/css">
<SCRIPT language=javascript>
function unselectall()
{
    if(document.del.chkAll.checked){
	document.del.chkAll.checked = document.del.chkAll.checked&0;
    } 	
}
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != 'chkAll')
       e.checked = form.chkAll.checked;
    }
  }
function ConfirmDel()
{
   if(confirm("确定要删除选中的记录吗?一旦删除将不能恢复!"))
     return true;
   else
     return false;
}
</SCRIPT>
</HEAD>
<BODY text=#000000 bgColor=#f7f7ff leftMargin=0 topMargin=0>
<!--#include file="InfoManage_Top.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
    <TR> 
    <TD align="center" valign="top" bgcolor="#F7f7ff"> 
      <% If Recordset1.EOF And Recordset1.BOF Then %>
        <div align="center"> <br>
          <BR>
          <BR>
          <BR>
        <font color="#FF3399"> 
        <% flgDel=Session("txtDel")
			  if flgDel<>"" then %>
          记录已成功删除! 
          <% else %>
          抱歉!找不到您所寻找的人员记录! 
          <% end if %>
          </font><BR>
          <BR>
          <BR>
          <BR>
        </div>
        <% End If %>
		<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
        <form Name="del" onSubmit="return ConfirmDel()" method="post" action="InfoDel2.asp">
        <span class="title">修改或删除条件:</span><font color="#FF0000"><b><br>
        </b></font> 
        <%
			 if Request("StudentNum")<>"" then
			     response.write "编号中含有“" & strStudentNum & "”"
			 elseif strName<>"" then
			     response.write "姓名中含有“" & strName & "”"
			 else
				 if strClass<>"" then response.write strClass 
			 end if
			%>
          &nbsp;&nbsp;&nbsp;&nbsp;共找到&nbsp;<font color="#FF0000"><%=(Recordset1_total)%></font>&nbsp;条记录!          
        <table cellspacing=1 width="100%" border=1 cellpadding="1" bordercolor="#CCCCFF" align="center" style="border-collapse:collapse">
          <tr align="center" valign="middle" bordercolor="#FFCC00"> 
            <td nowrap><font color="#000000">是否删除</font></td>
            <td nowrap><font color="#000000">编号</font></td>
            <td nowrap><font color="#000000">姓名</font></td>
            <td nowrap><font color="#000000">政治面貌</font></td>
            <td nowrap><font color="#000000">科室</font></td>
			<td nowrap><font color="#000000">身份证号</font></td>
            <td width="60" nowrap><font color="#000000">操作</font></td>
           </tr>
            <% 
				While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) 
			%>
            <%
			  txtStudentNum=Recordset1.Fields.Item("StudentNum").Value & ""
			  txtName=replace(Recordset1.Fields.Item("Name").Value & ""," ","&nbsp;")
			  if txtName="" then txtName="&nbsp;"
			  txtPolitics=replace(Recordset1.Fields.Item("politics").Value & ""," ","&nbsp;")
			  if txtPolitics="" then txtPolitics="&nbsp;"
			  txtClassName=replace(Recordset2("ClassName") & ""," ","&nbsp;")
			  if txtClassName="" then txtClassName="&nbsp;"
			  txtTelnum=replace(Recordset1.Fields.Item("TelNum").Value & ""," ","&nbsp;")
			  if txtTelnum="" then txtTelnum="&nbsp;"
			%>
          <tr> 
            <td height="20" align="center"><input type="checkbox" value="<%= (Recordset1.Fields.Item("StudentNum").Value) %>" onclick=unselectall() Name="chkNum"></td>
            <td height="20" align="center" nowrap><%=txtStudentNum%></td>
            <td height="20" align="center" nowrap><%=txtName%></td>
            <td height="20" align="center" nowrap><%=txtPolitics%></td>
            <td height="20" align="center" nowrap><%=txtClassName%></td>
            <td height="20" align="center" nowrap><%=txtTelnum%></td>
            <td height="20" align="center"><a href="InfoModify.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "StudentNum=" & Recordset1.Fields.Item("StudentNum").Value %>">修改</a>&nbsp;<a href="InfoDel.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "StudentNum=" & Recordset1.Fields.Item("StudentNum").Value %>">删除</a></td>
           </tr>
            <% 
			  Repeat1__index=Repeat1__index+1
			  Repeat1__numRows=Repeat1__numRows-1
			  Recordset1.MoveNext()
			Wend
			%>
          </table>
          <br>
        <table border="1" style="border-collapse:collapse"cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td align="center"> <input type="checkbox" Name="chkAll" value="1" onclick=CheckAll(this.form)>
              全部选定 <input type="submit" Name="Submit" value="删除选定的记录"> </td>
          </tr>
        </table>
        </form>
        <% End If %>
    </TD>
    </TR>
  </TBODY>
</TABLE>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
		<Iframe src="CopyRight.asp" width="760" height="100" marginheight="0" marginwidth="0" scrolling="NO" frameborder="0" name="CopyRight"></iframe>
	</td>
  </tr>
</table></BODY>
</HTML>
<%
Recordset1.Close()
%>

⌨️ 快捷键说明

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