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

📄 ttsjyproc.asp

📁 我的图书管理系统
💻 ASP
📖 第 1 页 / 共 5 页
字号:

 if rds1.recordset.recordcount<=0 then
   
   exit sub
   
  end if 
  
 
 
 FOR I=0 TO 15


  If Not RDS1.Recordset.BOF Then
      RDS1.Recordset.MovePrevious
    ELSE
      RDS1.Recordset.MOVEFIRST
  END IF       
   
  IF RDS1.Recordset.BOF=TRUE THEN
     
     RDS1.Recordset.MOVEFIRST
     
      if l_press=true then
   
       else
    
         ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
    
        ' kcsl.value = RDS1.Recordset.FIELDS(3)
   
       end if 
     
   ELSE
     if l_press=true then
   
    else
    
    ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
   
    ' kcsl.value = RDS1.Recordset.FIELDS(3)
   
  end if 
   
 END IF  
 
NEXT 
 
 
END SUB 
'-------------------------

SUB NEXTPAGE_CLICK()

 if rds1.recordset.recordcount<=0 then
   
   exit sub
   
  end if 
  
  
   FOR I=0 TO 15   
 
     If Not RDS1.Recordset.EOF Then
   
        RDS1.Recordset.MoveNext
        
      
     ELSE
      
        RDS1.Recordset.MOVELAST
  
    END IF  
   
  IF RDS1.RECORDSET.EOF=TRUE THEN
   
     RDS1.RECORDSET.MOVELAST 
      if l_press=true then
   
       else
    
       ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
   
       ' kcsl.value = RDS1.Recordset.FIELDS(3)
   
       end if 
      
   ELSE
       if l_press=true then
   
    else
    
    ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
   
    ' kcsl.value = RDS1.Recordset.FIELDS(3)
   
  end if 
   
  End If
 
 NEXT
 

END SUB
'============================


'================================
sub fllb_click()
  
 rds1.sql="select 类别=分类编号,类别名称            =分类名称 from tFL  "
 rds1.executeoptions=1
 rds1.refresh
 Grid1.CAPTION=" 图 书 类 别 浏 览"
 l_press=true 
 l_int="" 
 l_cancle=left(rds2.recordset.fields(0),1)


end sub
'-----------------------
  Sub First_CLICK()
  
if rds1.recordset.recordcount<=0 then
   
   exit sub
   
  end if 
   


   RDS1.Recordset.MoveFirst
   
   if l_press=true then
   
    else
    
    ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
   
    ' kcsl.value = RDS1.Recordset.FIELDS(3)
   
  end if 
 
    
   
 End Sub
'-----------------------

Sub TOP_CLICK()
   
  if rds1.recordset.recordcount<=0 then
   
   exit sub
   
  end if 
  
  
   If Not RDS1.Recordset.BOF Then
   
      RDS1.Recordset.MovePrevious
      
    ELSE
    
      RDS1.Recordset.MOVEFIRST
      
   END IF       
   
   IF RDS1.Recordset.BOF=TRUE THEN
     RDS1.Recordset.MOVEFIRST
     
     if l_press=true then
      else
      ' l_lbmc.value = RDS3.Recordset.FIELDS(1)
      ' kcsl.value = RDS1.Recordset.FIELDS(3)
     end if  
     
   ELSE
   
      if l_press=true then
       else
       ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
       ' kcsl.value=RDS1.Recordset.FIELDS(3)
      end if
   
   END IF  
End Sub

'----------------------------

Sub Next_CLICK()
  
  if rds1.recordset.recordcount<=0 then
   
   exit sub
   
  end if 
  
  
   l_next=true   
 
   If Not RDS1.Recordset.EOF Then
      RDS1.Recordset.MoveNext
      
    ELSE
      
      RDS1.Recordset.MOVELAST
    END IF  
   
   IF RDS1.RECORDSET.EOF=TRUE THEN
   
      RDS1.RECORDSET.MOVELAST 
      
        if l_press=true then
           else
          ' l_lbmc.value = RDS3.Recordset.FIELDS(1)
          ' kcsl.value = RDS1.Recordset.FIELDS(3)
        end if
   ELSE
   
        if l_press=true then
          else
         ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
         ' kcsl.value=RDS1.Recordset.FIELDS(3)
        end if 
        
 End If
 
 
End Sub

'------------------------------

Sub Last_CLICK()

  if rds1.recordset.recordcount<=0 then
   
   exit sub
   
  end if 
  
  l_last=true
   
  RDS1.Recordset.MoveLast
   
  if l_press=true  then
    else
   ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
 
  '  kcsl.value = RDS1.Recordset.FIELDS(3)
    
  end if
  
   
   
End Sub
'-----------------------
'往上翻页
SUB TOPPAGE1_CLICK()
 
 if rds1.recordset.recordcount<=0 then
   
   exit sub
   
  end if 
  

 If Not RDS3.Recordset.BOF Then
 
      RDS3.Recordset.MovePrevious
      
    else
    
	   RDS3.RECORDSET.MOVEFIRST
	   
  End If
  

 IF RDS3.RECORDSET.BOF=TRUE THEN
 
   RDS3.RECORDSET.MOVEFIRST
   
   rds1.sql="select 索书号=ltrim(rtrim(分类编号))+'/'+ltrim(rtrim(主序号))+'-'+次序号,书名,作者,库存数量 from ttsml where 分类编号='"&RDS3.RECORDSET.FIELDS(0)&"' "
   rds1.executeoptions=1
   rds1.refresh
  '  l_lbmc.value=RDS3.Recordset.FIELDS(1)
 
      
   ' kcsl.value = RDS1.Recordset.FIELDS(3)
   
   if RDS1.Recordset.recordcount>16 then
      l_true=true
      l_count=RDS1.Recordset.recordcount
      l_false=false
   
   end if
      
 ELSE 
   rds1.sql="select 索书号=ltrim(rtrim(分类编号))+'/'+ltrim(rtrim(主序号))+'-'+次序号,书名,作者,库存数量 from ttsml where 分类编号='"&RDS3.RECORDSET.FIELDS(0)&"' "
   rds1.executeoptions=1
   rds1.refresh
  ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
 
      
  ' kcsl.value = RDS1.Recordset.FIELDS(3)
   if RDS1.Recordset.recordcount>16 then
   
   
      l_true=true
         l_count=RDS1.Recordset.recordcount
        l_false=false
   
   
   end if
   

 END IF


END SUB

'------------------
'往下翻页
   
 
sub nextpage1_click()

 if rds1.recordset.recordcount<=0 then
   
   exit sub
   
  end if 
  
 
 if RDS1.Recordset.recordcount>16 then
  
    l_true=true
    l_count=RDS1.Recordset.recordcount
  
  else
  
    l_true=false  
    
 end if
 
 if l_true = true and l_false=false then
 
   if l_false=true then
   
     l_num=l_num+16
    
     
   end if
     
 

    l_move=l_num+16
  
     
    if l_move>=l_count then
       
       l_true=false
       
       l_num=0
       
       l_false=false 
           
       exit sub 
       
     else
     
      
        grid1.Row=16
      
            
     
        l_num=l_num+16
      
      
        l_false=true
          
     end if 
      
 else    
 
    

    If Not RDS3.Recordset.EOF Then
 
       RDS3.Recordset.MoveNEXT
      
    else
    
	   RDS3.RECORDSET.MOVELAST
	   
    End If
  

   IF RDS3.RECORDSET.BOF=TRUE THEN
 
      RDS3.RECORDSET.MOVENEXT
   
      rds1.sql="select 索书号=ltrim(rtrim(分类编号))+'/'+ltrim(rtrim(主序号))+'-'+次序号,书名,作者,库存数量 from ttsml where 分类编号='"&RDS3.RECORDSET.FIELDS(0)&"' "
   
      rds1.executeoptions=1
   
      rds1.refresh
      
      ' l_lbmc.value=RDS3.Recordset.FIELDS(1)
 
      
     ' kcsl.value = RDS1.Recordset.FIELDS(3)
      
     if RDS1.Recordset.recordcount>16 then
     
        l_true=true
        l_count=RDS1.Recordset.recordcount
        l_false=false
     end if

    ELSE 
  
       rds1.sql="select 索书号=ltrim(rtrim(分类编号))+'/'+ltrim(rtrim(主序号))+'-'+次序号,书名,作者,库存数量 from ttsml where 分类编号='"&RDS3.RECORDSET.FIELDS(0)&"' "
  
       rds1.executeoptions=1
  
       rds1.refresh
      '  l_lbmc.value=RDS3.Recordset.FIELDS(1)
 
      
      ' kcsl.value = RDS1.Recordset.FIELDS(3)
       
       if RDS1.Recordset.recordcount>16 then
     
          l_true=true
         
          l_count=RDS1.Recordset.recordcount
          l_false=false
   
       end if
 

  
    END IF

 end if

END SUB
 
'-----------------------------------


   sub jszh_click()

    if jszh.value="" or len(trim(jszh.value))=0 then
       msgbox "借书证号不能为空,请输入借书证号!"
	  ' jszh.seleted

	 else

        rds2.sql="select 姓名 from tjsz where 借书证号='"&trim(jszh.value)&"'"
		rds2.executeoptions=1
		rds2.refresh
		if rds2.recordset.recordcount>0 then

    		  xm.value=rds2.recordset.fields(0)

		  else

	    	  msgbox "借书证号输入错误!请重新输入"
			 ' jszh.selected
        end if

   end if

   end sub

' 待借图书登记
  sub lend1_click()
  
   if lb.value="" or len(trim(lb.value))=0 or jxh.value="" or len(trim(jxh.value))=0 or cxh.value="" or len(trim(cxh.value))=0 then

      msgbox "类别,主序号,次序号不能为空!请输入"

      exit sub
   end if
   
    rds2.sql="select * from ttsml where 分类编号='"&trim(lb.value)&"' and 主序号='"&trim(jxh.value)&"' and 次序号='"&trim(cxh.value)&"' and 库存数量 <> 0  "

    rds2.executeoptions=1

	rds2.refresh

	if rds2.recordset.recordcount<=0 then

	   msgbox "没有找到你所要借的图书!请重新查找"
	   exit sub

    end if


  

    rds2.sql="insert into tdjts(借书证号,姓名,分类编号,主序号,次序号) values('"&trim(jszh.value)&"','"&trim(xm.value)&"','"&trim(lb.value)&"','"&trim(jxh.value)&"','"&trim(cxh.value)&"')"
    
	rds2.executeoptions=1

	rds2.refresh
	
	if err.number=0 then
	 
	 msgbox "待借图书成功!"
     
'	rds2.sql="update ttsml set 库存数量=库存数量-1 where 分类编号='"&trim(lb.value)&"' and 主序号='"&trim(jxh.value)&"' and 次序号='"&trim(cxh.value)&"' "
    
'	rds2.executeoptions=1

'	rds2.refresh
	
	  
	 else

	 msgbox "待借失败"

    end if


  end sub

'========================
'按书名查找

sub find_xm()

 smvalue=inputbox("请输入你需要查找的图书书名,点击<OK>开始查找,点击<CANCEl>取消查找","提示窗口")

 if len(trim(smvalue))=0 or trim(smvalue)="" then
 
   ' msgbox "请输入书名",,"提示窗口"
    exit sub
    
  else
   
   rds2.sql="select * from ttsml where 书名 like '%"&smvalue&"%'"     '+'%' "
   
   rds2.executeoptions=1
   rds2.refresh
   
   if rds2.recordset.recordcount>0 then
      
     rds1.sql="select 索书号=ltrim(rtrim(分类编号))+'/'+ltrim(rtrim(主序号))+'-'+次序号,书名,作者,库存数量 from ttsml where 书名 like '%"&smvalue&"%'"   '+'%' "
     rds1.executeoptions=1
     rds1.refresh
     
   else 
     msgbox "没有找到此书!如果要继续查找,请重新输入",,"提示窗口"
    
   end if   
      
    
    
 end if   


end sub
 
'===================

⌨️ 快捷键说明

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