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

📄 category_list.asp

📁 在线医药销售管理系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%
'功能:查看品种信息
'入口参数:无
'出口参数:ctg_id(品种编号)
'作者:蒋柳   日期:2001。6。4
'*******************
%>
<%
Response.Expires=0
Lstr_stf_id=session("Gs_StaffID")
if lstr_stf_id="" then
Response.Write "请先登录!"
'Response.End 
end if 

'数据库连接
dim DBconn
set DBconn=server.CreateObject("ADODB.Connection")
DBconn.ConnectionTimeout =application("Connection2_Connectiontimeout")
DBconn.Open Application("Connection2_ConnectionString")
  
'取得数据
set Rsctg=server.CreateObject ("ADODB.Recordset")
rsctg.CursorLocation=3
Sql="select ctg_id,ctg_name,ctg_spec,ctg_tradeprice,ctg_retailprice,ctg_unit from basic_category order by ctg_id DESC"
Rsctg.Open Sql,DBconn,2
%>
<HTML>
<HEAD>
<TITLE>药品品种维护</TITLE>
</HEAD>

<BODY>
<form action="category_del.asp" method=post id=form1 name=frm_del>
<FONT size=5>品种维护>>已有品种列表</FONT>
<table width=500 border="0" height="200">
  <tr height="180" >
    <td valign="top" align="left">
    <%
	' 输出表头
	Response.Write "<table border=1><tr>"
	Response.Write "<td> </td>"
	Response.Write "<td>品种编号</td>"
	Response.Write "<td>品种名称</td>"
	Response.Write "<td>品种规格</td>"
	Response.Write "<td>批发价</td>"
	Response.Write "<td>零售价</td>"
	Response.Write "<td>品种单位</td>"
	
	Response.Write "<td>修改</td>"
	Response.Write "</tr>"
	if Rsctg.EOF then
	Response.Write ("没有任何数据!")
	%>
	<INPUT type="button" value="增加" id=button1 name=button1 onclick='window.location="category_new.asp"'>
    
	<%else
	 
	'获得要查询的页码
	Rsctg.PageSize = 2  
	
	 
	Page = CLng(Request("Page"))   'string型转化为long型
	If Page < 1 Then Page = 1
	'显示数据
	Rsctg.AbsolutePage=page
	for Lpage=1 to Rsctg.pagesize
	Response.Write "<tr><td><INPUT type=checkbox id=checkbox1 name=tstr_ctg_id value="&Rsctg("ctg_id")&"></td>"
	Response.Write "<td>&nbsp;" & Rsctg("ctg_id") & "</td>"
	Response.Write "<td>&nbsp;" & Rsctg("ctg_name") & "</td>"
	Response.Write "<td>&nbsp;" & Rsctg("ctg_spec") & "</td>"
	Response.Write "<td>&nbsp;" & Rsctg("ctg_tradeprice") & "</td>"
	Response.Write "<td>&nbsp;" & Rsctg("ctg_retailprice") & "</td>"
	Response.Write "<td>&nbsp;" & Rsctg("ctg_unit") & "</td>"
	
	Response.Write "<td>" & "<a href=category_modify.asp?tedit_ctg_id="& rsctg("ctg_id") &">修改</a>" & "</td>"
	Response.Write "</tr>"
	Rsctg.MoveNext 
	if Rsctg.EOF then exit for
	next
	Response.Write "</table>"

	%></td>
  </tr>
  <tr height="20">
    <td >
    <INPUT type="button" value="增加" id=button1 name=button1 onclick='window.location="category_new.asp"'>
    <INPUT type="submit" value="删除" id=button2 >
   <%
	If Page <> 1 and rsctg.PageCount<>0 Then
		If Page <> Rsctg.PageCount Then
%>
          <a href="category_list.asp?page=1">首页</a> 
          <a href="category_list.asp?page=<%=page-1%>">上一页</a> 		
          <a href="category_list.asp?page=<%=page+1%>">下一页</a>   
          <a href="category_list.asp?page=<%=Rsctg.pagecount%>">末页</a> 
<%
		else
%>
		 <a href="category_list.asp?page=1">首页</a>
         <a href="category_list.asp?page=<%=page-1%>">上一页</a> 
         下一页
         末页 
 <%
End If
else
%>
<%		
		If Rsctg.PageCount = 1 or rsctg.PageCount=0  Then
%>
          首页
          上一页 
          下一页 
          末页 
    
<%else%>
		
          首页
           上一页 
          <a href="category_list.asp?page=<%=page+1%>">下一页</a>  
         
          <a href="category_list.asp?page=<%=Rsctg.pagecount%>">末页</a> 
<%
    End If
	End If
%>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            第<%=page%>页,共<%=Rsctg.PageCount%>页
    <%	end if%>
    </td>
  </tr>
</table>
   </form>
   <%
   DBconn.Close 
   %>
</BODY> 


</HTML>
 

⌨️ 快捷键说明

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