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

📄 wagequery.asp

📁 设计广州农信管理系统,具有一般的存取款功能等客户服务.
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/DatabaseConnection.asp" -->
<%
Dim rsTestName__MMColParam,rsScore__MMColParam
Dim strSheetName, strMemberID, strName, strGrade, strClass,strSubjects
strSheetName = Request("SheetName")
rsTestName__MMColParam = Request("SheetName")
Session("txtSheetName")=Request("SheetName")

set rsSubjects = Server.CreateObject("ADODB.Recordset")
rsSubjects.ActiveConnection = MM_DatabaseConnection_STRING
rsSubjects.Source = "SELECT Top 1 * FROM " & strSheetName
rsSubjects.CursorType = 0
rsSubjects.CursorLocation = 2
rsSubjects.LockType = 3
rsSubjects.Open()
rsSubjects_numRows = 0
strSubjects=strSheetName & "." & rsSubjects.Fields.Item(1).Name
for i=2 to rsSubjects.Fields.Count-1
  strSubjects = strSubjects & "," & strSheetName & "." & rsSubjects.Fields.Item(i).Name
next
%>
<%
set rsTestName = Server.CreateObject("ADODB.Recordset")
rsTestName.ActiveConnection = MM_DatabaseConnection_STRING
rsTestName.Source = "SELECT SheetName, TestName FROM TestName WHERE SheetName = '" + Replace(rsTestName__MMColParam, "'", "''") + "'"
rsTestName.CursorType = 0
rsTestName.CursorLocation = 2
rsTestName.LockType = 3
rsTestName.Open()
rsTestName_numRows = 0
%>
<%
strMemberID= Request("MemberID")
strName=Request("MemberName")

set rsScore = Server.CreateObject("ADODB.Recordset")
rsScore.ActiveConnection = MM_DatabaseConnection_STRING

strSQL = "Select " & strSheetName & ".MemberID, MemberInfo.MemberName, " & strSubjects & " From " & strSheetName
strSQL = strSQL & " LEFT JOIN MemberInfo ON " & strSheetName & ".MemberID = MemberInfo.MemberID"

if (strMemberID <> "") then
  strSQL = strSQL & " Where " & strSheetName & ".MemberID Like '%" & strMemberID & "%'"

end if
strSQL = strSQL & " ORDER BY " & strSheetName & ".MemberID"

rsScore.Source = strSQL  
rsScore.CursorType = 0
rsScore.CursorLocation = 2
rsScore.LockType = 3
rsScore.Open()
rsScore_numRows = 0
%>

<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsScore_numRows = rsScore_numRows + Repeat1__numRows
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""

' add the URL parameters to the MM_keepURL string
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

' add the Form variables to the MM_keepForm string
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

' create the Form + URL string and remove the intial '&' from each of the strings
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)

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<!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 href="home.css" rel="stylesheet" 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=#ffffff leftMargin=0 topMargin=0>
<!--#include file="Default_Top.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <TBODY>
    <TR> 
      <TD bgcolor="#F2FBF2"><img src="images/ScoreModifyDel_Title.GIF" width="500" height="60">
	  <% If Not rsScore.EOF Or Not rsScore.BOF Then %>
        <form Name="del" onsubmit="return ConfirmDel()" method="post" action="WageDel2.asp">
          <b><font color="#FF0000">工资表名称:</font></b>&nbsp;<%=(rsTestName.Fields.Item("TestName").Value)%><font color="#FF0000"><b><font color="#0066cc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></b></font>
          <table cellspacing=0 width="100%" border=1 cellpadding="0" bordercolor="#FFCC00">
                    <tr align="center" valign="middle" bordercolor="#FFCC00"> 
                      <td height="28"><font color="#000000">是否<br>
                        删除</font></td>
                      <td><font color="#000000">编号</font></td>
					  <td><font color="#000000">姓名</font></td>
					  <%
						for i=2 to rsScore.Fields.Count-1
						  Response.Write "<td height='28'><font color='#000000'>" & rsScore.Fields.Item(i).Name & "</font></td>"
						next
						%>
                      <td height="28"><font color="#000000">&nbsp;&nbsp;操&nbsp;&nbsp;作&nbsp;&nbsp;</font></td>
                    </tr>
                    <% 
While ((Repeat1__numRows <> 0) AND (NOT rsScore.EOF)) 
%>
                    <tr align="center" valign="middle"> 
                      <td height="20"> 
                        <input type="checkbox" value="<%= (rsScore.Fields.Item("MemberID").Value) %>" onClick=unselectall() Name="chkNum"> 
                      </td>
                      <%
						for i=0 to rsScore.Fields.Count-1
						  tmpScore=rsScore.Fields.Item(i).Value
						  if IsNull(tmpScore) then tmpScore="&nbsp;"						  
						  Response.Write "<td height='20'>" & tmpScore & "</td>"
						next
						%>
                      <td height="20"><A HREF="WageModify.asp?SheetName=<%=strSheetName%>&MemberID=<%=(rsScore.Fields.Item("MemberID").Value)%>">修改</A> 
                        <A HREF="WageDel.asp?sheetName=<%=strSheetName%>&MemberID=<%=(rsScore.Fields.Item("MemberID").Value)%>">删除</A></td>
                    </tr>
                    <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsScore.MoveNext()
Wend
%>
                    <tbody>
                    </tbody>
          </table>
                  <br>
                  <table border="0" cellspacing="0" cellpadding="0" align="left">
                    <tr> 
                      <td width="104"> <input type="checkbox" Name="chkAll" value="1" onClick=CheckAll(this.form)>
                        全部选定</td>
                      <td width="104"><input name="SheetName" type="hidden" value="<%=Request("SheetName")%>"> 
                      </td>
                      <td width="46"> <input type="submit" Name="Submit" value="删除选定的记录"> 
                      </td>
                    </tr>
                  </table>
                  <br>
                  <br>
        </form>
                <% else %> <br> <br> <br>
                找不到符合条件的记录!<br> <br> <br> <% 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="200" marginheight="0" marginwidth="0" scrolling="NO" frameborder="0" name="CopyRight"></iframe>
	</td>
  </tr>
</table></BODY>
</HTML>
<%
rsTestName.Close()
%>
<%
rsScore.Close()
%>

⌨️ 快捷键说明

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