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

📄 productmanage.asp

📁 一个比较完整的oa系统
💻 ASP
字号:
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_SaleManageProductManage")<>1 then HX_GoBack "对不起,您的权限不够!",""
ColumnName="":Tablename="HX_Product":action=request("action"):SSID=request("SSID"):page=request("page")
select case action
  case "del"
    id=request("id")
    if WS_S.HX_IsNUM(id) then
      conn.execute("delete from "&Tablename&" where WS_PTID="&id)
	  WS_S.HX_Redirect("ProductManage.asp?page="&page)
    end if  	
  case "search"
    SSID=WS_s.HX_Replace(request("SSID")):Productname=WS_s.HX_Replace(request("Productname")):Producttype=WS_s.HX_Replace(request("Producttype")):ProductUnitPrice=WS_s.HX_Replace(request("ProductUnitPrice")):ProductPrice=WS_s.HX_Replace(request("ProductPrice")):ProductSalePrice=WS_s.HX_Replace(request("ProductSalePrice")):ProductIntr=WS_s.HX_Replace(request("ProductIntr"))
	Orderby=" where 1=1"
    if WS_S.HX_IsNUM(SSID) and SSID>0 then Orderby=Orderby&" and WS_SSID="&SSID
	if Productname<>"" then Orderby=Orderby&" and WS_Productname like '%"&Productname&"%'"
	if Producttype<>"" then	  Orderby=Orderby&" and WS_Producttype like '%"&Producttype&"%'"
	if ProductUnitPrice<>"" then  Orderby=Orderby&" and WS_ProductUnitPrice="&ProductUnitPrice
	if WS_S.HX_IsNUM(ProductPrice) then  Orderby=Orderby&" and WS_ProductPrice="&ProductPrice
    if WS_S.HX_IsNUM(ProductSalePrice) then  Orderby=Orderby&" and WS_ProductSalePrice="&ProductSalePrice
	if ProductIntr<>"" then Orderby=Orderby&" and WS_ProductIntr like '%"&ProductIntr&"%'"
    Orderby=Orderby&" and WS_ProductCreateMan="&loginuid
  case else
   if WS_S.HX_IsNUM(SSID) then  Orderby=" where WS_SSID="&SSID   else     Orderby=" where WS_ProductCreateMan="&loginuid&" order by WS_PTID desc"
end select
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
response.Write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>产品管理</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'></head><body topmargin='20' leftmargin='0' bottommargin='0'><table width='98%'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#115F8F'><tr><td colspan='2' bgcolor=ffffff background='../hximages/titlelinebg.gif'><table width='590'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>产品管理</font>     <a href='ProductCreate.asp' class='menu'>添加产品</a></td></tr></table><table width='100%'  border='0' cellspacing='1' cellpadding='0' bgcolor=f1f1f1><tr bgcolor='#A1BBE0'><td width='6%' height='20' align='right'><div align='center'>编 号</div></td><td width='12%'><div align='center'>产品名称</div></td><td width='12%'><div align='center'> 产品型号 </div></td><td width='10%'><div align='center'>成本价</div></td><td width='15%'><div align='center'>出售价</div></td><td width='8%'><div align='center'>计量单位</div></td><td width='18%'><div align='center'>简要说明</div></td><td width='11%'><div align='center'>供应商</div></td><td width='8%'><div align='center'>操 作</div></td></tr>"
if rs.recordcount>0 then
 rs.PageSize =15 '每页记录条数
	iCount=rs.RecordCount '记录总数
	iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	ii=0
	do while not rs.EOF   
	response.write "<tr bgcolor='#FFFFFF' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#ffffff' align=center><td align='center' height='25'>"&rs("WS_PTID")&"</td><td align='center'>"&rs("WS_ProductName")&"</td><td align='center'>"&rs("WS_ProductType")&"</td><td align='center'>"&rs("WS_ProductPrice")&"</td><td align='center'>"&rs("WS_ProductSalePrice")&"</td><td align='center'>"&rs("WS_ProductUnitPrice")&"</td><td align='center'>"&rs("WS_ProductIntr")&"</td><td align='center'>"
	call WS_S.HX_OutSaleShop(rs("WS_SSID"))
	response.write "</td><td align='center'><a href='ProductModify.asp?id="&rs("WS_PTID")&"'>修改</a> <a href='#' onclick=""if(!confirm('确认要删除此交往信息记录吗?')) {return false};else {location.href='ProductManage.asp?action=del&id="&rs("WS_PTID")&"';return true;}"">删除</a></td></tr>"
  ii=ii+1
	  if ii>=rs.PageSize then Exit Do
	  rs.movenext
      loop
	  end if
	  for i=0 to 15-rs.recordcount
      response.write "<tr bgcolor='#FFFFFF' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#ffffff' align=center><td height='25'>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>"
     next
   if rs.recordcount>0 then
   call WS_S.PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right>",10)
   end if
  call WS_S.HX_RSClose(rs) 
  response.write "</table></td></tr></table>"
%>

⌨️ 快捷键说明

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