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

📄 h_main.frm

📁 个人开发二手书交易系统,有书籍信息和订单信息的发布处理功能
💻 FRM
📖 第 1 页 / 共 5 页
字号:
Text1 = ""
Text1.SetFocus: Exit Sub
End If
Next l

Adodc1.RecordSource = "select supb.user_id as 用户帐号,supb.supplied_book_ID as 书籍编号,supb.name as 书籍名称,supb.publisher as 出版社,supb.author as 作者,supb.theme as 主题,supb.kind as 类别,supb.lowest_price as 最低价格,supb.user_credit as 用户信誉度,supb.description as 描述,supb.release_time as 信息发布时间,supb.handled as 是否发布,supb.dealed as 是否交易 from supb where supb.supplied_book_ID='" & Text1 & "'"
Adodc1.Refresh
Adodc2.RecordSource = "select supb.user_id as 帐号 from supb where supb.supplied_book_ID='" & Text1 & "'"
Adodc2.Refresh
    If Adodc1.Recordset.RecordCount = 0 Then
    MsgBox "对不起,目前没有您需要的书籍", , "结果"
    Call Form_Load
    Exit Sub
    End If
Frame6.Visible = True
Frame6.Caption = "供给信息"

Label39 = Adodc1.Recordset.Fields("书籍编号")
Label33 = Adodc1.Recordset.Fields("书籍名称")
Label37 = Adodc1.Recordset.Fields("作者")
Label35 = Adodc1.Recordset.Fields("出版社")
Label36 = Adodc1.Recordset.Fields("类别")
Label25 = Adodc1.Recordset.Fields("主题")
Label26 = Adodc1.Recordset.Fields("描述")
Label14 = Adodc1.Recordset.Fields("用户信誉度")
Label27 = Adodc1.Recordset.Fields("信息发布时间")
Label40 = Adodc2.Recordset.Fields("帐号")
Label42 = Adodc1.Recordset.Fields("是否发布")
Label41 = Adodc1.Recordset.Fields("是否交易")

Else                                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

If Text1 = "" Then
MsgBox "请填写书籍编号!", vbOKOnly + vbExclamation, "提示"
Text1.SetFocus: Exit Sub
End If

nr = Text1
For l = 1 To Len(nr)

le = Mid(nr, l, 1)
If Not (Asc(le) = 46 Or (Asc(le) >= 48 And Asc(le) <= 57)) Then
MsgBox "数据输入有误!", vbOKOnly, "提示"
Text1 = ""
Text1.SetFocus: Exit Sub
End If
Next l

Adodc1.RecordSource = "select wanb.user_id as 用户帐号,wanb.wanted_book_ID as 书籍编号,wanb.name as 书籍名称,wanb.publisher as 出版社,wanb.author as 作者,wanb.theme as 主题,wanb.kind as 类别,wanb.highest_price as 最高价格,wanb.user_credit as 用户信誉度,wanb.description as 描述,wanb.release_time as 信息发布时间,wanb.handled as 是否发布,wanb.dealed as 是否交易 from wanb where wanted_book_ID='" & Text1 & "'"
Adodc1.Refresh
Adodc2.RecordSource = "select wanb.user_id as 帐号 from wanb where wanb.wanted_book_ID='" & Text1 & "'"
Adodc2.Refresh

    If Adodc1.Recordset.RecordCount = 0 Then
    MsgBox "对不起,目前没有您需要的书籍", , "结果"
    Call Form_Load
    Exit Sub
End If

Frame6.Visible = True
Frame6.Caption = "需求信息"

Label39 = Adodc1.Recordset.Fields("书籍编号")
Label33 = Adodc1.Recordset.Fields("书籍名称")
Label37 = Adodc1.Recordset.Fields("作者")
Label35 = Adodc1.Recordset.Fields("出版社")
Label36 = Adodc1.Recordset.Fields("类别")
Label25 = Adodc1.Recordset.Fields("主题")
Label26 = Adodc1.Recordset.Fields("描述")
Label14 = Adodc1.Recordset.Fields("用户信誉度")
Label27 = Adodc1.Recordset.Fields("信息发布时间")
Label40 = Adodc2.Recordset.Fields("帐号")
Label42 = Adodc1.Recordset.Fields("是否发布")
Label41 = Adodc1.Recordset.Fields("是否交易")

End If




End If
End Sub

Private Sub Command2_Click()
If Option1 = True Then
Frame1.Caption = "供给信息"
Adodc1.RecordSource = "select supb.supplied_book_ID as 书籍编号,supb.name as 书籍名称,supb.publisher as 出版社,supb.author as 作者,supb.theme as 主题,supb.kind as 类别,supb.lowest_price as 最低价格,supb.user_credit as 用户信誉度,supb.description as 描述,supb.release_time as 信息发布时间 from supb where supb.handled=1 and supb.dealed=0"
Adodc1.Refresh

  If Text2 = "" Then
    
    If Text3 = "" Then
      
      If Text4 = "" Then
        MsgBox "请输入信息!", vbOKOnly + vbExclamation, "提示"
        Text2.SetFocus: Exit Sub
      Else
        Adodc1.RecordSource = "select supb.supplied_book_ID as 书籍编号,supb.name as 书籍名称,supb.publisher as 出版社,supb.author as 作者,supb.theme as 主题,supb.kind as 类别,supb.lowest_price as 最低价格,supb.user_credit as 用户信誉度,supb.description as 描述,supb.release_time as 信息发布时间 from supb where supb.handled=1 and supb.dealed=0 and supb.publisher='" & Text4.Text & "'"
        Adodc1.Refresh
        
            If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command5_Click
            Exit Sub
            End If
        
      End If
    
    Else
      
      If Text4 = "" Then
        Adodc1.RecordSource = "select supb.supplied_book_ID as 书籍编号,supb.name as 书籍名称,supb.publisher as 出版社,supb.author as 作者,supb.theme as 主题,supb.kind as 类别,supb.lowest_price as 最低价格,supb.user_credit as 用户信誉度,supb.description as 描述,supb.release_time as 信息发布时间 from supb where supb.handled=1 and supb.dealed=0 and supb.author='" & Text3.Text & "'"
        Adodc1.Refresh
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command5_Click
            Exit Sub
            End If
        
      Else
        Adodc1.RecordSource = "select supb.supplied_book_ID as 书籍编号,supb.name as 书籍名称,supb.publisher as 出版社,supb.author as 作者,supb.theme as 主题,supb.kind as 类别,supb.lowest_price as 最低价格,supb.user_credit as 用户信誉度,supb.description as 描述,supb.release_time as 信息发布时间 from supb where supb.handled=1 and supb.dealed=0 and supb.publisher='" & Text4.Text & "'and supb.author='" & Text3.Text & "'"
        Adodc1.Refresh
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command5_Click
            Exit Sub
            End If
        
      End If
    
    End If
  
  Else
    If Text3 = "" Then
      If Text4 = "" Then
        Adodc1.RecordSource = "select supb.supplied_book_ID as 书籍编号,supb.name as 书籍名称,supb.publisher as 出版社,supb.author as 作者,supb.theme as 主题,supb.kind as 类别,supb.lowest_price as 最低价格,supb.user_credit as 用户信誉度,supb.description as 描述,supb.release_time as 信息发布时间 from supb where supb.handled=1 and supb.dealed=0 and supb.name='" & Text2.Text & "'"
        Adodc1.Refresh
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command5_Click
            Exit Sub
            End If
        
      Else
        Adodc1.RecordSource = "select supb.supplied_book_ID as 书籍编号,supb.name as 书籍名称,supb.publisher as 出版社,supb.author as 作者,supb.theme as 主题,supb.kind as 类别,supb.lowest_price as 最低价格,supb.user_credit as 用户信誉度,supb.description as 描述,supb.release_time as 信息发布时间 from supb where supb.handled=1 and supb.dealed=0 and supb.name='" & Text2.Text & "' and supb.publisher='" & Text4.Text & "'"
        Adodc1.Refresh
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command5_Click
            Exit Sub
            End If
        
      End If
    Else
      If Text4 = "" Then
        Adodc1.RecordSource = "select supb.supplied_book_ID as 书籍编号,supb.name as 书籍名称,supb.publisher as 出版社,supb.author as 作者,supb.theme as 主题,supb.kind as 类别,supb.lowest_price as 最低价格,supb.user_credit as 用户信誉度,supb.description as 描述,supb.release_time as 信息发布时间 from supb where supb.handled=1 and supb.dealed=0 and supb.name='" & Text2.Text & "' and supb.author='" & Text3.Text & "'"
        Adodc1.Refresh
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command5_Click
            Exit Sub
            End If
        
      Else
        Adodc1.RecordSource = "select supb.supplied_book_ID as 书籍编号,supb.name as 书籍名称,supb.publisher as 出版社,supb.author as 作者,supb.theme as 主题,supb.kind as 类别,supb.lowest_price as 最低价格,supb.user_credit as 用户信誉度,supb.description as 描述,supb.release_time as 信息发布时间 from supb where supb.handled=1 and supb.dealed=0 and supb.name='" & Text2.Text & "' and supb.author='" & Text3.Text & "'and supb.publisher='" & Text4.Text & "'"
        Adodc1.Refresh
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command5_Click
            Exit Sub
            End If
        
      End If
    End If
  
  End If


Else                                   '''''''''''''''''''''''''''''''''''''''''''''''''''''''


  If Text2 = "" Then
    
    If Text3 = "" Then
      
      If Text4 = "" Then
        MsgBox "请输入信息!", vbOKOnly + vbExclamation, "提示"
        Text2.SetFocus: Exit Sub
      Else
          Adodc1.RecordSource = "select wanb.wanted_book_ID as 书籍编号,wanb.name as 书籍名称,wanb.publisher as 出版社,wanb.author as 作者,wanb.theme as 主题,wanb.kind as 类别,wanb.highest_price as 最高价格,wanb.user_credit as 用户信誉度,wanb.description as 描述,wanb.release_time as 期限 from wanb where wanb.handled=1 and wanb.dealed=0 and wanb.publisher='" & Text4 & "'"
          Adodc1.Refresh     'pub
            
            If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command4_Click
            Exit Sub
            End If
      End If
    
    Else
      
      If Text4 = "" Then
        Adodc1.RecordSource = "select wanb.wanted_book_ID as 书籍编号,wanb.name as 书籍名称,wanb.publisher as 出版社,wanb.author as 作者,wanb.theme as 主题,wanb.kind as 类别,wanb.highest_price as 最高价格,wanb.user_credit as 用户信誉度,wanb.description as 描述,wanb.release_time as 期限 from wanb where wanb.handled=1 and wanb.dealed=0 and wanb.author='" & Text3 & "'"
        Adodc1.Refresh              'auth
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command4_Click
            Exit Sub
            End If
        
      Else
        Adodc1.RecordSource = "select wanb.wanted_book_ID as 书籍编号,wanb.name as 书籍名称,wanb.publisher as 出版社,wanb.author as 作者,wanb.theme as 主题,wanb.kind as 类别,wanb.highest_price as 最高价格,wanb.user_credit as 用户信誉度,wanb.description as 描述,wanb.release_time as 期限 from wanb where wanb.handled=1 and wanb.dealed=0 and wanb.author='" & Text3 & "'and wanb.publisher='" & Text4 & "'"
        Adodc1.Refresh                      'auth & pub
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command4_Click
            Exit Sub
            End If
        
      End If
    
    End If
  
  Else
    If Text3 = "" Then
      If Text4 = "" Then
        Adodc1.RecordSource = "select wanb.wanted_book_ID as 书籍编号,wanb.name as 书籍名称,wanb.publisher as 出版社,wanb.author as 作者,wanb.theme as 主题,wanb.kind as 类别,wanb.highest_price as 最高价格,wanb.user_credit as 用户信誉度,wanb.description as 描述,wanb.release_time as 期限 from wanb where wanb.handled=1 and wanb.dealed=0 and wanb.name='" & Text2 & "'"
        Adodc1.Refresh                'name
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command4_Click
            Exit Sub
            End If
        
      Else
        Adodc1.RecordSource = "select wanb.wanted_book_ID as 书籍编号,wanb.name as 书籍名称,wanb.publisher as 出版社,wanb.author as 作者,wanb.theme as 主题,wanb.kind as 类别,wanb.highest_price as 最高价格,wanb.user_credit as 用户信誉度,wanb.description as 描述,wanb.release_time as 期限 from wanb where wanb.handled=1 and wanb.dealed=0 and wanb.name='" & Text2 & "'and wanb.publisher='" & Text4 & "'"
        Adodc1.Refresh                'name & pub
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command4_Click
            Exit Sub
            End If
        
      End If
    Else
      If Text4 = "" Then
        Adodc1.RecordSource = "select wanb.wanted_book_ID as 书籍编号,wanb.name as 书籍名称,wanb.publisher as 出版社,wanb.author as 作者,wanb.theme as 主题,wanb.kind as 类别,wanb.highest_price as 最高价格,wanb.user_credit as 用户信誉度,wanb.description as 描述,wanb.release_time as 期限 from wanb where wanb.handled=1 and wanb.dealed=0 and wanb.name='" & Text2 & "'and wanb.author='" & Text3 & "'"
        Adodc1.Refresh                'name & author
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command4_Click
            Exit Sub
            End If
        
      Else
        Adodc1.RecordSource = "select wanb.wanted_book_ID as 书籍编号,wanb.name as 书籍名称,wanb.publisher as 出版社,wanb.author as 作者,wanb.theme as 主题,wanb.kind as 类别,wanb.highest_price as 最高价格,wanb.user_credit as 用户信誉度,wanb.description as 描述,wanb.release_time as 期限 from wanb where wanb.handled=1 and wanb.dealed=0 and wanb.name='" & Text2 & "'and wanb.author='" & Text3 & "'and wanb.publisher='" & Text4 & "'"
        Adodc1.Refresh                ' all
        
                    If Adodc1.Recordset.RecordCount = 0 Then
            MsgBox "对不起,目前没有您需要的书籍", , "结果"
            Text2 = ""
            Text3 = ""
            Text4 = ""
            Text2.SetFocus
            Call Command4_Click
            Exit Sub
            End If
        
      End If
    End If
  
  End If

End If


End Sub

Private Sub Command22_Click()
Call Form_Load
End Sub

Private Sub Command3_Click()
Call Form_Load
End Sub

Private Sub Command4_Click()
If yhid <> "" Then

Frame1.Caption = "需求信息"
Adodc1.RecordSource = "select wanb.wanted_book_ID as 书籍编号,wanb.name as 书籍名称,wanb.publisher as 出版社,wanb.author a

⌨️ 快捷键说明

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